Post
Topic
Board Development & Technical Discussion
Merits 3 from 3 users
Re: Bitcoin weak transaction nonce question
by
Coding Enthusiast
on 07/12/2019, 19:41:48 UTC
⭐ Merited by piotr_n (1) ,Heisenberg_Hunter (1) ,ETFbitcoin (1)
What would it be, if the same s is re-used in the formula, but the r's are different?

s = (h+r*P)/k

h=hash
P=privateKey
k=nonce

If s is to be equal, then r, k and h must be the same.

Not true. If f(x)=a+b=12 then (a,b) can be (0,12), (1,11), (2,10),...
Things aren't different for modular arithmetic. Here is an example:

s = k-1 * (e + r*key) % N
N=17

e=4; key=7; k=1; r=7 => s=2
e=4; key=7; k=2; r=0 => s=2
e=4; key=7; k=3; r=10 => s=2

e=12; key=3; k=1; r=8 => s=2
e=12; key=3; k=2; r=3 => s=2
e=12; key=3; k=3; r=15=> s=2

e=12; key=10; k=1; r=16=> s=2