PKI: how a public key infrastructure works, from the root to your certificate

Root authority, intermediates, chain of trust and trust store: what a PKI is, public or private, how it verifies a certificate, and where it breaks.

Published · 11 min read · Also available in: Français

“Ask the PKI team”, “it’s a PKI problem”, “we run our own PKI”. The word comes up in every conversation about certificates, almost never with its definition.

A PKI is neither a piece of software nor a protocol. It is everything needed to answer a single question: does this public key really belong to whoever is presenting it? This article describes its parts, how they fit together, and the places where the whole thing breaks.

The problem: a public key does not say whose it is

When your browser connects to www.example.com, the server sends it a public key. The mathematics of TLS guarantee that you are talking to the holder of the matching private key, and to nobody else. They do not say who that holder is. An attacker sitting on the network can send their own key: the traffic will be encrypted, but with them.

So a third party has to vouch: “this key really is the one for www.example.com”. Three words describe the arrangement:

A passport is a good picture of it. The passport is the certificate, the state that issues it is the authority, and the border officer who checks it has a list of the states they recognise. The PKI is the whole system: the offices, the issuing rules, the list of recognised states and the register of stolen passports.

The parts of a PKI

Part What it does Example
Root authority The starting point of trust. Its certificate is signed by itself ISRG Root X1 (Let’s Encrypt), your company’s root
Intermediate authority Signs certificates day to day, on behalf of the root The issuing authorities of Let’s Encrypt, DigiCert or Sectigo
Registration authority Checks who is asking, before the authority signs Domain control checks in ACME, the PKI team’s portal
Certificate Binds a public key to a name, for a limited time The one for www.example.com
Trust store The list of accepted roots, on the side that verifies The ones in Windows, macOS, Firefox, Java
Revocation Withdraws a certificate before it expires CRLs, OCSP responses
Certificate policy The rules: who gets what, for how long, after which check The CA/B Forum requirements, your PKI’s internal document

A PKI is therefore as much an organisation as a technology: keys, but also rules, checks, and people who answer for them.

The chain of trust

A root authority almost never signs your certificate itself. It signs intermediate authorities, which sign the end certificates.

Root authority self-signed, key kept offline Intermediate A key online, in an HSM Intermediate B key online, in an HSM www.example.com api.example.com vpn.example.com client-prod End certificates: sites, APIs, mTLS clients
Each line is a signature. Trust flows down from the root; verification climbs back up to it.

There is a reason for this split: the root’s private key is the most valuable secret in the PKI.

Lifetimes follow the same logic: around twenty years for a root (ISRG Root X1, the Let’s Encrypt root, is valid from 2015 to 2035), a few years for an intermediate authority, and 200 days at most, 47 in 2029, for a public site’s certificate.

How a client verifies a certificate

Serverwww.example.comClientbrowser, curl, application
  1. The roots are already here, shipped with the system or the browser
  2. 1. Sends its certificate and the intermediate
  3. 2. Is the requested name in the certificate, are the dates right?
  4. 3. Is the certificate signed by the intermediate?
  5. 4. Is the intermediate signed by a root?
  6. 5. Is that root in my trust store?
  7. Four yeses: the connection goes on. A single no: it is refused
Verification climbs the chain, from the site’s certificate up to a root the client already knows.

Three points are worth remembering:

Looking at a site’s chain

One command shows the chain a server presents:

openssl s_client -connect letsencrypt.org:443 -servername letsencrypt.org </dev/null

Here is the useful part of the response, recorded in November 2026:

Certificate chain
 0 s:CN=letsencrypt.org
   i:C=US, O=Let's Encrypt, CN=YE2
 1 s:C=US, O=Let's Encrypt, CN=YE2
   i:C=US, O=ISRG, CN=Root YE
 2 s:C=US, O=ISRG, CN=Root YE
   i:C=US, O=Internet Security Research Group, CN=ISRG Root X2
 3 s:C=US, O=Internet Security Research Group, CN=ISRG Root X2
   i:C=US, O=Internet Security Research Group, CN=ISRG Root X1

On each link, s: is the subject (who the certificate belongs to) and i: the issuer (who signed it). The issuer of one line is the subject of the next: that is the chain.

This one has four links instead of three, because of cross-signing. Root YE is a recent root, still missing from many trust stores. So it gets itself signed by an older root, ISRG Root X2, which is itself signed by ISRG Root X1, present everywhere. A recent client stops at the first root it knows. An old client climbs all the way to the oldest.

For an internal authority, the same check can be done offline:

openssl verify -CAfile root.pem -untrusted intermediate.pem www.example.com.crt
# www.example.com.crt: OK

Every piece of software has its own trust store

There is not one trust store, but dozens. Windows, macOS, Android and iOS each have theirs. So do Linux distributions, most often in /etc/ssl/certs. Firefox and Chrome ship their own list, as do Java (the cacerts file), Node.js and many Python libraries.

The consequence: a certificate your browser accepts may be refused by an application, a container or an old appliance. With a public authority, the gap is rare. With an internal authority, it is the first thing to deal with.

Public PKI, private PKI

Both work the same way, with the same mathematics. What changes is who trusts them, and who sets the rules.

Public PKI Private (internal) PKI
Who runs it Recognised authorities: Let’s Encrypt, DigiCert, Sectigo, GlobalSign… Your company, or a managed service acting for it
Who trusts it Every browser and system, with nothing to install Only the machines where you installed your root
Who sets the rules The CA/B Forum and browser vendors, with yearly audits You
Certificate lifetime 200 days at most since March 2026, 47 in 2029 Whatever you decide
Public record Every issuance is logged in Certificate Transparency None
Uses Sites and APIs open to the Internet Internal services, mTLS, VPN, corporate Wi-Fi, workstations, appliances

The most common tools for a private PKI are Microsoft AD CS, HashiCorp Vault, step-ca, EJBCA, AWS Private CA and, on Kubernetes, cert-manager.

The rule for choosing is simple:

That covers mTLS between your services or with a third party, VPNs, corporate Wi-Fi or a service mesh.

A private PKI is no weaker. It is entirely your responsibility: protecting the root, distributing its certificate everywhere, publishing revocation, renewing on time. No third party will come and point out something you forgot.

The life cycle of a certificate

Public or private, a PKI takes every certificate through the same steps.

  1. 1. RequestPrivate key and CSR.
  2. 2. VerifyDomain or identity.
  3. 3. IssueThe authority signs.
  4. 4. InstallWith the chain.
  5. 5. RenewBefore expiry.
Then the cycle starts again. A certificate only leaves it by expiring or being revoked.
  1. Request. You generate the private key where it will be used, then a CSR carrying the public key and the names.
  2. Verify. The authority checks that the domain is yours (domain validation), and sometimes your organisation’s identity (OV and EV certificates).
  3. Issue. It adds the dates and its name, then signs.
  4. Install. The certificate joins its private key on the server, along with the intermediate certificates.
  5. Renew. A program takes care of it (ACME), or a person does, warned by an alert.

If the private key leaks before expiry, the certificate is revoked and replaced without waiting.

Where a PKI breaks

PKI outages look alike: the site’s certificate is valid, and yet the connection is refused. The fault is higher up the chain, or on the side that verifies.

What this changes for tracking your certificates

Knowing which PKI sits behind a certificate changes how you track it.

PkiZen is not a PKI: it issues and signs nothing, and holds no keys. It tracks what your PKIs produce, whatever the authority:

In summary