chrisa/node-rsa — Issue #7: Split RsaKeypair in two?
Author: danfuzz
Created: 2012-01-30 22:51:15+00:00
State: open

`RsaKeypair.encrypt()` only requires a public key, and `RsaKeypair.decrypt()` only requires a private key. And in practice, one only uses one or the other for any given key pair.

I think it makes sense to split / simplify `rsa.createKeypair()` into `rsa.createPrivateKey(keyFile, [password])` and `rsa.createPublicKey(keyFile)`. If that's done, it also becomes reasonable to add the complementary `encrypt()` and `decrypt()` methods (corresponding to `RSA_private_encrypt()` and `RSA_public_decrypt()`).