ecdsa – Can a signer recuperate their very own signature’s nonce `ok`?

on

|

views

and

comments


Sure, a signer can recuperate their very own nonce.

Be z a hash of a message to signal, d a personal key, G the generator level of secp256k1, n the integer order of G. An ECDSA signature {r, s} is generated as follows:

  1. Choose a random integer nonce ok from [1, n-1]
  2. Calculate its curve level (x1, y1) = ok × G
  3. r = x1 mod n
  4. s = ok-1(z + rd)

Because the {z, r, d, s} are recognized to the signer, the signer can recuperate the ok from their very own signature.

  1. ok = s-1(d × r + z)

The signer is now offered with a overseas signature {r,s2} for the hash of a second message z2 that makes use of the identical r as their very own signature. Since r derives instantly from ok, the opposite signature will need to have been created utilizing the identical nonce ok because the signer used.

Utilizing this, they’ll calculate the personal key used within the different signature, given the general public info {r, s2, z2} and their personal information of ok:

  1. s2 = ok-1(z2 + rd2)
  2. ks2 = z2 + rd2
  3. rd2 = ks2 – z2
  4. d2 = r-1(ks2 – z2)

Utilizing a nonce one other consumer has used earlier than, leaks your personal key to the opposite signer. Word that underneath regular circumstances it’s infeasible to randomly generate the identical nonce, so both a non-random nonce has to have been used within the first place, or the nonce was shared between the 2 signers.

Share this
Tags

Must-read

Waymo raises $16bn to gas international robotaxi enlargement | Know-how

Self-driving automobile firm Waymo on Monday stated it raised $16bn in a funding spherical that valued the Alphabet subsidiary at $126bn.Waymo co-chief executives...

Self-driving taxis are coming to London – ought to we be anxious? | Jack Stilgoe

At the top of the nineteenth century, the world’s main cities had an issue. The streets had been flooded with manure, the unintended...

US regulators open inquiry into Waymo self-driving automobile that struck youngster in California | Expertise

The US’s federal transportation regulator stated Thursday it had opened an investigation after a Waymo self-driving car struck a toddler close to an...

Recent articles

More like this

LEAVE A REPLY

Please enter your comment!
Please enter your name here