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

Re: [iaik-jce] PrivateKey Interpretation problem



Hi 

BTW, there is a iaik.utils.SSLPrivateKey

But when I try to use it, it gives me "No SSLeay PrivateKey"

Has anybody tried this utility?

thanks

_srilekha

> On Fri, 11 Jun 1999, David Taylor wrote:
> 
> > 
> > 
> > >I am trying to read the RSAPrivateKey generated by Eric Young's SSLeay
> > >library from IAIK_JCE and it gives me the following error:
> > 
> > >"Unable to decode private key: java.security.InvalidKeyException: Can't
> > >parse PublicKeyInfo."
> > 
> > SSLeay saves private keys in a DER encoded PKCS-1 RSAPrivateKey structure,
> > not a DER encoded PKCS-8 PrivateKeyInfo structure. If the private key is
> > encrypted it is done so according to PEM rules, not PKCS-8 rules.
> > 
> > To create a Java private key from an SSLeay saved private key, you must
> > decrypt the key data (if necessary), parse the DER encoding to get the 8
> > INTEGER values and use them to create an RSAPrivateCrtKeySpec. Then pass
> > that into an RSA key factory with generatePrivate().
> > 
> > A question: why is IAIK trying to parse a PublicKeyInfo structure if you're
> > trying to decode a private key?
> > 
> > Regards,
> > David Taylor
> > FORGE Research.
> > 
> > 
> > 
> 
> --
> Mailinglist-archive at http://jcewww.iaik.tu-graz.ac.at/mailarchive/iaik-jce/maillist.html
> 
> To unsubscribe send an email to listserv@iaik.tu-graz.ac.at with the folowing content: UNSUBSCRIBE iaik-jce
>  
> 

--
Mailinglist-archive at http://jcewww.iaik.tu-graz.ac.at/mailarchive/iaik-jce/maillist.html

To unsubscribe send an email to listserv@iaik.tu-graz.ac.at with the folowing content: UNSUBSCRIBE iaik-jce