Hi,
I'm successfully using Java to encrypt data and OpenSSL to decrypt it.
The issue I'm having is that the decrypted file is left with the padding
bytes at the end. I can't figure out what I'm doing wrong.
-Parameters-
Algorithm: AES
Mode: CFB
Padding: PKCS5
Input file is 65373 bytes, the resulting cipher text after Java has
encrypted it is 65376 bytes.
Using OpenSSL to decrypt results in a file size of 65376 bytes. I can
clearly see the padding bytes at the end of the file (0x03 0x03 0x03).
If I use OpenSSL to encrypt the same file, it results in a file of 65373
bytes. I expected 65376 since 65373 is not a multiple of 128. Shouldn't
OpenSSL be padding the file?
Is Java or OpenSSL not doing its job correctly? I'm I supposed to strip
these bytes myself? I'm using openssl on the command line, is there an
option to pass to "openssl enc" ?
Thanks!
Philippe
______________________________________________________________________
OpenSSL Project http://www.openssl.org
User Support Mailing List [email protected]
Automated List Manager [email protected]