jessie-discuss
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Jessie-discuss] Re: IllegalArgumentException in RSA decrypt


From: Casey Marshall
Subject: [Jessie-discuss] Re: IllegalArgumentException in RSA decrypt
Date: Wed, 30 Aug 2006 17:10:16 -0700
User-agent: Thunderbird 1.5.0.5 (Macintosh/20060719)

Sorry, I am unable to moderate this message; I've lost the
jessie-discuss admin password. I'll try to help, though.

Cripps, Kevin S (Kevin) wrote:
> Hello,
> 
> I am trying to use Jessie in conjunction with the Jetty Webserver.  I am
> currently encountering an exception when trying to establish a https
> connection (see below).  The exception is caused by a bounds check.  The
> upper bound comes from the modulus value in the GnuRSAPrivateKey (from
> the RSAPrivateCrtKeySpec).  The stored value is 0.  I have traced this
> back to a read from EncodedKeyFactory::engineInit().  The value being
> read is indeed 0 for the modulus, but other values passed into the
> RSAPrivateCrtKeySpec constructor are normal looking BigInteger values
> (they’re large integers anyway…).  I suspect that my keystore is not in
> a proper format for what Jessie is expecting, but I’m not quite sure how
> to debug the problem.  I am simply using the default keystore provided
> by Jetty, but have tried making my own as well with the same results.  I
> have turned on DEBUG_KEY_EXCHANGE and DEBUG_HANDSHAKE_LAYER debugging
> and included some of those logs below.  Any help would be greatly
> appreciated.
> 

One thing you should also be aware of is that we've merged Jessie (and
GNU Crypto) into GNU Classpath, and we'll be maintaining both there from
now on. These packages are just compiled as providers for Classpath, and
it is possible to just use them independently. Some work has been done
so that the providers can be compiled into a separate Jar file.

You can dump out the value of the encoded key (in the
PKCS8EncodedKeySpec, passed to EncodedKeyFactory) and parse it with
'openssl asn1parse'. This may give a clue as to why the key isn't being
parsed correctly. This keystore is publicly available with Jetty, right?
I may give it a try myself if I have the time.

What versions of Jessie and GNU Crypto are you using? What Java
runtime/class library? I think EncodedKeyFactory is a part of Classpath,
but that class has changed a *lot* recently, so it's hard to tell where
the bug is.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]