The PKI Handbook

26 chapters in 8 parts, from your first secret key to post-quantum cryptography. Every chapter starts in plain words, then goes as deep as you want. No account needed.

26 of 26 chapters published in this early edition. Each chapter matches one level of the game.

I

Part I: Secrets

Keeping a message private: shared keys, key pairs and agreeing a secret in public.

Chapter 1

Symmetric encryption: one shared key

Symmetric encryption scrambles data with one secret key, and only someone who holds that same key can turn the scrambled data back into readable text.

  • Beginner
  • Developer
  • IT ops

Level: Beginner

Chapter 2

The key-distribution problem

A shared secret key must reach each partner without anyone else seeing it, and every pair needs its own key, so sharing secret keys does not scale.

  • Beginner
  • Leader
  • IT ops

Level: Beginner

Chapter 3

Key pairs: public and private keys

A key pair is two keys: a public key anyone may have and a private key only you hold, so strangers can encrypt to you without sharing a secret first.

  • Beginner
  • Developer
  • IT ops

Level: Beginner

Chapter 4

Key exchange and hybrid encryption

Two parties can agree a shared secret over an open network without ever sending it, then derive fast symmetric keys from it to protect the actual data.

  • Developer
  • IT ops
  • Beginner

Level: Practitioner

II

Part II: Proof

Proving a message is unchanged and really from its sender: hashes and signatures.

Chapter 5

Hashes and fingerprints

A cryptographic hash turns any data into a short, fixed-size fingerprint; any change gives a completely different fingerprint, and you cannot run it backwards to get the data.

  • Beginner
  • Developer
  • IT ops

Level: Beginner

Chapter 6

Digital signatures

A digital signature is a value only the private-key holder can compute for a message, and anyone with the public key can check that it matches that exact, unchanged message.

  • Beginner
  • Developer
  • IT ops

Level: Practitioner

Chapter 7

Whose key is it? Binding identity to keys

Encryption and signatures only help if you use the right person's public key, so something you already trust must vouch that a key belongs to a name.

  • Beginner
  • Developer
  • IT ops

Level: Beginner

III

Part III: Certificates

Binding a name to a public key: X.509, names, requests and validation.

Chapter 8

Anatomy of an X.509 certificate

An X.509 certificate is a public, signed record that ties one public key to names for a fixed period, and you can read every field with openssl.

  • Developer
  • IT ops
  • Beginner

Level: Practitioner

Chapter 11

Proving you own the name: DV, OV, EV and CAA

Before issuing, a CA checks that you control each name, using a file, a DNS record or a TLS response, and reads CAA records; OV and EV check the organisation.

  • IT ops
  • Developer
  • Leader

Level: Practitioner

IV

Part IV: Trust and HTTPS

Trust stores, chains, cross-signing and the TLS 1.3 handshake.

Chapter 13

Certificate chains and path validation

Servers must send their leaf and intermediate certificates; clients link them by name and key identifier up to a trusted root and check every signature, date and constraint.

  • Developer
  • IT ops
  • Expert

Level: Practitioner

Chapter 15

The TLS 1.3 handshake

In one round trip, client and server agree fresh keys with ECDHE, the server proves it holds the certificate's key by signing the handshake, and both confirm nothing was altered.

  • Developer
  • IT ops
  • Expert

Level: Practitioner

V

Part V: When trust breaks

Revocation, Certificate Transparency and what famous failures taught us.

Chapter 16

Taking it back: CRLs, OCSP and stapling

Revocation lets a CA cancel a certificate before it expires, but many clients check late, softly or not at all, so short lifetimes now do much of the work.

  • IT ops
  • Expert
  • Developer

Level: Practitioner

Chapter 17

Certificate Transparency

Certificate Transparency records every publicly trusted TLS certificate in public, append-only logs, so anyone can spot a certificate for their name that they never asked for.

  • IT ops
  • Expert
  • Developer

Level: Practitioner

Chapter 18

Famous failures and what changed

Real PKI failures, from a hacked CA to expired certificates, follow one pattern: a weak point breaks trust, someone notices, and the rules or practices change.

  • IT ops
  • Expert
  • Leader

Level: Practitioner

VI

Part VI: Running PKI

Inventory, renewal, ACME, guarding keys and running a CA of your own.

Chapter 19

Inventory, expiry and renewal

Every certificate expires and lifetimes keep shrinking, so you need an inventory, an owner for each certificate, monitoring of what servers really send, and automated renewal.

  • IT ops
  • Developer
  • Leader

Level: Practitioner

Chapter 20

ACME and the 47-day schedule

ACME lets software prove control of a name, then fetch, renew and install certificates automatically: the only practical way to live with very short certificate lifetimes.

  • IT ops
  • Developer
  • Expert

Level: Practitioner

Chapter 21

Guarding the keys: HSMs and key ceremonies

A CA is only as trustworthy as its private keys, so they live in certified hardware, are created in witnessed ceremonies and are used only under multi-person control.

  • Expert
  • IT ops
  • Leader

Level: Expert

Chapter 22

A CA of your own: private two-tier PKI

A private CA lets you issue certificates for internal systems under your own rules, built safely as an offline root plus an online issuing CA with clear policies and templates.

  • Expert
  • IT ops
  • Developer

Level: Expert

VII

Part VII: Beyond the browser

Mutual TLS, code and document signing, and device identity.

Chapter 23

Both sides show ID: mutual TLS

In mutual TLS the client also proves who it is, with a certificate and a signature from its private key, so both ends are authenticated before any data flows.

  • IT ops
  • Developer
  • Expert

Level: Practitioner

Chapter 24

Signed and sealed: code and document signing

A code or document signature proves who signed a file and that nobody changed it since; a trusted timestamp keeps that proof valid after the signing certificate expires.

  • Developer
  • IT ops
  • Expert

Level: Practitioner

Chapter 25

Machines with passports: device identity

A device certificate, installed at the factory with its private key locked in secure hardware, lets a machine prove what it is and who made it, for its whole life.

  • IT ops
  • Developer
  • Expert

Level: Practitioner

VIII

Part VIII: The future

Post-quantum cryptography and what changes next.

Chapter 26

Post-quantum cryptography

A large quantum computer would break RSA and elliptic-curve cryptography, so key exchange is already moving to ML-KEM, and signatures and certificates come next.

  • Expert
  • Leader
  • IT ops

Level: Practitioner

A

Appendices

Reference pages to keep open while you work.

Glossary: PKI terms in plain words

Every PKI and TLS term used on this site, from ACME to X.509, each with a one-line answer, a fuller explanation and the chapter that teaches it.

Timeline: how PKI got here

From the first public-key papers in the 1970s to ever-shorter certificate lifetimes and post-quantum key exchange: the milestones and incidents that shaped how certificates work today.