A secret code consists of a single digit between and . Alice and Bob are both supposed to know this code, but they have never met before. Alice must therefore prove to Bernard that she knows the code without revealing it.
To do so, they use a box containing compartments numbered from to . Each compartment has a lock with two keys: one for Alice and one for Bernard.
Without Alice seeing him, Bernard keeps the key corresponding to the secret code and discards all the others. If Bernard is an impostor and does not know the code, he chooses one of the keys uniformly at random.
Independently, and without Bernard seeing her, Alice places a token in the compartment corresponding to the secret code. If Alice is an impostor and does not know the code, she chooses one of the compartments uniformly at random.
Bernard then opens the only compartment for which he kept a key. If Alice’s token is inside, they accept the identification attempt.
Assume that the probability that Bernard is an impostor is .
Assume that Alice knows the secret code. Let
andCompute
Compute
Compute
Assume now that both Alice and Bernard are impostors. What is the probability that Alice places the token in the compartment corresponding to the true code and Bernard keeps the key corresponding to the true code?
Still assuming that both Alice and Bernard are impostors, what is the probability that Bernard keeps the key corresponding to the compartment in which Alice placed the token?
The secret code now consists of digits, and the protocol is repeated independently for each digit. Assume that Alice knows the code but Bernard is an impostor. What is the probability that Bernard chooses the correct key in all four rounds?
Remark: This type of method is known as a zero-knowledge protocol. Such protocols are used in cryptographic authentication systems because they allow one party to prove knowledge of a secret without revealing the secret itself. They play an important role in privacy-preserving technologies, including some systems related to cryptocurrencies such as Bitcoin.
