Qm

Proving you know the password without saying it

A cave has an entrance passage that forks into a left path and a right path. The two paths join at the back of the cave, but the junction is blocked by a magic door that opens only when the secret word is spoken. From the fork you cannot see the door.

Peggy claims to know the secret word. Victor is sceptical, but Peggy refuses to tell him the word, and she also refuses to let him watch her open the door.

Design a procedure by which Peggy can convince Victor, beyond reasonable doubt, that she knows the word, without Victor learning anything about the word or being able to convince anyone else.

Show a hint

Let Peggy go into the cave first, choosing a path while Victor is not looking. Then let Victor call out which path she should come back by.

Your answer

Solving needs a free account

Answers, streaks and solutions unlock when you are signed in. Reading the question and the hint stays free.

Discussion

Sign in to join the discussion · reading is open to everyone

💡 Discussion rules

  1. No full solutions here. Hints and approaches only.
  2. Complexity, edge cases and intuition are the point.
  3. Interview experiences are welcome. Respect your NDAs.

Loading discussion…

Learn the concepts

The theory behind this question.

Related questions

Mail a ring safely when you can't share keys100 prisoners and the light bulbFrom an hour to half an hourCount the yeses without exposing anyoneAnts on a triangle
All questions →