you can use option -nopad, if your blocking allows it.
At least I circumvent the same problem in the opposite direction , when 
encrypting on a mainframe system and decrypting with OpenSSL

Kind regards/ Mit freundlichen Grüssen /Salutacions cordials /Cordiali 
saluti/Cumprimentos/S pozdravem

Peter Byldner
IT Specialist
IBM Business Services




Lidia Fernández <[EMAIL PROTECTED]> 
Sent by: [EMAIL PROTECTED]
21.11.2007 13:22
Please respond to
openssl-users@openssl.org


To
OpenSSL <openssl-users@openssl.org>
cc

Subject
What Padding does OpenSSL use??






I have to encrypt a file in c with openssl and then i have to decrypt in 
Java.

In Java i use to decrypt the algorithm

    Cipher cipher = Cipher.getInstance("DES/ECB/PKCS5Padding");

With OpenSSL i use

    openssl enc -a -des-ecb -in file -out file.enc -pass pass:abcdefgh

but i have an error message in Java that say

    javax.crypto.BadPaddingException: Given final block not properly 
padded


What padding does OpenSSL use??? How can i specify the padding??

Thank, Lidia

-- 
*******************************************************************
LIDIA FERNANDEZ CARPES
Departamento de Ingenieria de la Informacion y las Comunicaciones
Facultad de Informatica
Universidad de Murcia. Campus de Espinardo
30080 Murcia (SPAIN)
Tel.: +34 968 364644
Fax:  +34 968 364151
email: [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