Hi,
I have problem with AES_cbc_encrypt function. I use code you can see below
and unfortunately my function that compares arrays gives an error. The data
from in3 and tmp3 looks similar, but there is a difference on first 16
bytes. Any idea what is going on?
Thank you for your help!!
Best regards,
Koza
Code:
AES_KEY akey;
unsigned char in3[48];
unsigned char out3[48];
unsigned char tmp3[48];
unsigned char ivec[16];
AES_set_encrypt_key(key2,256,&akey);
AES_cbc_encrypt(in3,out3,48,&akey,ivec,1);
AES_set_decrypt_key(key2,256,&akey);
AES_cbc_encrypt(out3,tmp3,48,&akey,ivec,0);
if (comparearrays(in3,tmp3,48)<0) {printf("\nError!\n");return 0;}
//error all the time! first 16 bytes different!
return 0;
--
View this message in context:
http://www.nabble.com/AES_cbc_encrypt---data-differs-on-first-16-bytes.-tf4678114.html#a13366365
Sent from the OpenSSL - User mailing list archive at Nabble.com.
______________________________________________________________________
OpenSSL Project http://www.openssl.org
User Support Mailing List [email protected]
Automated List Manager [EMAIL PROTECTED]