I use that function, and it does not remove padding.

1 - How would it even know what is padding and what is your data?
2 - Why do you think it removes the padding?  The function does
      not return a length.

Here's a really wild guess:  Are you perhaps padding your data with
zeros and then using strlen() to determine the length of the result?

owner-openssl-us...@openssl.org wrote on 05/06/2009 05:53:27 PM:

> AngelWarrior <srikanth.bemin...@gmail.com>

>
> But I am experimenting with the code which is actually removing the
> padding by calling
> AES_cbc_encrypt(unsigned char*)input, (unsigned char*)(output),
>                          (const unsigned long)(length), &ks,
> (unsigned char*)ivec, AES_DECRYPT).
> What is EVP layer?

> On Wed, May 6, 2009 at 3:45 PM, Dr. Stephen Henson <st...@openssl.org>
wrote:
> On Wed, May 06, 2009, AngelWarrior wrote:
>
> > Hi,
> >
> > Does AES_cbc_encrypt add or remove the padding, if I provide an
un-padded
> > data in the multiples of 16 bytes? I wrote a piece code where I am
manually
> > adding the padding but when I decrypt using AES_cbc_encrypt the padding
is
> > automatically removed.
> >

> None of the low level cipher routines including AES_cbc_encrypt() add or
> remove padding. That is handled in the EVP layer.

Reply via email to