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

Re: [iaik-jce] signing data with RSA




Hi Ronen,

if you do Cipher.getInstance("RSA", "IAIK"); I guess you get PKCS#1
Padding.

The following give raw RSA for sure: Cipher.getInstance
("RSA/ECB/NoPadding", "IAIK");

Cheers, Stef




Hi all,

Please correct me if I'm wrong:
In order to sign a "raw" data, i.e. without digesting it while signing it
with RSA, all I have to do is:

// 'data' holds a digested data
Cipher sig= Cipher.getInstance ("RSA", "IAIK");
sig.init (Cipher.ENCRYPT_MODE, _private_key);
byte[] signed = sig.doFinal (data); // data is byte[]
// now 'signed' holds the signature.

Am I missing something here? Is there any "wrapping the digest into a
DigestInfo object" involved?

Thanks a lot,
Ronen.
--
Mailinglist-archive at
http://jcewww.iaik.at/mailarchive/iaik-jce/jcethreads.html

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




--
Mailinglist-archive at http://jcewww.iaik.at/mailarchive/iaik-jce/jcethreads.html

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