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?
-Patrick


Richard Levitte - VMS Whacker wrote:
In message <[EMAIL PROTECTED]> on Fri, 04 Jun 2004 11:17:49 +0800, Patrick Coleman 
<[EMAIL PROTECTED]> said:

pcoleman> Bulk encryption, I think. I just want to encrypt/decrypt >
pcoleman> RSA_size(key) bytes in one operation.

You can't encrypt/decrypt messages larger than the key with the RSA
algorithm.  It's part of the algorithm.  Therefore, it's better (as
some other have said) to encrypt/decrypt the message with a symmetric
algorithm, using a randomly generated key that you in turn
encrypt/decrypt using RSA (because the key is likely to be smaller
than RSA_size(rsakey)).

-----
Please consider sponsoring my work on free software.
See http://www.free.lp.se/sponsoring.html for details.

______________________________________________________________________
OpenSSL Project                                 http://www.openssl.org
User Support Mailing List                    [EMAIL PROTECTED]
Automated List Manager                           [EMAIL PROTECTED]

Reply via email to