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 without revealing anything about . (e.g. such that )
Zero-knowledge proofs protocol
The protocol should satisfy the following properties:
- Completeness: If Peggy knows , she can always make Victor accept.
- Soundness: If a malicious Prover does not know , then accepts with probability at most .
- Zero-knowledge: After the process, (possibly dishonest Verifier) knows no more about than he did before.
[The interaction could have been faked without ]
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 times:
- “Magician” tells the number of hairs
- You remove some hair from your head.
- “Magician” tells the number of hairs left.
- Reject if the number of hairs is incorrect. Accept after times. (to our desired certainty)
Definition
Let and be two interactive Turing machines.
Let be the shared input, be the secret knowledge, be the existing knowledge about , with being the random tapes.
should output accept or reject after the interaction for 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 TrueLet the transcript be the sequence of messages exchanged between and . .
Define be the zero-knowledge proof protocol. For a language , is a zero-knowledge proof for if:
Language is a set of pairs of isomorphic graphs (where two graphs are isomorphic if there exists a bijection between their vertices).
- is complete for : , “witness” such that , .
- is sound for : , , .
- is zero-knowledge for : , p.p.t. simulator such that the following distributions are indistinguishable:
If these distributions are indistinguishable, then learns nothing from the interaction.
Example: Graph isomorphism
Let and be two graphs.
picks a random permutation and sends to .
needs to determine if or .
If they are isomorphic, then permutation such that .
Protocol:
Shared input witness . Repeat the following process for times, where is the number of vertices.
- picks a random permutation and sends to .
- picks a random and sends to .
- If , sends to .
- If , sends to .
- receives and checks if and or and . Return accept if true.
If they are not isomorphic, rejects with probability 1.
If they are isomorphic, accepts with probability .
Proof:
- Completeness: If and are isomorphic, then can always find a permutation such that or .
- Soundness:
- If knows that was going to send , then they will pick and send to . However, if we thought they would send but they sent , then and they would reject.
- If knows that was going to send , then they will pick and send to . However, if we thought they would send but they sent , then and they would reject.
- The key is that can only response correctly with probability at most each time.
Continue on the next lecture. (The key is that can only get a random permutation)