The Crypto Failure Headlines Missed: Entropy, Snapshots, and a Reused Nonce
Archi4 min read
Contents
The Headline Said Broken Math. The Patch Said Broken State.#
The first stories about a recent signature verification failure pointed at the algorithm. A 256-bit curve had failed, readers were told, and the fix was a stronger parameter set. The patch notes were less dramatic. Two signatures had used the same nonce. That is a one-time number in ECDSA, and two uses are enough to recover a private key.
The gap matters because it repeats a pattern. Cryptographic failures rarely begin in the math. They begin in the places engineers treat as plumbing: entropy sources, virtual machine snapshots, key rotation scripts, and logging pipelines that quietly copy secrets. The headlines chase the primitive. The incident lives in the state around it.
A nonce is a one-time number, until it is not#
ECDSA and similar signature schemes rely on a fresh random value for every signature. If the same nonce appears twice under the same key, an attacker can subtract the two signature equations and solve for the private key. No brute force. No quantum computer. A few lines of arithmetic.
The failure mode is old. The operational trigger is new. Signing services now run in containers, autoscaling groups, and cloned virtual machines. A snapshot taken after the random number generator has been initialized can preserve the same internal state. Start two instances from that snapshot and both may produce signatures with identical nonces. The API looks healthy. The signatures verify. The key is exposed.
Headlines often describe this as a random number generator flaw. That is accurate but incomplete. The generator may be fine. The orchestration around it was not. A build pipeline that clones a signing worker, or a disaster recovery drill that restores a VM and leaves it running, can create the same condition. The bug is in the lifecycle, not the primitive.
Where the failure actually lived#
The postmortem pattern is consistent. A monitoring system flags duplicate signature values, or a researcher notices two signed messages with the same r value. The immediate response is to rotate the key and patch the library. The deeper questions take longer. Which process generated the nonce? Was the worker cloned? Did the entropy pool survive a suspend and resume? Did the hardware security module enforce a counter? Did anyone check?
In this case, the signing service used a virtualized worker pool. A snapshot restore test ran on a Friday. The restored worker signed a batch of audit records. The original worker signed another batch. Both used the same nonce sequence. The service had no check for duplicate nonces because the library assumed callers would provide fresh randomness. The library was right about the math and wrong about the deployment.
That is the part the headlines missed. The failure was not a sign that ECDSA is broken. It was a sign that the key ceremony and the recovery plan had never been tested together. A disaster recovery test that restores a signing node without resetting entropy is not a recovery test. It is a key exposure drill.
The test that would have caught it#
A simple invariant would have helped: no two signatures under the same key may share a nonce. That check is cheap. Store a hash of each nonce, or store the signature r value, and reject duplicates within the key's lifetime. The check can run inside the signing service or in a sidecar. It will not catch every misuse, but it catches the catastrophic one.
The second test is a restore test. Clone a signing worker from a snapshot, sign a message on the clone and another on the original, then compare. If the nonces match, the deployment is unsafe. Run the test after any change to the VM image, the container runtime, or the entropy configuration. The test is not a cryptographic proof. It is an operational tripwire.
The third test is a key rotation drill. Rotate the signing key on a schedule, and verify that old signatures still validate with the old public key. A rotation plan that breaks audit logs is not a rotation plan. It is a future outage with a security label.
What teams should change this quarter#
Start with the signing path. Document where randomness comes from, and whether that source survives a clone, a restore, or a live migration. If the answer is unclear, assume it does not. Use a hardware-backed signer or a deterministic nonce scheme where the protocol allows it. Deterministic nonces are not magic, but they remove the snapshot duplicate failure mode.
Then inventory every place a private key can be copied. Backups, debug dumps, crash reports, and CI artifacts are common leaks. A key that appears in a support bundle is already compromised, even if the bundle never leaves the building. Set retention rules and scan for key material in logs.
Finally, write the incident review for operators, not for algorithm fans. The useful questions are concrete: Which worker signed? When was it cloned? What was the entropy state? Who rotated the key? What evidence do we have? The math can wait until the deployment map is correct.
More articles