Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

ecdsa-revealing-the-private-key-from-four-signed-message-two-keys-and-shared-nonces

I have prepared 4 transactions for 2 pubkeys with the same r1 and r2. The curve is secp256k1.

properties curve secp256k1:

p = 0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffefffffc2f      # prime

n = 0xfffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141   # order of curve

E = EllipticCurve(GF(p), [0, 7])

G = E.point( (0x79be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798,0x483ada7726a3c4655da4fbfc0e1108a8fd17b448a68554199c47d08ffb10d4b8))   # Base point

It is according to: ecdsa-revealing-the-private-key-from-four-signed-message-two-keys-and-shared-nonces- link here: https://billatnapier.medium.com/ecdsa-revealing-the-private-key-from-four-signed-message-two-keys-and-shared-nonces-secp256k1-5758f1258b1d

It should work, but it doesn't.

I put transactions, nonces and privatekeys

Why can I not to take value private1 and private2?

It gives me value 0: please help

privkey1= 74151126465914553719682701372546590912032713247110001383204298192577238294259
privkey2= 65602009300807068992382438511465994464148703102269145684254988072233619429415

nonce1= 113430668354305125354139681412571553637810109882549088741100884487402919060793
nonce2= 88941376982568942091029320764989550225390065895384871037015643141890275775717


#transaction from first privkey1

r1= 37172049453198803628923372374682424137153412099188977901809252086397375163174
s1= 36665125934301679295764426496089959157670212057714313825462899262019004181013
z1= 45063904364969322573281122086971579379876583577391310824950725157431863085693

r2= 40974080779974461932858835766108658066940207003253964846620894290420102383124
s2= 88414683103569280491867470526894992004240909646745888824999991880846576153983
z2= 96925863066810859394685400246217607442326685412593308871569663983290139782035

##transaction from second privkey2

r1= 37172049453198803628923372374682424137153412099188977901809252086397375163174
s3= 48387795993880540164497955151292140905876432678370698441361372722465054520609
z3= 70890957235815785946608014568730757332857823983374044998781188028671033610413

r2= 40974080779974461932858835766108658066940207003253964846620894290420102383124
s4= 94479523762013111191490500533227932711756342618388816229238677867942525385058
z4= 88400657509035765824159536685234267382896518494653799783594906135509259195161

How to calculate, the above privatekey? if I use link : https://crypto.stackexchange.com/questions/80288/is-it-possible-to-decrypt-an-ecdsa-private-key-if-the-same-nonce-is-used-across?rq=1

I got result 0 for privkey1 and privkey2.

where is problem?

for another example everything works fine. but in above version is problem.

ecdsa-revealing-the-private-key-from-four-signed-message-two-keys-and-shared-nonces

I have prepared 4 transactions for 2 pubkeys with the same r1 and r2. The curve is secp256k1.

properties curve secp256k1:

p = 0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffefffffc2f      # prime

n = 0xfffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141   # order of curve

E = EllipticCurve(GF(p), [0, 7])

G = E.point( (0x79be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798,0x483ada7726a3c4655da4fbfc0e1108a8fd17b448a68554199c47d08ffb10d4b8))   # Base point

It is according to: ecdsa-revealing-the-private-key-from-four-signed-message-two-keys-and-shared-nonces- link here: https://billatnapier.medium.com/ecdsa-revealing-the-private-key-from-four-signed-message-two-keys-and-shared-nonces-secp256k1-5758f1258b1d

It should work, but it doesn't.

I put transactions, nonces and privatekeys

Why can I not to take I can't value private1 and private2?private2? - only value 0?

It gives me value 0: please help

privkey1= 74151126465914553719682701372546590912032713247110001383204298192577238294259
privkey2= 65602009300807068992382438511465994464148703102269145684254988072233619429415

nonce1= 113430668354305125354139681412571553637810109882549088741100884487402919060793
nonce2= 88941376982568942091029320764989550225390065895384871037015643141890275775717


#transaction from first privkey1

r1= 37172049453198803628923372374682424137153412099188977901809252086397375163174
s1= 36665125934301679295764426496089959157670212057714313825462899262019004181013
z1= 45063904364969322573281122086971579379876583577391310824950725157431863085693

r2= 40974080779974461932858835766108658066940207003253964846620894290420102383124
s2= 88414683103569280491867470526894992004240909646745888824999991880846576153983
z2= 96925863066810859394685400246217607442326685412593308871569663983290139782035

##transaction from second privkey2

r1= 37172049453198803628923372374682424137153412099188977901809252086397375163174
s3= 48387795993880540164497955151292140905876432678370698441361372722465054520609
z3= 70890957235815785946608014568730757332857823983374044998781188028671033610413

r2= 40974080779974461932858835766108658066940207003253964846620894290420102383124
s4= 94479523762013111191490500533227932711756342618388816229238677867942525385058
z4= 88400657509035765824159536685234267382896518494653799783594906135509259195161

How to calculate, the above privatekey? if I use link : https://crypto.stackexchange.com/questions/80288/is-it-possible-to-decrypt-an-ecdsa-private-key-if-the-same-nonce-is-used-across?rq=1

I got result 0 for privkey1 and privkey2.

where is problem?

for another example everything works fine. but in above version is problem.

click to hide/show revision 3
retagged

ecdsa-revealing-the-private-key-from-four-signed-message-two-keys-and-shared-nonces

I have prepared 4 transactions for 2 pubkeys with the same r1 and r2. The curve is secp256k1.

properties curve secp256k1:

p = 0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffefffffc2f      # prime

n = 0xfffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141   # order of curve

E = EllipticCurve(GF(p), [0, 7])

G = E.point( (0x79be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798,0x483ada7726a3c4655da4fbfc0e1108a8fd17b448a68554199c47d08ffb10d4b8))   # Base point

It is according to: ecdsa-revealing-the-private-key-from-four-signed-message-two-keys-and-shared-nonces- link here: https://billatnapier.medium.com/ecdsa-revealing-the-private-key-from-four-signed-message-two-keys-and-shared-nonces-secp256k1-5758f1258b1d

It should work, but it doesn't.

I put transactions, nonces and privatekeys

Why I can't value private1 and private2? - only value 0?

It gives me value 0: please help

privkey1= 74151126465914553719682701372546590912032713247110001383204298192577238294259
privkey2= 65602009300807068992382438511465994464148703102269145684254988072233619429415

nonce1= 113430668354305125354139681412571553637810109882549088741100884487402919060793
nonce2= 88941376982568942091029320764989550225390065895384871037015643141890275775717


#transaction from first privkey1

r1= 37172049453198803628923372374682424137153412099188977901809252086397375163174
s1= 36665125934301679295764426496089959157670212057714313825462899262019004181013
z1= 45063904364969322573281122086971579379876583577391310824950725157431863085693

r2= 40974080779974461932858835766108658066940207003253964846620894290420102383124
s2= 88414683103569280491867470526894992004240909646745888824999991880846576153983
z2= 96925863066810859394685400246217607442326685412593308871569663983290139782035

##transaction from second privkey2

r1= 37172049453198803628923372374682424137153412099188977901809252086397375163174
s3= 48387795993880540164497955151292140905876432678370698441361372722465054520609
z3= 70890957235815785946608014568730757332857823983374044998781188028671033610413

r2= 40974080779974461932858835766108658066940207003253964846620894290420102383124
s4= 94479523762013111191490500533227932711756342618388816229238677867942525385058
z4= 88400657509035765824159536685234267382896518494653799783594906135509259195161

How to calculate, the above privatekey? if I use link : https://crypto.stackexchange.com/questions/80288/is-it-possible-to-decrypt-an-ecdsa-private-key-if-the-same-nonce-is-used-across?rq=1

I got result 0 for privkey1 and privkey2.

where is problem?

for another example everything works fine. but in above version is problem.

click to hide/show revision 4
retagged

ecdsa-revealing-the-private-key-from-four-signed-message-two-keys-and-shared-nonces

I have prepared 4 transactions for 2 pubkeys with the same r1 and r2. The curve is secp256k1.

properties curve secp256k1:

p = 0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffefffffc2f      # prime

n = 0xfffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141   # order of curve

E = EllipticCurve(GF(p), [0, 7])

G = E.point( (0x79be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798,0x483ada7726a3c4655da4fbfc0e1108a8fd17b448a68554199c47d08ffb10d4b8))   # Base point

It is according to: ecdsa-revealing-the-private-key-from-four-signed-message-two-keys-and-shared-nonces- link here: https://billatnapier.medium.com/ecdsa-revealing-the-private-key-from-four-signed-message-two-keys-and-shared-nonces-secp256k1-5758f1258b1d

It should work, but it doesn't.

I put transactions, nonces and privatekeys

Why I can't value private1 and private2? - only value 0?

It gives me value 0: please help

privkey1= 74151126465914553719682701372546590912032713247110001383204298192577238294259
privkey2= 65602009300807068992382438511465994464148703102269145684254988072233619429415

nonce1= 113430668354305125354139681412571553637810109882549088741100884487402919060793
nonce2= 88941376982568942091029320764989550225390065895384871037015643141890275775717


#transaction from first privkey1

r1= 37172049453198803628923372374682424137153412099188977901809252086397375163174
s1= 36665125934301679295764426496089959157670212057714313825462899262019004181013
z1= 45063904364969322573281122086971579379876583577391310824950725157431863085693

r2= 40974080779974461932858835766108658066940207003253964846620894290420102383124
s2= 88414683103569280491867470526894992004240909646745888824999991880846576153983
z2= 96925863066810859394685400246217607442326685412593308871569663983290139782035

##transaction from second privkey2

r1= 37172049453198803628923372374682424137153412099188977901809252086397375163174
s3= 48387795993880540164497955151292140905876432678370698441361372722465054520609
z3= 70890957235815785946608014568730757332857823983374044998781188028671033610413

r2= 40974080779974461932858835766108658066940207003253964846620894290420102383124
s4= 94479523762013111191490500533227932711756342618388816229238677867942525385058
z4= 88400657509035765824159536685234267382896518494653799783594906135509259195161

How to calculate, the above privatekey? if I use link : https://crypto.stackexchange.com/questions/80288/is-it-possible-to-decrypt-an-ecdsa-private-key-if-the-same-nonce-is-used-across?rq=1

I got result 0 for privkey1 and privkey2.

where is problem?

for another example everything works fine. but in above version is problem.