Setting
Formal definition
As usual, the definition requires the existence of a simulator that can, without the witness, simulate anything a (malicious) verifier could learn from observing an honest proof.
Formally,
Definition of classical ZK
where denotes the distribution of the view of during execution of , i.e.,
- Input and randomness given to the machine
- all messages sent by to
Reference and quantifier order
Find where this definition originally came from, cite that. Also, check the quantifier order. I’ve changed it relative to Zero Knowledge so that the simulator has to be the same for all .
Expected polynomial time
We allow the simulator to run in expected polynomial time, which is more time than the (strict) polytime we allow the malicious verifier. However, for most scenarios and security proofs, ept is just as good ppt. See Expected Polynomial Time.
Typical simulator outline
Consider a protocol of the following form (e.g., Graph Isomorphism Protocol, Quadratic Residue Protocol, 3-Colorable Protocol)
Protocol template
- Announcement: prover sends some random value
- Challenge: The verifier chooses a random challenge (from a small challenge space )
- Response: The prover sends some response
- The verifier verifies some equation of the form
Then the simulator for (malicious) verifier typically works in two steps:
- Generate a random transcript for an honest protocol (strategy: generate challenge , generate random response , then look at the verifier check to come up with a good announcement for )
- Do rejection sampling, checking whether would have chosen the same challenge as we did.
Concretely:
Simulator
- computes a random transcript of the protocol:
- chooses a random challenge
- chooses a random response
- computes the unique fitting announcement
- rejects challenges not consistent with what would output:
- chooses randomness and computes (where is the challenge output by when started with input , randomness , after seeing announcement )
- If , then output the view Otherwise, start from the beginning and try again.
The first bullet point enables the simulator to come up with random transcripts with random .
The rest of the simulator deals with the fact that the actual malicious verifier may not choose uniformly and independently at random, but may instead choose some other way. Essentially, this part of the simulator follows a rejection sampling approach: The simulator simply hopes that the challenge it generated in the first part happens to be the one that the verifier would also output. This happens with probability , since chosen by the simulator is not shown to in any way. Hence we expect the simulator to repeat about times.