Announce two new product: SmartCard Reader Rockey200 and USB2.0 Extension Cable

ROCKEY 200 is a handy and portable USB Smart Card reader that can perform read/write operations on any ISO 7816-1/2/3/4 smart cards which are compatible with protocol T=0 and T=1.

USB2.0 Extension Cable With high speed USB 2.0 devices such as USB token ,USB Card Reader and so on.

Come to try it now!

How to compute the digital signature in this Applet?

This project implement the OpenPGP card functionality

Moderator: Ellisun

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

How to compute the digital signature in this Applet?

Postby 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: 41
Joined: Mon Jul 20, 2015 1:08 pm
Points: 374
Contact:

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

Postby 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: 628
Joined: Thu May 21, 2015 4:05 am
Points: 2979
Contact:

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

Postby 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: 45
Joined: Wed May 20, 2015 3:47 am
Points: 396
Contact:

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

Postby Ellisun » Fri Nov 27, 2015 5:48 am

You can refer to this topic.

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

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

Postby bigWhite » Sun Nov 29, 2015 11:47 pm

Ellisun wrote:You can refer to this topic.


Thanks, it very helpful to me


Return to “OpenPGPApplet”

Who is online

Users browsing this forum: No registered users and 1 guest

JavaCard OS : Disclaimer