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

Re: [iaik-jce] Newbie and RSA



RSA and PKCS1Padding are not designed to do anything except encrypt short
random values (data encryption keys, signature hashes) and that is the
only thing our implementation supports.

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


-----Ursprüngliche Nachricht-----
Von: Prashanth Prabhu <prabhup@cs.purdue.edu>
An: <iaik-jce@iaik.tu-graz.ac.at>
Gesendet: Donnerstag, 11. November 1999 21:01
Betreff: [iaik-jce] Newbie and RSA


> HI
>
>  I am a relatively new user of IAIK. I have a problem with RSA
encryption.
>  Whenever the plaintext size is greater than 120 bytes I get a
>  BadPaddingException.
>
>  The code where I init the Cipher object is given below:
>
>      /* prime the cipher to encrypt with RSA */
>      cipher = Cipher.getInstance("RSA/ECB/NoPadding", "IAIK");
>      cipher.init(Cipher.ENCRYPT_MODE, rsaKeys.getPublic());
>
> /* encipher message into enc */
>      enc = cipher.doFinal(message);
>
>  Could anyone tell me how I can get around this problem?
>
>  Thanks in advance
>
> Regards
> Prashanth
>
>
>
> _________________________________________
>  "... A poor life this if, full of care,
>    We have no time to stand and stare"
>        - Leisure, W. H. Davies
>
>
> --
> 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
>
>
>


smime.p7s