OpenSSL stream interface for file encryption

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

OpenSSL stream interface for file encryption

Dusty Hendrickson
Does OpenSSL have a stream interface for file encryption?  For example, is
there a stream-based method of encrypting a file in pieces rather than
loading an entire file into memory?

Dusty

______________________________________________________________________
OpenSSL Project                                 http://www.openssl.org
User Support Mailing List                    [hidden email]
Automated List Manager                           [hidden email]
Reply | Threaded
Open this post in threaded view
|

Re: OpenSSL stream interface for file encryption

Dr. Stephen Henson
On Tue, Sep 06, 2005, Dusty Hendrickson wrote:

> Does OpenSSL have a stream interface for file encryption?  For example, is
> there a stream-based method of encrypting a file in pieces rather than
> loading an entire file into memory?
>

Depends on what you mean by "file encryption".

If you mean S/MIME (PKCS#7) then that isn't supported at present.

If you mean general symmetric encryption then yes that is supported. You
simply call EVP_EncryptUpdate() in each piece and EVP_EncryptFinal() at the
end.

Steve.
--
Dr Stephen N. Henson. Email, S/MIME and PGP keys: see homepage
OpenSSL project core developer and freelance consultant.
Funding needed! Details on homepage.
Homepage: http://www.drh-consultancy.demon.co.uk
______________________________________________________________________
OpenSSL Project                                 http://www.openssl.org
User Support Mailing List                    [hidden email]
Automated List Manager                           [hidden email]