Replying to Avatar x

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.

nostr:nprofile1qqsxwkuyle67y94tj378gw8w2xw2wa6nwmwlqhddlwnz0z7sztsaw2qn2rdgc anotther fun challenge could be cracking the private key when the k are given by a predictable random number generator!

Avatar
YODL 1y ago

Thanks for posting. I used similar approach but somehow got formula wrong

Reply to this note

Please Login to reply.

Discussion

No replies yet.