The Ali Baba Cave Zero-Knowledge Proof

A circular cave has one entrance splitting into two tunnels that meet at a locked door, which opens only with a secret word. Peggy claims she knows the word; Victor wants proof, but she won't say it aloud or let him learn anything else about it. Victor waits outside while Peggy picks a tunnel at random, then walks in partway and shouts which tunnel he wants her to emerge from. If she truly knows the word, how does this convince Victor — without ever revealing the secret?

Reveal the answer

If Peggy doesn't know the word, she can only come out the requested branch about half the time, guessing which one Victor would call. Repeating the test makes the odds of bluffing through every round vanishingly small — after twenty rounds, a cheat succeeds by luck only about one time in a million. Victor becomes convinced Peggy knows the word without ever learning it himself. Cryptographer Jean-Jacques Quisquater and colleagues popularized this in a 1989 paper explaining zero-knowledge proofs, a technique now used in real cryptographic authentication.

— Jean-Jacques Quisquater et al., How to Explain Zero-Knowledge Protocols to Your Children — CRYPTO '89 Proceedings, 1990

One credited idea per card. No filler. Swipe the rest in Savvy.

Keep swiping — it's free Works right in your browser. No app store needed.

More Puzzles

All Puzzles cards →

Five ideas worth knowing, every week

The week's best cards and a puzzle, credited as always. Free, unsubscribe any time.