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
💡 Discussion rules
- No full solutions here. Hints and approaches only.
- Complexity, edge cases and intuition are the point.
- Interview experiences are welcome. Respect your NDAs.
Loading discussion…
Learn the concepts
The theory behind this question.