Page 1 of 1

How to compute the digital signature in this Applet?

Posted: Sat Nov 21, 2015 6:04 am
by bigWhite
I'm a beginner of javacard, and study this applet. I want to sign a data, but no matte what I send the APDU command, it always returns 0x6985, this is why?

And I already send verify command before signature .

It throws Exception in here:

Code: Select all

if (!sig_key.getPrivate().isInitialized())
         ISOException.throwIt(SW_CONDITIONS_NOT_SATISFIED);

Re: How to compute the digital signature in this Applet?

Posted: Mon Nov 23, 2015 2:10 pm
by ThePhoenyx
You have done a verify but have you created the RSA keys (public/private) for the 3 functions (being sign/encrypt/authenticate)?
What the error is, it's telling you no key is there.

Re: How to compute the digital signature in this Applet?

Posted: Tue Nov 24, 2015 4:32 am
by UNKNwYSHSA
Please look the code of the key initialization, the function genKeyPair() shall be called before the key used.

Re: How to compute the digital signature in this Applet?

Posted: Fri Nov 27, 2015 5:48 am
by Ellisun
You can refer to this topic.

Re: How to compute the digital signature in this Applet?

Posted: Sun Nov 29, 2015 11:47 pm
by bigWhite
Ellisun wrote:You can refer to this topic.


Thanks, it very helpful to me