I've been experimenting with an RSA library in C++ and have encryption and decryption working OK.
Ultimately I wanted to run some of this on a web server, but it seems that I'll have to do this in Perl due to restrictions on running compiled code.
The private and public key generation, and encryption of data using the private key will have to be done on the server in Perl. But the ciphertext will have to be decrypted in a compiled standalone C++ program using the aforementioned C++ RSA library.
In order to construct the 1024 bit public key, the RSA library needs the N and E elements of the RSA context (N is an array of 128 bytes and E is an array of 3 bytes).
Is it possible to extract the N and E elements from a keypair created by Crypt-RSA?
Or is there a better way of doing all this?