AES 256 inconsistencies and errors across platforms
---------------------------------------------------

                 Key: JRUBY-4326
                 URL: http://jira.codehaus.org/browse/JRUBY-4326
             Project: JRuby
          Issue Type: Bug
          Components: OpenSSL
    Affects Versions: JRuby-OpenSSL 0.5.2, JRuby-OpenSSL 0.5.3
         Environment: Amazon EC2 small instance running Ubuntu 8.04
            Reporter: Michael Rykov
             Fix For: JRuby-OpenSSL 0.5.3
         Attachments: openssl-test.rb

I'm seeing inconsistencies and errors in encrypting/decrypting with 
jruby-openssl on my EC2 instance.  However, everything works fine on my Mac.

OSX 10.6.2 -- All is well here
{code}
$ java -version
java version "1.6.0_17"
Java(TM) SE Runtime Environment (build 1.6.0_17-b04-248-10M3025)
Java HotSpot(TM) 64-Bit Server VM (build 14.3-b01-101, mixed mode)

$ ruby -v
ruby 1.8.7 (2008-08-11 patchlevel 72) [universal-darwin10.0]

$ ruby ./openssl-test.rb 
dF5wf1txacDI8THpPchSow==
hello world

$ jruby -v
jruby 1.4.0 (ruby 1.8.7 patchlevel 174) (2009-11-02 69fbfa3) (Java HotSpot(TM) 
64-Bit Server VM 1.6.0_17) [x86_64-java]

$ jgem list | grep openssl
jruby-openssl (0.5.2)

$ jruby ./openssl-test.rb 
dF5wf1txacDI8THpPchSow==
hello world

.. snip jruby-openssl upgrade ..

$ jgem list | grep openssl
jruby-openssl (0.6)

$ jruby ./openssl-test.rb 
dF5wf1txacDI8THpPchSow==
hello world
{code}

Ubuntu 8.04 on EC2 - MRI works fine, but both 0.5.2 and 0.6.0 versions of 
jRuby-OpenSSL product bad results
{code}
$ java -version
java version "1.6.0_17"
Java(TM) SE Runtime Environment (build 1.6.0_17-b04)
Java HotSpot(TM) Client VM (build 14.3-b01, mixed mode, sharing)

$ ruby -v
ruby 1.8.6 (2007-09-24 patchlevel 111) [i486-linux]

$ ruby ./openssl-test.rb 
dF5wf1txacDI8THpPchSow==
hello world

$ ./jruby -v
jruby 1.4.0 (ruby 1.8.7 patchlevel 174) (2009-11-02 69fbfa3) (Java HotSpot(TM) 
Client VM 1.6.0_17) [i386-java]

$ ./jruby -S gem list | grep openssl
jruby-openssl (0.5.2)

$ ./jruby ./openssl-test.rb 
bTpKPcb5aXzjVnSpRoIc/Q==
hello world

.. snip jruby-openssl upgrade ..

$ ./jruby -S gem list | grep openssl
jruby-openssl (0.6)

$ ./jruby ./openssl-test.rb 
./openssl-test.rb:11: Illegal key size (OpenSSL::Cipher::CipherError)
{code}

Please note that in addition to the 0.6.0 error, the encrypted string for 0.5.2 
is incorrect

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email


Reply via email to