Thanks to everyone for the help. I'll try what you suggested. -Patrick
David Schwartz wrote:
In that case, is there some function in openssl to chain several encrypts/decrypts together, so I can use the RSA functions to encrypt a DH key exchange?
Otherwise I'm just going to have to write some sort of splitting and chaining operation, that splits the message up into chunks of under RSA_size, encrypts each chunk as a separate operation, etc. Is this what is normally done in this sort of situation?
I'm baffled why you're trying to encrypt a public key. There should be no need to.
In any event, if you do need to encrypt a larger-sized object, you've already been told how to do it. Generate a random key, encrypt the object with that random key using a symmetric cipher, and then encrypt the random key using RSA.
DS
______________________________________________________________________ OpenSSL Project http://www.openssl.org User Support Mailing List [EMAIL PROTECTED] Automated List Manager [EMAIL PROTECTED]
______________________________________________________________________ OpenSSL Project http://www.openssl.org User Support Mailing List [EMAIL PROTECTED] Automated List Manager [EMAIL PROTECTED]