ECDSA signatures with same data and private key produces bad signature
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