Jim, Yes, my data is less than 128 bytes. I ran across that when I was doing my original research and saw the approach you recommend for larger files.
So for a small file, do I have the methodology correct? Thanks! On 7/5/07, Jim Fox <[EMAIL PROTECTED]> wrote:
> > I grabbed "Network Security with OpenSSL" on Safari and have been > reading the relevant sections. That's a useful book. > If I understand correctly, to read an > external file, decrypt it using an internal private key and write the > decrypted out to internal data, I would do: > Is your file really small? RSA encryption works with integers, big ones, but smaller that the RSA key's modulus. That works out to 128 bytes max for most keys nowadays. To encrypt general text you want to use a symmetric algorithm such as AES. If you want to do it in a public/private sort of way, generate a random key for the AES encryption, encrypt the text with that, then encrypt the AES key with your RSA public key. Do the opposite to decrypt. Jim ______________________________________________________________________ OpenSSL Project http://www.openssl.org User Support Mailing List openssl-users@openssl.org Automated List Manager [EMAIL PROTECTED]
-- ============================================================================== John T. Cox e-mail [EMAIL PROTECTED] www http://members.iglou.com/vampire ============================================================================== ______________________________________________________________________ OpenSSL Project http://www.openssl.org User Support Mailing List openssl-users@openssl.org Automated List Manager [EMAIL PROTECTED]