badkeys developer explains how he nearly found eMudhra's d=4 CA key

In a post dated 3 December 2026, the developer of the key-checking tool badkeys looks back at the eMudhra incident, in which the private keys of multiple issuing certificates from the certificate authority eMudhra turned out to be insecure. He calls it something that has never happened before: a full compromise of private keys able to issue trusted web certificates.

The flaw is simple. The affected keys use ECDSA on the curve p384r1, and an ECDSA private key is just an integer called d, normally a very large one. The eMudhra keys were tiny: one was simply 4, and the others were small enough to fit into a single byte.

badkeys exists to find exactly this kind of problem, yet it did not find this one, although the author says it was arguably close. In November 2025, eleven months before the incident was discovered, Theo Buehler opened a badkeys bug report titled "Are elliptic curve keys corresponding to small private keys bad keys?" It proposed the exact check that would have caught eMudhra. The author thought the request was valid and plausible, since in his experience a security flaw in public key cryptography that you can plausibly imagine can usually be found in the wild if you search long enough.

The simplest route was to add small-d keys to the badkeys blocklist, a list of hashes of known-compromised keys that is also used for keys hit by the Debian OpenSSL bug. That needed decisions about which values and which of the many obscure curves to cover. The author had already written a script that generated keys for values up to 16 on the most common curves, so one of the affected private keys was sitting on his laptop. He also regularly scanned a collection of interesting keys that included every certificate in CCADB, the public database of certificate authorities and their root and intermediate certificates. Had he put the script's keys on the blocklist, he says, a cronjob would have found the d=4 key.

Instead he looked for a more elegant algorithmic check that would not grow the blocklist. At 39C3 in December 2025 he talked to Nadia Henninger, whom he describes as an expert on attacking public keys. She suggested Pollard's Lambda (Pollard's Kangaroo), with Baby Step Giant Step as an alternative. Kangaroo looked too complicated to implement quickly, and he found no existing implementation to adapt. Most of his badkeys work in the following months went into RSA findings. Henninger also introduced him to Keegan Ryan, whose idea about the ratio of 0 and 1 bits in an RSA public modulus led to a new class of vulnerable RSA keys with repeating zero patterns that can be factored efficiently.

A side story came out of that work. Many of the vulnerable RSA keys had been generated by CompleteFTP. The trial version's keys looked different, but they had an unusually large public exponent, where e=65537 is the near-universal norm. The author suspected private and public values had been swapped, and a check confirmed it: CompleteFTP on Linux created keys with the private exponent d=65537. He added a check for such keys using Wiener's attack, and notes the irony of implementing the small-d check for RSA before the one he was originally after for ECDSA.

He also asks whether small-d elliptic curve keys have turned up elsewhere. As far as he knows, plenty of people have looked since the incident became known, and no one has reported other production keys. Such keys do appear in test suites: Google's boringssl has JSON Web Key test vectors including ECDSA p384 keys with d=2 and d=3, which he calls quite close to d=4. The badkeys blocklist already contained these keys (they are ECDH rather than ECDSA, which badkeys treats identically), another near miss.

The eMudhra keys were in the end found with a different tool, though the author says badkeys played a role. On 17 October 2026 someone calling himself Wayne contacted him. Wayne had apparently audited badkeys, likely with AI tools, and reported a couple of low-severity but legitimate issues, all now fixed. A follow-up mail hinted that a major WebPKI issue was about to be disclosed. On Monday 19 October, after hearing more rumors, the author found that Chrome's CRLSet revocation system had blocked keys belonging to eMudhra intermediates. From there it did not take long to work out the bug and learn about the d=4 key. The issue went public hours later. The author suspected Wayne had seen the small-key bug report, but by Wayne's account that was not so.

The tool that did it was paranoid_crypto, built at Google in 2022 by Daniel Bleichenbacher together with Pedro Barbosa. It overlaps heavily with badkeys but has a broader scope, covering signatures and other artifacts as well as public keys. Among its checks is an implementation of Baby Step Giant Step that detects elliptic curve keys with small private values. The author had looked at it once to see what badkeys should adopt, but missed those checks; he puts that down to their not being prominent in the README. In August 2026 Alexander Tereschenko opened a badkeys issue asking about paranoid_crypto, and the author replied that its scope was broader but he believed all interesting public key checks were already in badkeys. Wayne saw that issue and tried the tool. One of his first steps was running paranoid_crypto over CCADB certificates, and it immediately found the eMudhra certificates. He then reported them to the browser root programs.

In the epilogue, the author says that right after the incident went public he added all 1-byte small-d keys for the common curves to the badkeys blocklist. He may later replace that with a Baby Step Giant Step implementation, which now looks to him like the most efficient detection method. Friends who read a draft told him not to beat himself up. He says that is not his intention: hindsight is easy, and he could not have known how close he was.

Key facts

  • Several eMudhra issuing certificates used ECDSA p384r1 keys with tiny private values: one was d=4, the rest fit into a single byte.
  • The author calls it the first full compromise of private keys able to issue trusted web certificates.
  • badkeys missed it despite a November 2025 bug report proposing the check, a private script that generated d up to 16, and a regular scan of all CCADB certificates.
  • A researcher called Wayne found the keys by running Google's paranoid_crypto, which includes a Baby Step Giant Step check, over CCADB certificates, then reported them to browser root programs.
  • After the incident the author added all 1-byte small-d keys for common curves to the badkeys blocklist; no other production keys with small d have been reported.

Why it matters

The author describes the eMudhra incident as unprecedented: a full compromise of private keys able to issue trusted web certificates, after many earlier WebPKI CA incidents. The weakness is trivially simple, an ECDSA private key of 4 or another single-byte number, which makes the story a lesson in how a plausible, cheap check can sit unbuilt for eleven months. The post also records how the keys were really caught: by a tool written at Google in 2022 by Daniel Bleichenbacher and Pedro Barbosa, aimed at a database of CA certificates that the badkeys author was already scanning.

Who it affects

Directly, eMudhra and anyone relying on certificates chained to the affected issuing certificates. The source says that multiple issuing certificates were involved and that Chrome's CRLSet had blocked keys belonging to eMudhra intermediates. Indirectly, it concerns the developers and maintainers of key-auditing tools such as badkeys and paranoid_crypto, and the browser root programs that received Wayne's report.

How to use it

For people who scan keys: badkeys now has the 1-byte small-d elliptic curve keys for the common curves on its blocklist, plus a Wiener's attack check for RSA keys with small private d, which the author added after finding that CompleteFTP on Linux produced keys with d=65537. paranoid_crypto already ships a Baby Step Giant Step check for small ECDSA private values, and Wayne's run of it over CCADB certificates is the route that found the eMudhra keys. The author says he may move badkeys to the same algorithm later. The post also notes that small values do appear in test suites, such as the boringssl test vectors with d=2 and d=3.

How solid is it

This is a first-person account by the badkeys developer, and most of it is his own recollection of what he knew and did. The incident itself is described as discovered and public, and his chain of events (Wayne's contact on 17 October 2026, the CRLSet discovery on 19 October, the public disclosure hours later) is stated plainly. Wayne's motives and sources rest on Wayne's own account as relayed by the author. The claim that a cronjob would have found the d=4 key had the script's keys been blocklisted is the author's counterfactual, not something tested.

Risks and caveats

The source does not explain how the eMudhra keys came to have such small private values, and it does not report any exploitation of them in the wild. It also does not say which or how many eMudhra certificates were affected beyond "multiple issuing certificates", nor what eMudhra's response was. As far as the author knows, no other production keys with small ECDSA d values have been reported, but that is a statement about reports so far, not a guarantee. The 1-byte blocklist covers only common curves, and any Baby Step Giant Step check in badkeys is something the author says he may do, with no timeline given.

“there is no way I could have known how close I was to discovering a major security flaw”

— badkeys developer, blog post of 3 December 2026