Hello, 
>    Please can any one tell me how do I remove the pad bytes during
> AES decyrption using AES_cbc_encryption.

Provided that block_size is size of encryption algorithm block
size and last block is in dst you may use something like that: 

    .
    .
    pad = dst[block_size - 1];

    if (pad > block_size) {
        goto err;
    }

    for (i = 1; i < pad; i++) {
        if (dst[block_size - 1 - i] != pad) {
            goto err;
        }
    }
    len = block_size - pad;
    .
    .

Proper length is returned in len.

Best regards,
-- 
Marek Marcola <[EMAIL PROTECTED]>

______________________________________________________________________
OpenSSL Project                                 http://www.openssl.org
User Support Mailing List                    openssl-users@openssl.org
Automated List Manager                           [EMAIL PROTECTED]

Reply via email to