RE: Decryption wrong when seeking into a file.

2002-03-12 Thread David Schwartz
On Mon, 11 Mar 2002 17:37:43 -0500, Bailey, Lorenzo wrote: >lol. Yes , there would be a one-to-one mapping. The data is semi-sensitive. >However, I gave up trying to allow a user to use the original 'seekg' method >for file streams. You are right , if I tried to encrypt\decrypt data a byte >out o

Re: Decryption wrong when seeking into a file.

2002-03-11 Thread Michael Sierchio
1) Never reuse keys; use a new key for each file. This is true whether you use a stream or block cipher. Never use a block cipher in ECB mode for encrypting files. etc. etc. 2) There are numerous schemes that support random file access while encrypting. With block c

Re: Decryption wrong when seeking into a file.

2002-03-11 Thread Joerg Bartholdt
Lorenzo wrote: > I have a quick question to ask. I'm using the EVP_EncryptInit and > EVP_DecryptInit functions to stream data to a file. Basically, I > encrypt data , one byte at a time, which is in the put area of my > filebuf object and send it out. I When I get data from the file, I > decr