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

Re: [iaik-jce] Problem in deserializing a RSAPrivateKey Object



You should upgrade to 2.5 release version!

 Andreas Sterbenz              mailto:Andreas.Sterbenz@iaik.tu-graz.ac.at


-----Ursprüngliche Nachricht-----
Von: Paolo Sommaruga <psomma@porquerolles.garda-access.com>
An: <iaik-jce@iaik.tu-graz.ac.at>
Gesendet: Dienstag, 15. Juni 1999 15:27
Betreff: [iaik-jce] Problem in deserializing a RSAPrivateKey Object


> Hi,
>
> I am new to this mailing list.
> I have written an application that generate and serialize both
RSAPrivateKey and
> RSAPublicKey and another that load and deserialize them in order to
perform
> some String en/decrypt.
>
> The RSAPublicKey is successfully deserialize and I can use correctly it
> for encrypted. After deserialising the RSAPrivateKey with no any
exception, when
> I call
>
>   Cipher rsa_dec = Cipher.getInstance("RSA", "IAIK");
>   rsa_dec.init(Cipher.DECRYPT_MODE, this.KeyPri);
>
> I have the following
>
> Exception: java.security.InvalidKeyException: Not an RSA key.
> java.security.InvalidKeyException: Not an RSA key.
>         at iaik.pkcs.pkcs1.RSACipher.engineInit(Unknown Source)
>         at javax.crypto.Cipher.init(Unknown Source)
>         at CryptoLoad.<init>(CryptoLoad.java:50)
>         at CryptoLoad.main(CryptoLoad.java:117)
>
>
> Plataform: Sun Solaris 2.7 x386 with Sun JDK_1.1.7_08, IAIK-JCE
2.5beta1
>
> Have you some idea ?



smime.p7s