Hi,
When I encrypt a large chunk of data (in my case 12220 bytes) the first 8
bytes of that data cannot be encrypted and decrypted again properly.
They are garbage.
The routines I use are the following :
// read a file in an unsigned char * cbc_data
// Length = number of bytes read
// cbc_out, cbc_in are of size Length
// First 16 bytes of plaintext look like this
// 0The quick brown
des_ede3_cbc_encrypt(cbc_data, cbc_out, Length, ks, ks2, ks3, &iv3,
DES_ENCRYPT)
des_ede3_cbc_encrypt(cbc_out, cbc_in, Length, ks, ks2, ks3, &iv3,
DES_DECRYPT)
// The First 16 bytes of decrypted text look like this
// ?-?-?-?-ck brown
// ?-?-?-?- is garbage
Any help is appreciated.
PS: what does the iv3 do exactly ??
With kind regards,
Thijs.
______________________________________________________________________
OpenSSL Project http://www.openssl.org
User Support Mailing List [EMAIL PROTECTED]
Automated List Manager [EMAIL PROTECTED]