Scene 2 · Badges for websites and robots

Is that badge real?

The teacher is about to sign in to the class party site. Before she types her password, Robo wants to check the site's badge.

Jump to part two: Robo's own badge ↓  ·  Go a level deeper ↓

1 Check the badge

https://party.maplehill.example

Maple Hill Class Party 🍕

Teacher sign-in

Tap the padlock in the address bar to see the badge.

2 Catch the impostors

Two fake party sites want the teacher's password. Pick one and let Robo check it.

3 Earn a badge

Now you run the real party site. Anyone can ask Trusty Stamps for a badge that says party.maplehill.example, so how does it know you're the owner?

party.maplehill.example's front door

"Pin this note on your front door. Only the real owner can."

The "front door" is the domain's public notice board (DNS). The note is a CNAME record.

4 Fast-forward time

Badges expire on purpose, so a stolen key stops working eventually. Drag the days forward and see what keeps the party site up.

badge validre-stampedsite down
🔒 party.maplehill.example

Drag the slider.

Part two

Robo's own badge

The website badge proves the party site to the whole world. The kitchen is different: it's the school's own system, and it only lets in robots the school itself vouches for. So the school runs its own badge office.

5 Set up the school's badge office

Build it in three moves.

6 Knock on the kitchen door

At this door, both sides show a badge.

Both sides checking each other is mutual TLS. The kitchen's short list of stamps it accepts is its trust store.

7 Robo's key gets copied

At the repair shop, someone copies Robo's memory, secret key included. Now a thief can show Robo's badge and pass the challenge.

The copy works for at most 1 day, even if nobody notices.

The cancelled list is a CRL. A live "is this badge still good?" check is OCSP.

What you just used

Badgecertificate
Trusty Stampscertificate authority
Sealdigital signature
Robo's challengeproof you hold the private key, part of the TLS handshake
Note on the doorDNS validation
Re-stampingmanaged renewal
Master stamproot certificate authority
Desk stampsubordinate certificate authority
Kitchen's list of accepted stampstrust store
Both show badgesmutual TLS
Cancelled listcertificate revocation (CRL, OCSP)

Who runs badge offices

  • Public stamp offices that every browser trusts, such as Let's Encrypt.
  • Badge office as a service: request, prove, and re-stamp handled for you, by cloud and edge providers such as AWS Certificate Manager, Cloudflare, Google Cloud and Azure.
  • A private badge office for badges only your own systems trust. Run it yourself with tools like step-ca or HashiCorp Vault, or use a managed one such as AWS Private CA or Google Cloud's Certificate Authority Service. The managed kind runs the stamps and publishes the cancelled list for you.
Connects to
  • The locked box: Robo's badge proves who it is; the box decides whether to open.
  • The staff roster: staff laptops can get their badges from this same office.
  • Robo gets a job: the same idea, an identity that can be checked, applied to an AI agent.
Peek at a real private badge office

Part two, for real: a master stamp, a desk stamp, and badges built with openssl on a laptop, then real handshakes between Robo and the kitchen.

# Building the school's badge office (openssl, EC P-256)
master.crt   subject=CN=Maple Hill Master Stamp
             issuer=CN=Maple Hill Master Stamp
desk.crt     subject=CN=Maple Hill Desk Stamp
             issuer=CN=Maple Hill Master Stamp
robo.crt     subject=CN=robo.school.example
             issuer=CN=Maple Hill Desk Stamp
kitchen.crt  subject=CN=kitchen.school.example
             issuer=CN=Maple Hill Desk Stamp

# 1. Robo knocks on the kitchen door (mutual TLS)
   kitchen sees robo.school.example, TLSv1.2, ECDHE-ECDSA-CHACHA20-POLY1305
   robo sees kitchen.school.example, reply: Come in.
   -> ACCEPTED

# 2. An outside drone with a badge from another office knocks
   kitchen's check: unable to get local issuer certificate
   -> REJECTED

# 3. Robo's key was copied: cancel its badge, publish the cancelled list
   CRL: Serial Number: 1000
   CRL: Key Compromise
   kitchen's check: certificate revoked
   -> REJECTED

Run it yourself: lab/badge_office.py. This is the do-it-yourself version; a managed private CA does the stamping and the cancelled list for you.

Peek at the real badge on this page

This page's padlock is a real badge from AWS Certificate Manager. Here's its chain, from a terminal:

$ openssl s_client -connect robo.qiaowei.wang:443 -showcerts
 0 s:CN=robo.qiaowei.wang
   i:C=US, O=Amazon, CN=Amazon ECDSA 256 M04
 1 s:C=US, O=Amazon, CN=Amazon ECDSA 256 M04
   i:C=US, O=Amazon, CN=Amazon Root CA 3
 2 s:C=US, O=Amazon, CN=Amazon Root CA 3
   i:C=US, ST=Arizona, L=Scottsdale, O=Starfield Technologies, Inc., CN=Starfield Services Root Certificate Authority - G2

Each badge is vouched for by the one below it, down to a stamp office built into your browser. Every public badge is also listed in public logs: see this one.

Go a level deeper

The badge office at scale

Same school, same badge office. Now the kitchen gets busy, and the rules start to change.

+1 A hundred twins

Lunch rush. The kitchen now runs on a hundred helper twins, small copies of Robo that start and stop all day. Every twin needs its own badge before the kitchen door opens, and badges last a day.

Pick a way, and the lunch rush starts.

In a container platform such as Kubernetes, the twins are pods. The open-source cert-manager is the vending machine; a plugin lets it get badges from a managed private CA and renew them automatically.

+2 The quantum lockpick

Someday a new kind of computer could forge today's seals. The fix is a new kind of stamp. But you can only swap the stamp on badges you can find.

BadgeStampSize

First, find out what you have.

The new stamp is ML-DSA, a NIST standard (FIPS 204) built to resist quantum computers. Finding every badge first is a crypto inventory.

Peek at a real post-quantum badge

The same badge built twice with openssl on a laptop: once with today's stamp, once with ML-DSA.

# OpenSSL 3.6.0 1 Oct 2025: build the same badge with two kinds of stamp
$ openssl req -x509 -newkey ec (P-256) ...   # today stamp
   signature algorithm: ecdsa-with-SHA256
   chain check:         today-robo.crt: OK
   badge size:          392 bytes

$ openssl req -x509 -newkey ML-DSA-65 ...   # post-quantum stamp
   signature algorithm: ML-DSA-65
   chain check:         post-quantum-robo.crt: OK
   badge size:          5,523 bytes

# The post-quantum badge is about 14x larger.
   Bigger keys and signatures mean more bytes in every handshake: one reason to plan the switch early.

# Inventory: which badges still carry today's stamp?
   robo.school.example (today       ) ecdsa-with-SHA256      -> swap stamp
   robo.school.example (post-quantum) ML-DSA-65              ok

Run it yourself: lab/quantum_stamp.py.

+3 One front door for a hundred twins

Visitors to the party site shouldn't need to know which of the hundred twins answers. So the school puts one front door in front of them: it greets every visitor and passes the job to a free, healthy twin.

Where should the party site's badge go?

Robots knock too. Pick what the door does with their badges:

The front door is a load balancer, such as an Application Load Balancer. It ends the encrypted trip at the door (TLS termination) with a certificate that AWS Certificate Manager renews automatically while it's attached, at no cost for public certificates used this way. It sends visitors only to healthy targets, and can scramble the trip again over HTTPS. Checking robots' badges is mutual TLS: verify mode checks client certificates against a trust store (your CA's certificates, such as Robo's private office, plus optional revocation lists); passthrough hands them to the targets to check.

Badge office: 0/11