I created an RSA key using:
RSA_generate_key(2048, RSA_F4, NULL, NULL);
Now I want to export the public key to the other side of B. Right now, I just memcpy'd the entire RSA * structure and sent it over the wire, and B can use this for encryption using RSA_public_encrypt ().
But I think that in this case I actually exported the whole pair of public / private key, not just the public key. I only want to export the public component of the RSA key. How can I use the OpenSSL API for this?
thanks
source share