Closed gballet closed 2 years ago
Hi @bitgamma could you comment on that?
the ECDSA algorithm is not inherenthly deterministic, since there is a value (called k) which can be generated randomly. Generating different, yet valid, signature it completely normal and expected.
Since some dApps came to rely on the fact that most implementation of ECDSA generate k in a deterministic way instead of random, we are working on a deterministic version of ECDSA as well.
I modified the message-signing test script to sign the same message twice:
I would expect the signature to be the same, that is not so:
I'm wondering how that can be? Is it that it will derive a new key each time that sign is called? I haven't touched the codebase in over 2 years so I could very possibly have forgotten some details. In any case, the signature should be the same each time, though, if the signed message is the same.
I have observed the same behavior in geth with p1=0 and p2=0, so I believe the issue is in the keycard applet, or at least in the way both geth and keycard-cli understand the protocol.