# Why exactly is Zero Knowledge Proof used here?

"The Ali Baba cave" example of ZKP is pictured below. There is no need for a probabilistic ZKP protocol to prove to the verifier of the statement (that the prover has the key to the door). It can be proved deterministically without the prover revealing any knowledge/information.

Assume that both the verifier and prover are both initially positioned at one side of the door. The verifier first walks back to the entrance. The prover opens the door and walks to the entrance to meet the verifier using the opposite route that the verifier took. Hence the prover proves to the verifier deterministically, without the need for repeated experiments.

– D.W.
Jan 24, 2022 at 22:45
• @D.W. I am referring to the "The Ali Baba cave" example of ZKP. There is no need for a probabilistic protocol to prove to the verifier of this statement. It can be proved deterministically without the prover revealing any knowledge/information. My question is why is ZKP used in this example.
– Anon
Jan 24, 2022 at 22:48
• Please don't explain in the comments -- please edit your post so it's clear what you're asking. I know the example but I don't know what you're asking. I suspect you have some assumptions or premises that may be faulty but I can't tell based on your current question, so it might be helpful to provide more context and more of your reasoning.
– D.W.
Jan 24, 2022 at 22:50
• @D.W. Is my explanation clearer?
– Anon
Jan 24, 2022 at 23:05
• @Anon, you can imagine that the door is controlled by a lock that is visible from both sides of the door. When the prover is opening the door, the verifier can actually observe (the shape of) the key. Thus, your deterministic protocol cannot be zero-knowledge. Jan 25, 2022 at 3:14