Jim Wong wrote:
I'm developing an application in which we're using AES to encrypt files as they're transferred from another system and saved to disk. We'd like to provide the ability for the application to resume a transfer that was interrupted mid-stream, but the encryption throws a bit of a wrench into things because of the state associated with the encryption context. Is there a safe, supported way to stash the context somewhere on disk so that encryption can be resumed where it left off when the file transfer starts up again? We're currently looking at the EVP functions; would we have to drop down to the lower-level, algorithm-specific routines to do this right?
If you use the CBC or the CFB cipher mode, you can use the last cipher block written to the disk as IV (that means, before the restart point) for a call to EVP_EncryptInit at the restart of data transmission. Another possibility would be to implement counter mode on top of ECB, here should a restart also be simple.
Ciao, Richard Könning -- Dr. Richard W. Könning Fujitsu Siemens Computers GmbH ______________________________________________________________________ OpenSSL Project http://www.openssl.org User Support Mailing List openssl-users@openssl.org Automated List Manager [EMAIL PROTECTED]