Skip to Main Content

Java Security

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

OpenSSL -> JCE interoperability on blowfish

843811Aug 9 2006
Hi all,

I have a severe problem doing blowfish encryption:

I use a program utilizing the openssl crypto library to encrypt some binary data with blowfish in CBC mode. Now I try to decrypt it on the java side using JCE (tried SunJCE and Bouncy Castle providers, both with the same (wrong) result) and another blowfish implementation (BlowfishJ), using a given key and iv (inputdata, key and iv are all binary approved to be correct).

The strange effect: the decrypted cleartext doesn't match the expected cleartext (just binary crap), when using a key length (on encryption as well as on decryption) > 128 bit (which is the default in openssl, I guess). Accoring to the openssl documentation and the algorithm specification it should support key lengths up to 448 bits. However encrypt/decrypt cycles within openssl work fine for any key length.

I would appreciate any help on this, because I really need to solve these issue!

Cheers,
Martin
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Sep 6 2006
Added on Aug 9 2006
0 comments
201 views