You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I modified the message-signing test script to sign the same message twice:
# select the keycard applet
keycard-select
# set the secrets we had from the initialization
keycard-set-secrets 299324 894466013569 Cg3qEnS5M3XbKm7U
# pairing is usually done once per device
keycard-pair
keycard-open-secure-channel
keycard-verify-pin {{ session_pin }}
# sign a message
keycard-sign-message hello
keycard-sign-message hello
# we unpair the current device so that we don't use one of the 5 available slots.
keycard-unpair {{ session_pairing_index }}
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.
The text was updated successfully, but these errors were encountered:
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.
The text was updated successfully, but these errors were encountered: