pull down to refresh

For anyone wondering how ECDSA is broken mathematically when a nonce ($k$) is reused:

The signature equations for two messages $m_1$ and $m_2$ signed with the same private key $d$ and the same nonce $k$ are:

where $z_i$ are the message hashes, $r$ is the signature x-coordinate (which is identical for both signatures because $k$ is the same), and $d$ is the private key we want to recover.

By subtracting the two equations:

We can compute the nonce $k$ directly:

Once we recover the nonce $k$, computing the private key $d$ is trivial from either signature:

This is why nonce reuse is completely fatal. Even if the nonce isn't fully reused but only biased (e.g. knowing a few bits of $k$ across several signatures), the private key can be recovered in polynomial time using Lattice Reduction (LLL algorithm applied to the Hidden Number Problem).