ELI5: What is PKI?

Imagine a post office that hands out special ID badges. Before two people can send each other secret letters, they go to the post office and get an official badge that proves who they are. The post office keeps track of all the badges and can cancel one if it gets stolen. PKI (Public Key Infrastructure) is the whole system — the post office, the badges, and the rules — that lets computers prove their identity and communicate securely.

Overview

Public Key Infrastructure (PKI) is a comprehensive system for creating, distributing, managing, storing, and revoking digital certificates. PKI binds public keys to identities through a trusted Certificate Authority (CA), enabling secure communications, authentication, and digital signatures. PKI underpins HTTPS, email encryption, code signing, VPNs, and many other security services.

Key Concepts

  • PKI components:
    • Certificate Authority (CA) — trusted entity that issues and signs certificates
    • Registration Authority (RA) — verifies the identity of certificate requestors before the CA issues
    • Certificate Revocation List (CRL) — list of revoked certificates published by the CA
    • Online Certificate Status Protocol (OCSP) — real-time certificate validity checking; more efficient than CRL
    • OCSP stapling — server periodically checks its own certificate status and includes it in the TLS handshake
  • Certificate hierarchy:
    • Root CA — top of the trust chain; self-signed; kept offline for security
    • Intermediate / subordinate CA — issues certificates on behalf of the root CA; if compromised, only its branch is affected
    • Leaf certificate — end-entity certificate issued to a server, user, or device
  • Chain of trust — each certificate is signed by the CA above it; browsers trust the root CA
  • Certificate pinning — application hardcodes the expected certificate or public key to prevent MITM with rogue certs
  • Key escrow — a third party holds a copy of the private key for recovery purposes
  • Cross-certification — two CAs trust each other’s certificates for interoperability
  • DV (Domain Validation) certificate — verifies domain ownership only; quickest and cheapest
  • EV (Extended Validation) certificate — thorough identity verification; displays organization name in browser
  • SAN (Subject Alternative Name) — certificate field allowing multiple domain names on a single certificate
  • Certificate formats — DER (binary), PEM (Base64-encoded), PKCS#12/PFX (includes private key), PKCS#7 (certificate chain)

Exam Tips

Remember

Root CA should be offline. OCSP is real-time; CRL is a list. Chain of trust: root signs intermediate, intermediate signs leaf. If the root is compromised, the entire PKI is compromised. OCSP stapling reduces latency.

Connections

  • Issues and manages certificates that bind identities to public keys
  • Relies on encryption (asymmetric cryptography) as its underlying technology
  • See also key-management for the lifecycle of the keys within a PKI ecosystem

Practice Questions

Scenario

See case-pki for a practical DevOps scenario applying these concepts.