Skip to Main Content

Java Card

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

ECDSA signatures with same data and private key produces bad signature

smarty_card_pantsAug 22 2011 — edited Jan 12 2017
I have created an EC key pair and retained it on the smart card. I then generate an ECDSA signature over and over on the "same" data using the "same" EC private key. Each signature comes back different from the previous one. Can anyone advise me on this issue? Here is the code:

Signature sig1 = Signature.getInstance(Signature.ALG_ECDSA_SHA, false);

sig1.init(myECPrivateKey);

short signatureLength = sig1.sign(inputData, (short) 0,
inputDataLength, signatureBuffer, (short) 0);

sendManyBytes(apdu, signatureBuffer, (short) 0, signatureLength);

Note: I have verified that the same private key is being used on subsequent calls and have also verified that the data and its length are the same.

Edited by: smarty_card_pants on Aug 22, 2011 12:54 PM
This post has been answered by safarmer on Aug 23 2011
Jump to Answer
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Sep 20 2011
Added on Aug 22 2011
5 comments
2,445 views