Page 1 of 1

CMS digital signature with JavaCard

Posted: Wed Jan 13, 2016 5:25 am
by lostsiwonlw
I want to create a detached digital signature in standard format (CMS / CAdES-EPES).
I create hash from document (SHA-256), get hash algorithm ID and give it all into a message. Detached signature is generated for this message(RSA-512) and sent back. I can verify this signature using pure Java code:

Code: Select all

RSAPublicKey pubK = (RSAPublicKey) cert.getPublicKey();
Signature sig = Signature.getInstance("SHA256withRSA", "BC");
sig.initVerify(pubK);
//load signed file and update sig
...
sig.verify(signedMessage)


Now I need to get CMS(PKCS#7) signature from already signed data. But I don't know how!
Is there any way to get directly a CMS signature from JavaCard?

Re: CMS digital signature with JavaCard

Posted: Thu Jan 14, 2016 4:01 am
by rena2019
what is the use case of this algorithm?