Don't Blame 4

Separating structural weakness, guessability and generation failure in cryptographic keyspaces

In October 2026 P-384 issuing keys of the certificate authority eMudhra were found to have private scalars small enough to fit in one byte. One of them was 4.

Chapter 1

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.

Show
bit 383d = 4 = 0b100bit 0
Each square is one bit of the 384-bit scalar. Outlined: the bits the value 4 needs. Dark: bits set to 1.
  1. Nov 2025A badkeys issue asks about elliptic-curve keys with small private scalars.
  2. Dec 2025Interval discrete-log methods are discussed; no check is deployed.
  3. Oct 2026Byte-sized scalars in eMudhra P-384 issuing keys are reported, found by paranoid_crypto's small-scalar check.
  4. Afterbadkeys adds a blocklist of single-byte scalars on common curves.
  5. 3 Dec 2026Hanno Böck publishes how he almost found it first [R1].
Chapter 2

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.

Settings
Guessing order
Result

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.

Chapter 3

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.

Settings
Key
Generator that produced it
Attacker's guessing order
Result

All values in bits (log2 of the quantity). With a correct generator, changing the key moves bit length, description length, guess rank and recovery cost. Changing the generator moves only self-information. Changing the order moves only guess rank. Entropy is not in the chart because it describes the generator, not a single key; it is given below the chart.
Chapter 4

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.

Settings
Shape of the set of candidate keys
Result

Structural advantage

ρ = 24

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.

Chapter 5

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.

Show

Click a colored badge on the map, or a line in the list of the key 4's classes, to see that class.

The key 4 belongs to four classes
    Chapter 6

    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.

    Claims about the eMudhra key, by evidence level
    Disposition rules

    Rules are tried from the top; the first "yes" decides. Shown for the eMudhra key.

      Chapter 7

      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.

      Chapter 8

      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.

      Your answers
      Result

      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.

        B2

        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.

        A2

        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.

        C2

        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.