Skip to Content
CSE442TIntroduction to Cryptography (Lecture 23)

CSE442T Introduction to Cryptography (Lecture 23)

Chapter 7: Composability

Zero-knowledge proofs

Let the Prover Peggy and the Verifier Victor.

Peggy wants to prove to Victor that she knows a secret xx without revealing anything about xx. (e.g. xx such that gx=ymodpg^x=y\mod p)

Zero-knowledge proofs protocol

The protocol should satisfy the following properties:

  • Completeness: If Peggy knows xx, she can always make Victor accept.
  • Soundness: If a malicious Prover PP^* does not know xx, then VV accepts with probability at most ϵ(n)\epsilon(n).
  • Zero-knowledge: After the process, VV^* (possibly dishonest Verifier) knows no more about xx than he did before.

[The interaction could have been faked without PP]

Example: Hair counting magician

“Magician” who claims they can count the number of hairs on your head.

secret info: the method of counting.

Repeat the following process for kk times:

  1. “Magician” tells the number of hairs
  2. You remove some hair b{0,1}b\in \{0,1\} from your head.
  3. “Magician” tells the number of hairs left.
  4. Reject if the number of hairs is incorrect. Accept after kk times. (to our desired certainty)

Definition

Let PP and VV be two interactive Turing machines.

Let xx be the shared input, yy be the secret knowledge, zz be the existing knowledge about yy, with r1,r2,,rkr_1,r_2,\cdots,r_k being the random tapes.

VV should output accept or reject after the interaction for qq times.

class P(TuringMachine): """ :param x: the shared input with V :param y: auxiliary input (the secret knowledge) :param z: auxiliary input (could be existing knowledge about y) :param r_i: random message """ def run(self, x)->str: """ :return: the message to be sent to V $m_p$ """ class V(TuringMachine): """ The verifier will output accept or reject after the interaction for $q$ times. :param x: the shared input with P :param y: auxiliary input (the secret knowledge) :param z: auxiliary input (could be existing knowledge about y) :param r_i: random message """ def run(self, q: int)->bool: """ :param q: the number of rounds :return: accept or reject """ for i in range(q): m_v = V.run(i) m_p = P.run(m_v) if m_p!=m_v: return False return True

Let the transcript be the sequence of messages exchanged between PP and VV. Transcript=(m1p,m1v,m2p,m2v,,mqp,mqv)\text{Transcript} = (m_1^p,m_1^v,m_2^p,m_2^v,\cdots,m_q^p,m_q^v).

Define (P,V)(P,V) be the zero-knowledge proof protocol. For a language LL, (P,V)(P,V) is a zero-knowledge proof for LL if:

Language LL is a set of pairs of isomorphic graphs (where two graphs are isomorphic if there exists a bijection between their vertices).

  • (P,V)(P,V) is complete for LL: xL\forall x\in L, \exists “witness” yy such that z{0,1}n\forall z\in \{0,1\}^n, Pr[outv[P(x,y)V(x,z)]=accept]=1Pr[out_v[P(x,y)\longleftrightarrow V(x,z)]=\text{accept}]=1.
  • (P,V)(P,V) is sound for LL: xL\forall x\notin L, P\forall P^*, Pr[outv[P(x)V(x,z)]=accept]<ϵ(n)Pr[out_v[P^*(x)\longleftrightarrow V(x,z)]=\text{accept}]< \epsilon(n).
  • (P,V)(P,V) is zero-knowledge for LL: V\forall V^*, \exists p.p.t. simulator SS such that the following distributions are indistinguishable:
{Transcript[P(x,y)V(x,z)xL,y{0,1}n]}and{S(x,z)xL}.\{\text{Transcript}[P(x,y)\leftrightarrow V^*(x,z)\mid x\in L,y\leftarrow \{0,1\}^n]\}\quad\text{and}\quad\{S(x,z)\mid x\notin L\}.

If these distributions are indistinguishable, then VV^* learns nothing from the interaction.

Example: Graph isomorphism

Let G0G_0 and G1G_1 be two graphs.

VV picks a random permutation πSn\pi\in S_n and sends GπG_\pi to PP.

PP needs to determine if Gπ=G0G_\pi=G_0 or Gπ=G1G_\pi=G_1.

If they are isomorphic, then \exists permutation σ:{1,,n}{1,,n}\sigma:\{1,\cdots,n\}\rightarrow \{1,\cdots,n\} such that G0={(i,j)(i,j)G1}G_0=\{(i,j)\mid (i,j)\in G_1\}.

Protocol:

Shared input x=(G0,G1)\overline{x}=(G_0,G_1) witness y=σ\overline{y}=\sigma. Repeat the following process for nn times, where nn is the number of vertices.

  1. PP picks a random permutation πPn\pi\in \mathbb{P}_n and sends Gπ=π(G0)G_\pi=\pi(G_0) to VV.
  2. VV picks a random b{0,1}b\in \{0,1\} and sends bb to PP.
  3. If b=1b=1, PP sends σ=π1\sigma=\pi^{-1} to VV.
  4. If b=0b=0, PP sends σ=π\sigma=\pi to VV.
  5. VV receives ϕ\phi and checks if b=0b=0 and Gσ=ϕ(G0)G_\sigma=\phi(G_0) or b=1b=1 and Gσ=ϕ(G1)G_\sigma =\phi(G_1). Return accept if true.

If they are not isomorphic, PP rejects with probability 1.

If they are isomorphic, PP accepts with probability 1n!\frac{1}{n!}.

Proof:

  • Completeness: If G0G_0 and G1G_1 are isomorphic, then PP can always find a permutation σ\sigma such that Gσ=G0G_\sigma=G_0 or Gσ=G1G_\sigma=G_1.
  • Soundness:
    • If PP^* knows that VV was going to send b=0b=0, then they will pick Π\Pi and send G=Π(G0)G=\Pi(G_0) to VV. However, if we thought they would send 00 but they sent 11, then G=Π(G1)G=\Pi(G_1) and they would reject.
    • If PP^* knows that VV was going to send b=1b=1, then they will pick Π\Pi and send G=Π(G1)G=\Pi(G_1) to VV. However, if we thought they would send 11 but they sent 00, then G=Π(G0)G=\Pi(G_0) and they would reject.
    • The key is that PP^* can only response correctly with probability at most 12\frac{1}{2} each time.

Continue on the next lecture. (The key is that PP^* can only get a random permutation)

Last updated on