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 of time, it would be trivial to crack. I decided to encrypt the data in
>what ever chunks the 'filebuf' class sends data to files in. That should
>ensure that the data can not be broken into(at least not easily, since I
>have a 128 bit key). 'seekg(x)' basically sets the file handle to the
>specified offset in the file. Thus, when you do a read, you will read from
>that offset. Since decryption breaks when I try to seek to a specific offset
>in the file, I override the seekg(x) method in the filebuf(streambuf) class
>and just save the offset the user wants. On the following read, once the
>data is decrypted , I just jump to the saved offset in the data. It works
>like a charm.  

        Okay, so next, do you understand how to use RC5 safely? That is, do you 
understand why you must never, ever use the same key more than once?

        By the way, nobody could anticipate every mistake you could possibly make. 
Encryption software to protect semi-sensitive data, unfortunately, must be 
written by experts in the field. It's much like building a bridge, you have 
to get every detail right or it will collapse, and not until much later when 
you put the most weight on it.

        DS


______________________________________________________________________
OpenSSL Project                                 http://www.openssl.org
User Support Mailing List                    [EMAIL PROTECTED]
Automated List Manager                           [EMAIL PROTECTED]

Reply via email to