Public Key Infrastructure ยท 4.3
๐๏ธ Certificate Authorities & Chain of Trust
How 150 trusted organizations secure billions of connectionsโฑ ~3 min
The Certificate Chain (Trust Chain)
Certificates are arranged in a hierarchy. Root CAs sit at the top โ their certificates are self-signed and pre-installed in your OS/browser trust store. Below them are Intermediate CAs, which sign leaf (end-entity) certificates for actual websites and servers.
- 1.Root CA โ self-signed, pre-trusted, kept offline in HSMs (hardware security modules), rarely used
- 2.Intermediate CA โ signed by the Root CA; used for day-to-day certificate issuance
- 3.Leaf Certificate โ signed by an Intermediate CA; presented by websites/services to clients
- 4.Verification: browser verifies Leaf โ signed by Intermediate โ signed by Root โ in trust store โ
โ
FactRoot CA private keys are kept offline, often in air-gapped vaults with multi-person authorization requirements and hardware security modules (HSMs). DigiCert's root key ceremony involves multiple employees, auditors, a safe, keycards, and is filmed for compliance. Compromising a root CA key would allow issuing fake certificates for any domain on earth.
Certificate Issuance Process
- 1.You generate a key pair on your server
- 2.Create a Certificate Signing Request (CSR) containing your public key and domain info
- 3.Submit the CSR to a CA (e.g., DigiCert, Let's Encrypt, Comodo)
- 4.CA validates your identity (DV: prove domain control via DNS record or HTTP file; OV/EV: manual checks)
- 5.CA signs your public key and issues the certificate
- 6.Install the certificate on your server; configure it in your web server (nginx, Apache)
Let's Encrypt โ Free, Automated Certificates
๐ SecurityLet's Encrypt (letsencrypt.org) is a free, automated, open CA launched in 2016 by the Internet Security Research Group. It issues DV certificates valid for 90 days, auto-renewed via the ACME protocol (used by Certbot and most hosting platforms). Let's Encrypt has issued over 3 billion certificates and eliminated cost as a barrier to HTTPS adoption.
bash
# Install Certbot (Let's Encrypt client) on Ubuntusudo apt install certbot python3-certbot-nginx # Obtain and auto-configure certificate for nginxsudo certbot --nginx -d example.com -d www.example.com # Test auto-renewalsudo certbot renew --dry-run # List installed certificatessudo certbot certificatesCertificate Revocation
| Mechanism | How It Works | Problem |
|---|---|---|
| CRL (Certificate Revocation List) | CA publishes a list of revoked serial numbers; clients download periodically | List can be large; not real-time; clients may cache stale list |
| OCSP (Online Certificate Status Protocol) | Client queries CA's OCSP responder in real-time for each certificate | Privacy concern: CA logs every site you visit; responder downtime breaks connections |
| OCSP Stapling | Server fetches and caches OCSP response, includes it in TLS handshake | Best current practice: private, fast, no extra round-trip for client |
โ WarningMost browsers fail-open on OCSP โ if the OCSP server is unreachable, the browser accepts the certificate anyway. This means a CA going down does NOT protect against compromised certificates. Certificate Transparency (CT) logs and browser preloading (HSTS) provide better real-world protection.
๐ง Quick Checkfirst try = +5 XP
Why are Root CA private keys kept offline?
๐ฎ Practice what you learned
โญ 0 XP๐ฅ 0 days