<p>Edited: changing the notation according request by fgrieu.</p>
<p>I have prepared 4 transactions for 2 pubkeys with the same r1 and r2.</p>
<p>properties of secp256k1:</p>
<pre><code>p = 0xfffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141   # order of curve
</code></pre>
<p>It is according to: ecdsa-revealing-the-private-key-from-four-signed-message-two-keys-and-shared-nonces- link here: <a href="https://billatnapier.medium.com/ecdsa-revealing-the-private-key-from-four-signed-message-two-keys-and-shared-nonces-secp256k1-5758f1258b1d" rel="nofollow noreferrer">https://billatnapier.medium.com/ecdsa-revealing-the-private-key-from-four-signed-message-two-keys-and-shared-nonces-secp256k1-5758f1258b1d</a></p>
<p>It should work, but it doesn't.</p>
<p>I put transactions, nonces and privatekeys</p>
<p>Why can I not to take value private1 and private2?</p>
<p>It gives me value 0: please help</p>
<pre><code>privkey1= 74151126465914553719682701372546590912032713247110001383204298192577238294259
privkey2= 65602009300807068992382438511465994464148703102269145684254988072233619429415

nonce1= 113430668354305125354139681412571553637810109882549088741100884487402919060793
nonce2= 88941376982568942091029320764989550225390065895384871037015643141890275775717

signature matches
#transaction from first privkey1

r1= 37172049453198803628923372374682424137153412099188977901809252086397375163174
s1= 36665125934301679295764426496089959157670212057714313825462899262019004181013
h1= 45063904364969322573281122086971579379876583577391310824950725157431863085693

r2= 40974080779974461932858835766108658066940207003253964846620894290420102383124
s3= 88414683103569280491867470526894992004240909646745888824999991880846576153983
h3= 96925863066810859394685400246217607442326685412593308871569663983290139782035

##transaction from second privkey2

r1= 37172049453198803628923372374682424137153412099188977901809252086397375163174
s2= 48387795993880540164497955151292140905876432678370698441361372722465054520609
h2= 70890957235815785946608014568730757332857823983374044998781188028671033610413

r2= 40974080779974461932858835766108658066940207003253964846620894290420102383124
s4= 94479523762013111191490500533227932711756342618388816229238677867942525385058
h4= 88400657509035765824159536685234267382896518494653799783594906135509259195161
</code></pre>
<p>How to calculate, the above privatekey? if I use link : Is it possible to decrypt an ECDSA private key if the same nonce is used across different private keys?</p>
<p>I got result 0 for privkey1 and privkey2.</p>
<p>where is problem?</p>
<p>for another example everything works fine. but in above version is problem.</p>

CC BY-SA 4.0
2023-02-23T05:18:55.643Z
It is only possible to recover a private key with reused nonces if the same private key signs with the same nonce. If two different keys use the same nonce you cannot recover anything across the signatures as they are computed from disparate secret keys. like If i took the value 5 and multiplied it by 10 and then took 6 and multiplied it by 10 I would not know anything from subtracting 60 - 50. But if I (repeat) then took the value 5 and multiplied it by 11 the second time and you knew my signatures were 50 50 and 55 and the nonce was 10 10 and 11 you can see that the original value was 5
Poseidon
CC BY-SA 4.0
2023-02-23T05:25:18.690Z
This example I made also does not take into account the nonce at all as its just an example of how you cant reduce the two disparate elements to one secret element. In the actual signature there are nonces that are deterministic as to not be reused.
Poseidon
<ecdsa><secp256k1><math>
secp256k1, reused nonce across two differents pubkeys
Ironic
# secp256k1, reused nonce across two differents pubkeys

(Asked by: username_0 on 2023-02-21)

Edited: changing the notation according request by fgrieu.

I have prepared 4 transactions for 2 pubkeys with the same r1 and r2.

properties of secp256k1:

```
p = 0xfffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141   # order of curve

```

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

signature matches
#transaction from first privkey1

r1= 37172049453198803628923372374682424137153412099188977901809252086397375163174
s1= 36665125934301679295764426496089959157670212057714313825462899262019004181013
h1= 45063904364969322573281122086971579379876583577391310824950725157431863085693

r2= 40974080779974461932858835766108658066940207003253964846620894290420102383124
s3= 88414683103569280491867470526894992004240909646745888824999991880846576153983
h3= 96925863066810859394685400246217607442326685412593308871569663983290139782035

##transaction from second privkey2

r1= 37172049453198803628923372374682424137153412099188977901809252086397375163174
s2= 48387795993880540164497955151292140905876432678370698441361372722465054520609
h2= 70890957235815785946608014568730757332857823983374044998781188028671033610413

r2= 40974080779974461932858835766108658066940207003253964846620894290420102383124
s4= 94479523762013111191490500533227932711756342618388816229238677867942525385058
h4= 88400657509035765824159536685234267382896518494653799783594906135509259195161

```

How to calculate, the above privatekey? if I use link : Is it possible to decrypt an ECDSA private key if the same nonce is used across different private keys?

I got result 0 for privkey1 and privkey2.

where is problem?

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

**Tags:** ecdsa, secp256k1, math

> **Comments:**
> **username_1**: It is only possible to recover a private key with reused nonces if the same private key signs with the same nonce. If two different keys use the same nonce you cannot recover anything across the signatures as they are computed from disparate secret keys. like If i took the value 5 and multiplied it by 10 and then took 6 and multiplied it by 10 I would not know anything from subtracting 60 - 50. But if I (repeat) then took the value 5 and multiplied it by 11 the second time and you knew my signatures were 50 50 and 55 and the nonce was 10 10 and 11 you can see that the original value was 5  
> **username_1**: This example I made also does not take into account the nonce at all as its just an example of how you cant reduce the two disparate elements to one secret element. In the actual signature there are nonces that are deterministic as to not be reused.  

---

## 0 answers

