JavacardOS will not accept order any more, please contact our partner Feitian online Store:
https://ftsafe.en.alibaba.com/index.html

How to compute the digital signature in this Applet?

This project implement the OpenPGP card functionality

Moderator: Ellisun

bigWhite
Posts: 35
Joined: Tue Aug 25, 2015 8:21 am
Points :504
Contact:

How to compute the digital signature in this Applet?

Post by bigWhite » Sat Nov 21, 2015 6:04 am

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);

ThePhoenyx
Posts: 54
Joined: Mon Jul 20, 2015 1:08 pm
Points :510
Contact:

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

Post by ThePhoenyx » Mon Nov 23, 2015 2:10 pm

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.
The world is full of stories;
And sometimes they permit themselves to be told.
~Cherokee Proverb

User avatar
UNKNwYSHSA
Posts: 630
Joined: Thu May 21, 2015 4:05 am
Points :3055
Contact:

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

Post by UNKNwYSHSA » Tue Nov 24, 2015 4:32 am

Please look the code of the key initialization, the function genKeyPair() shall be called before the key used.
sense and simplicity

User avatar
Ellisun
Posts: 50
Joined: Wed May 20, 2015 3:47 am
Points :472
Contact:

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

Post by Ellisun » Fri Nov 27, 2015 5:48 am

You can refer to this topic.

bigWhite
Posts: 35
Joined: Tue Aug 25, 2015 8:21 am
Points :504
Contact:

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

Post by bigWhite » Sun Nov 29, 2015 11:47 pm

Ellisun wrote:You can refer to this topic.


Thanks, it very helpful to me

Post Reply Previous topicNext topic

Who is online

Users browsing this forum: No registered users and 21 guests

JavaCard OS : Disclaimer