Certificate Authority

Intermediate CAs – and the eMudhra Compromise

Think of the root as authorizing a credential-issuing office, the intermediate as that office, and the website certificate as an individual credential. Compromising the issuing office lets an attacker manufacture new credentials.

An attacker generates a new key pair and creates a fraudulent certificate:

FieldLegitimate bank certificateAttacker’s certificate
Hostnamebank.example.combank.example.com
Public keyBank’s public keyAttacker’s public key
Signed usingIntermediate’s private keyThe same recovered intermediate private key
Matching private key held byBankAttacker

The attacker has not stolen the bank’s private key. They have created a different certificate for the same hostname, using their own public key and a trusted issuer’s compromised signing key.

If the attacker redirects a victim’s connection to their server, an insufficiently protected client could:

  1. Accept the fraudulent certificate’s hostname.
  2. Verify its signature against the legitimate intermediate.
  3. Build a chain to a trusted root.
  4. Accept the attacker’s proof of possession of the fraudulent website key.

The connection is encrypted—but it terminates at the attacker.

Updated clients should reject the compromised intermediate. Certificate Transparency requirements can also prevent acceptance of an unlogged forged certificate in clients that enforce them.

Why the intermediate is the critical link

Stealing the bank’s website key threatens that bank’s identity. Recovering an unconstrained TLS intermediate signing key can enable certificates for many different websites.

The root private key may remain safely offline throughout the incident. That does not prevent abuse of authority the root has already delegated to the intermediate.

eMudhra Intermediate CA compromise

2. The intermediate CA issues the bank’s certificate

The bank creates its own key pair and submits a certificate signing request containing its public key and requested hostname.

The CA validates control of bank.example.com and performs any additional checks required for the certificate type. The intermediate’s private key then signs a website certificate containing:

FieldExample value
Subject Alternative Namebank.example.com
Public keyThe bank’s public key
IssuerExample TLS Issuing CA
ValidityA defined start and expiration date
Basic ConstraintsCA:FALSE

The bank’s private key stays with the bank. The CA needs the public key to issue the certificate.

The website certificate cannot normally issue other certificates: it lacks CA authority.

3. Your browser connects to the bank

The bank’s server normally sends:

  • Its website certificate.
  • The intermediate certificate needed to build the chain.

It generally does not need to send the root certificate; your browser already has its trusted roots.

The browser then checks:

CheckWhat it establishes
Does the website certificate cover bank.example.com?The certificate matches the requested hostname.
Does the intermediate’s public key verify the website certificate’s signature?The intermediate signed this certificate.
Does the root’s public key verify the intermediate certificate’s signature?The root authorized this intermediate.
Are the certificates valid and their constraints satisfied?This chain is permitted for server authentication.
Does the chain end at a trusted root?The browser accepts the trust anchor.
Are applicable revocation, distrust, and transparency requirements satisfied?The chain meets the browser’s additional acceptance rules.

During a modern TLS handshake, the server also proves possession of the private key corresponding to the website certificate.

The certificate chain establishes identity; the handshake establishes possession of the key and negotiates protection for the connection.

Now introduce the eMudhra-style failure

Suppose the intermediate’s private key is 4, making it easy to recover from its public key.

An attacker generates a new key pair and creates a fraudulent certificate:

FieldLegitimate bank certificateAttacker’s certificate
Hostnamebank.example.combank.example.com
Public keyBank’s public keyAttacker’s public key
Signed usingIntermediate’s private keyThe same recovered intermediate private key
Matching private key held byBankAttacker

The attacker has not stolen the bank’s private key. They have created a different certificate for the same hostname, using their own public key and a trusted issuer’s compromised signing key.

If the attacker redirects a victim’s connection to their server, an insufficiently protected client could:

  1. Accept the fraudulent certificate’s hostname.
  2. Verify its signature against the legitimate intermediate.
  3. Build a chain to a trusted root.
  4. Accept the attacker’s proof of possession of the fraudulent website key.

The connection is encrypted—but it terminates at the attacker.

Updated clients should reject the compromised intermediate. Certificate Transparency requirements can also prevent acceptance of an unlogged forged certificate in clients that enforce them.

anuj

Independent PKI and cryptographic architecture.

Leave a comment