I'm trying to prove that this protocol https://de.wikipedia.org/wiki/Fiat-Shamir-Protokoll is zero-knowledge (the page is in german but it was the only good and simple image i could find)
I'm a student and I've never proven the zero-knowledge property, I know a simulator has to exist in order for a protocol to be zero-knowledge, but I've never actually seen how to do it or how its done, can you help me out?
Hopefully its fairly simple.. at least, the protocol is.
Another image of it is this if it can be helpful: https://www.researchgate.net/figure/The-protocol-steps-in-Fiat-Shamir-zero-knowledge-based-authentication-protocol_fig5_260908542
1 Answer
Using the notation in your Wikipedia link for consistency, given any, possibly cheating, verifier $V^*$, you want to construct a simulator $S$ which, given only access to the quadratic residue $v$ (but not the square root $s$), produces an output indistinguishable from the view of the verifier in its interaction with an honest prover.
The way you do this in this case is by basically guessing the bit $e$ the verifier will send. You uniformly sample some random $y\in(\mathbb{Z}/N\mathbb{Z})^*$, as well as $e'\in\{0,1\}$, and set $r=y^2\cdot v^{-e'}$. In both cases, $r$ is a uniformly random invertible quadratic residue, so the distribution of $V^*(r)$ cannot depend on the bit $e'$, and therefore, $e=e'$ happens with probability exactly $1/2$ regardless of the strategy of $V^*$. If they happen to be equal, the simulator outputs $(r,y)$ and otherwise restarts (or aborts, depending on your precise definition of zero-knowledge; it doesn't matter).
In case of success, $(r,y)$ is distributed exactly as in the interaction with an honest prover: $r$ is uniform in $QR_N$, $y$ is uniform in $(\mathbb{Z}/N\mathbb{Z})^*$, and they satisfy $y^2 = r\cdot v^e$. Moreover, success is achieved with overwhelming probability after at most polynomially many repetitions (in the size of $N$). This ensures that the protocol is perfect zero-knowledge.