Proving a secret without revealing it

One slider walks through the stages, the other adds rounds. Watch certainty climb to almost total while the secret stays a secret.

Stage Cave and door
  1. 0
  2. 1
  3. 2
  4. 3
  5. 4
Rounds 1

Tap a part of the diagram to open that stage.

The whole protocol

A loop, a private choice, a random challenge, a door. The prover said nothing about the code, the verifier saw none of its characters, and after twenty rounds there is practically no doubt left.

What's inside

  1. 1 A ring-shaped cave with a locked door — The task is not to check a password, but to become certain someone knows one without seeing it.
  2. 2 He walks in while nobody is watching — He picks it himself, and that is the point: outside, no information about the choice exists.
  3. 3 The verifier names a side — The order matters. Announce the side in advance and cheating becomes trivial.
  4. 4 The door decides everything — Someone without the code only makes it when they guessed the side in advance — one time in two.
  5. 5 One round means nothing, twenty mean almost everything — And the verifier still does not know the code: all he saw were exits he asked for himself.

Explorable Explanations

Stage Cave and door
  1. 0
  2. 1
  3. 2
  4. 3
  5. 4
Rounds 1
1 / 5