views:

66

answers:

1

Hello,

I'm working on a project with a friend. He's implementing his software in Ruby and I'm doing my stuff in Scala (with Lift). We're using some asynchronous encryption and he is using the ruby OpenSSL bindings for that:

 key = OpenSSL::PKey::RSA.generate(4096)
 self.public_key = key.public_key
 self.private_key = key

What I'm looking for is a simple API which is compatible to OpenSSL and runs on the JVM. I need it to create key-pairs and to encrypt and sign our payload. Do you have any suggestions?

A: 

How about using the API available in the JDK? javax.crypto.*

A college has been using it for SSL related stuff (using a cert and RSA keys).

Have a look at the Java API docs.

gpampara
I looked at the API and managed to create a keypair. I didn't find any methods to take an openSSL key (DER-format) as a string and create a keypair from it or take my Java/Scala generated keypair and create a string in DER-format from it.
pfleidi