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]

Reply via email to