RSA encryption between java (jce) and python (openssl)
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.