tags:

views:

95

answers:

2

I need to decrypt a AES-256-EAX encrypted string from Java in Ruby. Ruby's built-in OpenSSL::Cipher provides functionality to decrypt AES-256-CBC, when I try to use AES-256-EAX, its throwing that the algorithm is not supported.

Is there any library/gem out there that decrypts AES-256-EAX string in Ruby?

Thanks in advance.

A: 

Are you sure that you got the right cipher string ? Googling for "AES-256-EAX" does yield only 8 hits for me and I've never heard of it before. And if OpenSSL doesn't support it you are out if luck, I guess.

DarkDust
Yes, AES (algorithm) 256 (key-length) and EAX (mode), AES-256-EAX is correct and its possible to decrypt in JAVA. I am trying to find if there is any gem/library that has implemented that in Ruby.
satynos
EAX is a mode for block ciphers, such as AES (http://en.wikipedia.org/wiki/EAX_mode). It's not that common, probably why it is not part of OpenSSL. You can put your own decryptor together using just the AES cipher.
Max Caceres
A: 

Is it possible for you to run your ruby code with jruby ? In this case you could use the java lib inside ruby code to decrypt your string.

Riba
Unfortunately, its not possible, which is why I am trying find the ruby alternatives to that I could re-implement our code in Ruby.
satynos