aes256cbc_encrypt

2009-10-28 Thread himas
tried to run my decryption func with test vectors and got not proper result -- CODE -- void aes256cbc_encrypt() { int i, outlen; unsigned char *outbuf = (unsigned char*)malloc(1024); unsigned char key[] = "00

Re: aes_256_cbc decryption

2009-10-27 Thread himas
Mounir IDRASSI wrote: > > Hi, > > There are two main mistakes in your code: > - The output of the MD5 is 16 bytes long but you are allocating 8 > bytes only. This will cause memory corruption. > - AES-256 expects the key to be 32-bytes long but you want to use an > MD5 digest as a key

aes_256_cbc decryption

2009-10-27 Thread himas
Hello, I wrote a source for encrypting and decrypting some text data with aes_256_cbc: -- CODE -- void aes256cbc_encrypt(char *text, char *hkey) { int i, outlen; unsigned char *outbuf = (unsigned char*)malloc(1024); unsigned char *inbuf = (unsigned char*)text; int