a public-key infrastructure
Public-key cryptography gives you a way to encrypt to a public key and verify signatures — but it leaves a hole: how does the whole world agree, at scale, on which public key belongs to whom, and what to do when a key is compromised? Think of it like the entire system around passports: not just the documents, but the issuing offices, the rules for verifying identity, the way borders check them, and the process for cancelling a stolen one. A public-key infrastructure (PKI) is that whole supporting system for digital certificates.
A PKI ties together several pieces into a working trust system. There are certificate authorities that issue and sign certificates, arranged in a hierarchy: a small number of root CAs (whose keys are pre-trusted and fiercely protected) sign intermediate CAs, which sign the end certificates — forming a chain of trust your software validates link by link back to a trusted root. There are registration procedures for verifying identity before issuance, repositories where certificates are published, and revocation mechanisms (like certificate revocation lists and OCSP) to declare a certificate void before it expires if a private key is stolen. Together these answer the questions cryptography alone can't.
Why it matters: PKI is the invisible scaffolding that makes secure communication usable by billions of people who never think about keys. Every HTTPS connection, code-signing check, and secure email leans on it. But the model is built on real-world trust and human processes, so its weaknesses are organizational as much as mathematical: a single misbehaving CA, a poorly protected root key, slow or unchecked revocation, or users clicking past warnings can all undermine it. The cryptography is strong; the infrastructure is only as trustworthy as the institutions and practices that run it.
Your browser receives a website's certificate signed by an intermediate CA, which is itself signed by a root CA your browser already trusts. The browser walks this chain — site to intermediate to root — verifying each signature. The chain validates back to a trusted root, so the certificate is accepted. That walk is PKI in action.
A chain of trust from your site's cert up to a trusted root.
PKI's security rests on institutions and processes, not just math. Its real-world failures — a hacked CA, a leaked root key, ignored revocation — are usually organizational, not cryptographic. Trust is delegated, and delegated trust can be abused.