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!

RSA encryption between java (jce) and python (openssl)

843811Apr 1 2005
I am developing 2 applications, one in java, the other in python.

Over a socket, one app sends a public key, the other app receives it and responds w/ data encrypted using that public key. The first app then decrypts it using its private key.

I have gotten this to work where both apps are written in java using JCE, but when the app sending the public key ( and decrypting the data in response ) is written in python (using openssl), it doesn't work.

I was getting an error about the cipher text being too long for the key, so I wrote some code to split up the cipher text into blocks and decrypt each of them. Now I get an error w/ openssl about not being able to decrypt a block for some unknown reason.

I am really not sure how to do this? I am probably doing something wrong in both java w/ JCE and in python w/ openSSL.

I'd appreciate any examples you could provide.
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Apr 29 2005
Added on Apr 1 2005
0 comments
240 views