The incident: a P-384 private key equal to 4
A P-384 private key is a number between 1 and roughly 2384. It is stored in 384 bits, of which the value 4 needs three.
- Nov 2025A badkeys issue asks about elliptic-curve keys with small private scalars.
- Dec 2025Interval discrete-log methods are discussed; no check is deployed.
- Oct 2026Byte-sized scalars in eMudhra P-384 issuing keys are reported, found by paranoid_crypto's small-scalar check.
- Afterbadkeys adds a blocklist of single-byte scalars on common curves.
- 3 Dec 2026Hanno Böck publishes how he almost found it first [R1].
Guessing order does not make a key weak
If the generator worked correctly, 4 was as likely as any other scalar: probability 1/(n−1), about 2−384. An attacker who guesses upward from 1 finds it on the fourth guess. One who guesses downward from the top needs about 2384 guesses.
Below is a toy keyspace of 16 equally likely keys, 1 to 16. Choose the secret key, the guessing order and the number of guesses.
Shaded: keys the attacker tries. Red outline: the secret key. Each tile shows its position in the guessing order.
Chance of finding a randomly drawn key with this many guesses:
All three orders have the same chance, m/16. The order only changes which keys are found first. A key that comes early in a stated order is class B1, low guesswork. The class describes the search; it reports no defect in the key.
Size, randomness and attack cost are different measurements
The key 4 takes 3 bits to write and is stored in 384. Under a correct generator it carries about 384 bits of self-information, and a search counting up from 1 reaches it on the fourth guess.
Interval search: what group structure adds
Guessing order aside, the key was cheap to recover for two reasons. It lay in a set of 255 values, and that set is an interval: in an elliptic-curve group an interval of M scalars can be searched in about √M steps instead of M.
The structural advantage ρ is the gain over the cheaper of two baselines: trying every value in the set, and the generic attack that works on any key. For intervals ρ grows with the size of the set up to about √n keys, then shrinks again as the generic attack becomes the cheaper baseline. Because ρ grows with M over that range, intervals count as a structurally weak family. For an arbitrary set of the same size, no faster search is known.
Structural advantage
Bars are log2 of group operations, from 0 to 384. The last two bars take the population view [R8]. An attacker scanning correctly generated keys for one in the set must test n/M keys per hit, each at the search cost. For an interval that totals n/√M, never less than the generic √n. The scan is only worthwhile when a defective generator puts keys in the interval more often.
The seven classes and where each weakness lies
"Weak key" is used for several different properties. The seven classes separate them by where the weakness lies: in the transformation, in the attacker's search, in the generator, or in the context around the key.
Click a colored badge on the map, or a line in the list of the key 4's classes, to see that class.
Evidence levels and what to do with the key
Each claim about a key has its own evidence level. For the eMudhra key the recovery is demonstrated, a failure of the generating process is credible, and its cause is unknown. A fixed list of rules then decides what to do with the key.
Rules are tried from the top; the first "yes" decides. Shown for the eMudhra key.
Example keys, classified
The cases run from DES weak keys to biased signature nonces. Most belong to more than one class. For a valid key, a C2 finding at credible or above settles the outcome whatever the other classes say.
Click a row to see the full report for that key below.
Classify a key yourself
Answer the questions for a key. Several can apply at once. The result updates as you answer. You can also load one of the example keys and change it.
Classes found
What to do with the key
The findings for the key 4
4 is a valid P-384 scalar. Under a correct generator it is as unlikely as any other value. Three of the four findings matter for what to do next; the fourth, B1, only describes one search order.
The keys were not generated uniformly
Under uniform generation a key is byte-sized with probability about 6.5 × 10−114, and several issuing keys were. A failure of the generating process is credible. Whether it was a generator fault, a provisioning error, test values or a deliberate choice is unknown.
Group structure made recovery cheaper still
A key known to lie among 255 values is already easy to find. Group structure makes any scalar in a known interval cheaper again: 4 of the 188 bits of security lost come from structure, 184 from the small set.
The key is compromised
Once a detector recovered the scalar, someone outside the CA knew the key. It must be revoked and replaced, regardless of how it was generated.
Read the full argument in the paper: Don't Blame 4 (PDF). Criteria: Membership criteria.