tragic on Nostr: Sure. Schnorr signatures take a nonce `k` and a challenge `e` and produce a signature ...
Sure. Schnorr signatures take a nonce `k` and a challenge `e` and produce a signature by computing:
s = k + e*a
, where a is the private key of the signer and the number we want to find.
The problem gave 2 signatures, which give a ssytem of linear congruences:
s_1 = k_1 + e_1*a (mod p)
s_2 = k_2 + e_2*a (mod p)
Since we know that the difference between k_2 and k_1 is 7, the system is suddenly determined and we can subtract equation 2 from equation 1:
s_2 - s_1 = k_2 - k_1 + e_2*a - e_1*a (mod p)
Now we know k_2-k_1 so:
s_2 - s_1 = k_delta + e_2*a - e_1*a (mod p)
And solve for a:
a = (s_2-s_1 - k_delta) * (e_2-e_1)^-1 (mod p)
Where ^-1 is the modular inverse.
waxwing (nprofile…rdgc) anotther fun challenge could be cracking the private key when the k are given by a predictable random number generator!
s = k + e*a
, where a is the private key of the signer and the number we want to find.
The problem gave 2 signatures, which give a ssytem of linear congruences:
s_1 = k_1 + e_1*a (mod p)
s_2 = k_2 + e_2*a (mod p)
Since we know that the difference between k_2 and k_1 is 7, the system is suddenly determined and we can subtract equation 2 from equation 1:
s_2 - s_1 = k_2 - k_1 + e_2*a - e_1*a (mod p)
Now we know k_2-k_1 so:
s_2 - s_1 = k_delta + e_2*a - e_1*a (mod p)
And solve for a:
a = (s_2-s_1 - k_delta) * (e_2-e_1)^-1 (mod p)
Where ^-1 is the modular inverse.
waxwing (nprofile…rdgc) anotther fun challenge could be cracking the private key when the k are given by a predictable random number generator!