RSA Java encryption and Node.js decryption is not working
I have a system that requires a RSA keypair to be generated in javascript, have the public key then stored in a database at the server side (as a string), then the server side which is in Java will encrypt a string with the stored public key and send it to the client side which will decrypt the string with the private key. I'm using a browsified version of node-rsa on my client browser. First at the client i generate a keypair and export the keys, storing them as strings var NodeRSA = require('node-rsa'); var key = new NodeRSA({b: 1024}); key.exportKey("pkcs8-private"); key.exportKey("pkcs8