RE: openssl AES decrypt problem

2012-12-13 Thread Dave Thompson
>From: owner-openssl-us...@openssl.org On Behalf Of Hailei Hu >Sent: Thursday, 13 December, 2012 06:27 >Thanks to your reply. >The first solution: >"you can set the length parameter on the decrypt operation to be 16 which will >provide you with a result that is your original 10 bytes plus 6 bytes

Re: openssl AES decrypt problem

2012-12-12 Thread engineereeyore
adding" in your structure. This can be done using the function EVP_CIPHER_CTX_set_padding. Set the padding parameter to zero and your output should always be the same length as your inputs. Hope that helps. -- View this message in context: http://openssl.6102.n7.nabble.com/openssl-AES-

Re: openssl AES decrypt problem

2012-12-12 Thread Ken Goldman
A typical method is to use PKCS#7 padding. On 12/12/2012 9:07 AM, Hailei Hu wrote: Hi, everyone! I am testing openssl AES encrypt and decrypt using AES_cbc_encrypt. for example, I have a file which has 10 bytes, after using AES_cbc_encrypt, the encrypted file become 16 bytes. But when