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

[iaik-jce] signing data with RSA



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