Hi Everyone
I've had a tough time finding a JS library that can handle the following scenario:
- The server is in possession of the private RSA key.
- The client side JS is in possession of the public RSA key.
The client should encrypt plain text using the public RSA key. The server should decrypt the text using the private RSA key.
I've seen a few libraries that seem to handle RSA encryption completely within a JS environment. In my case the key pair has been generated by the server. I'm using the standard Ruby Open::SSL library on the server. Loading the public key into a JS string does not seem to work in the libraries I have tested.
Can someone recommend a library that would handle this scenario ?
Thanks
Ben W