Lecture Overview

A zero-knowledge proof protocol is a kind of interactive proof system where the prover's secret knowledge is still kept secret from the verifier. In this lecture, we will see a few zero-knowledge protocols.

Zero-Knowledge Proof Protocol

Prover, verifier, and interaction

A zero-knowledge proof protocol is a variant of interactive proof system. In an interactive proof system, typically there are two parties involved: prover and verifier. The way the verifier checks the validity of statement X is through the interaction between the prover and the verifier.

Statement X?

Any statement is a good candidate for our context as long as it is true or false definitely. Examples of statement of X include:

Completeness and Soundness

A good interactive proof system should satisfy completeness and soundness.

Zero-knowledge

Sometimes the prover has an additional secret piece of information about statement X. For example, when X is an encryption, the secret information can be the decryption key. In this case, we can think of two desirable properties that we would like to achieve: Zero-knowledge proofs (ZKP) satisfy both of these seemingly conflicting requirements at the same time!

ZKP for The Ali Baba cave (from Wiki)

In paper How to Explain Zero-Knowledge Protocols to Your Children, the authors convey the basic concepts of a zero-knowledge protocol.

Setting

As shown on the right, we have a cave that is shaped like a ring.
  • There is an entrance on the left side.
  • Inside the case, there is a magic door that blocks people from proceeding.
Given this cave, consider the following scenario:
  • Peggy (prover) has uncovered the secret word used to open a magic door in a cave.
  • Victor (verifier) wants to know whether Peggy knows the secret word.
  • However, Peggy does not want to reveal her knowledge (i.e., the secret word) to Victor.

Protocol



Step 1: Peggy randomly takes either path A or B, while Victor waits outside. Victor is not allowed to see which path she takes.

Step 2: Now, Victor enters the cave and shouts the name of the path he wants her to use to return, either A or B, chosen at random.

Step 3: If Peggy exits from the path that Victor has chosen, Victor declares "accept". Otherwise, Victor declares "reject.

Completeness and Soundness

Zero-knowledge

Now, let's think about the zero-knowledge (ZK) property. That is, we need to check whether the play of this game reveals any information about the secret word.
Warning: The ZK property is meaningful only if the statement is true. If a statement is false, there is no secret to talk about!
Observe that even if Victor is wearing a hidden camera that records the whole game, the only thing the camera will record is as follows: A recording of this type would be trivial for any two people to fake without knowing the secret word, requiring only that Peggy and Victor agree beforehand on the sequence of A's and B's that Victor will shout.

More formal definition of the zero-knowledge (ZK) property generalizes this as follows:

Zero Knowledge Property

Suppose that a given statement is true.

A protocol for this statement is a zero-knowledge if the protocol messages are simulatable without knowing the secret.

ZK Proof of Knowledge for Discrete Logarithm

We can apply these ideas to a more realistic application. Peggy wants to prove to Victor that she knows the discrete log of a given value in a given group.

The protocol proceeds as follows:

Completeness and Soundness

Zero-knowledge

Now, let's think about the zero-knowledge (ZK) property. Recall that this need us to create a simulating strategy of the protocol messages without knowing the secret $x$. \[ \mbox{Sample the protocol messages } (R, c, s) \mbox{ with the following properties: } \] Sampling these messages turns out to be quite easy:
  1. Choose a random $c$.
  2. Choose a random $s$.
  3. Compute $R = g^s \cdot (y^c)^{-1} \pmod{p}$.
  4. Output $(R, c, s)$.

Note in the real protocol, Peggy knows $r$ such that $R = g^r \bmod p$. However, the simulation algorithm doesn't know this. However, this different doesn't matter, as long as $R$ is random, which is the case, the simulation is perfect!

Extensions and Applications

ZKP for any NP problem

Note: The class NP contains all the problems that are verifiable in polynomial time.
It is known that there is a zero-knowledge proof protocol for an NP-complete problem. This means that we also have a zero-knowledge proof protocol for any NP problem.
If you haven't taken the Algorithms course:

Applications