3 ms·
> You can recover a private key from two signatures if they reuse the same nonce. You can, but you can also do a lot more than that. Thinking that this is the
by nullc 5y ago
> You can recover a private key from two signatures if they reuse the same nonce.
You can, but you can also do a lot more than that. Thinking that this is the only attack is a common error, and precisely the one Wright was making in that recording.
Two signatures with different messages and the same key and message is just a special case of the fact that if you write out the signing equation as a linear system with privkey and nonce being unknown, and the message and signatures being the knows if the resulting matrix is exactly determined or over-determined, then you can solve for the unknown values.
It would also be the case that if you had two signatures with the same key and the nonces being any known multiple of each other that it's just as solvable.
There are other attack approaches, for example if you have a set of signatures where you know the leading bits of the nonce you can also recover the keys by solving a hidden number problem. (If you only know the single leading bit it'll take a few hundred signatures).
Cryptosystems are inherently fragile. The security assumptions of these schemes demand a uniformly random nonce. Deviation from the required property easily destroys security in practically exploitable ways.
The person Wright was arguing with was pointing out that if Wright had the private keys in question -- turns out he didn't-- it wouldn't be impossible that he obtained them after observing a single insecurely generated signature. Wright drove the discussion down a tangent with an argument that one couldn't recover a key with a single signature-- a false claim, but even if it were true it wouldn't really have supported his case.
- marcan_42 5y agoIndeed; in general, if you know 1/n of the information in the nonces, you can recover the private key after n signatures. So even subtle biases in the random number generation can leak your key after a few transactions.