It makes the response unambiguous.

If a 16 byte file was not padded, how does the receiver know whether the file was 16 bytes or 1-15 bytes plus padding.

By having at least one byte of padding, and (in some padding schemes) having the padding itself define the number of padding bits, one can always recover the length of the file.

On 3/19/2012 12:26 PM, Nicle wrote:

I can understand if file-size%16 != 0, openssl will pad data.

But it will also pad 16bytes for those file size exactly 16 times.

For example: original file size 16 bytes, cipher file size: 32 bytes.

______________________________________________________________________
OpenSSL Project                                 http://www.openssl.org
User Support Mailing List                    openssl-users@openssl.org
Automated List Manager                           majord...@openssl.org

Reply via email to