I hade the same question before. Below is that I figured out.
Here is the library in node for the chaincode encryption section that you read in Chaincode for Developer.
This library is under development, so there is no documentation, but you can take a look at the code and some test they made. Basically, if you don't want to write to the world state with the raw value, rather an encrypted one. The chaincode invoke function takes encrypt key from transaction proposal's transient field and do the encryption. Similarly for decryption, sign/verify.
The difference between this lib and other libs (e.g: node-crypto if you write chaincode in nodejs) is that it takes keys from transaction proposal transient field. If you could manage to get the public/private key somehow, then node-crypt is enough. Just make sure to use the version that fabric supports (prerequisites).
Hope this helps.