Zero Knowledge Proofs / Secure Computing
Notes and reference for some intro crypt + zero knowledge, moving towards secure AI content. IN PROGRESS.
1. Intro
AI inference services require blind trust. Key security risks are privacy of the user’s input and integrity of the server’s output. Ideally, we want private and verifiable computation. The user should send an encrypted question to a trustworthy server which computes and the encrypted response. The user can then decryp the response and verify that it is the intended output of the model, without learning anything else about the model.
Three key capabilities to learn about:
- zero knowledge proofs
- succinct (non-interactive) proofs
- fully homomorphic encryption.
Zero Knowledge Proofs
What is a proof system? The prover has some claim and creates proof . This proof is sent to the verifier, who will run an algorithm to either accept or reject this proof.
In a zero knowledge proof, a prover wants to convince a verifier that a statement is true without revealing secret evidence.
2.
blah blah blah make up lecture
3. make up lecture
4. Private, verifiable computation (preliminaries)
Previously: DL and collision-resistant hash from DL
Groups of unknown order
A group where the order is computationally hard to compute, defined by group sampling alg
for a succinct (size polynomial in ) description of a group and an upper bound on its order.
The hidden order assumption holds for if for any polynomial time algorithm and distribution:
- a uniformly distributed group element
RSA assumption (fill in)
GUO with trusted setup: the algorithm is allowed to randomly generate secret values that are discarded.
Ex: samples secret primes and outputs defining the group This group has order , which is easy to compute if can be factored.
Collision resistant hash from GUO
- setup: and .
- hash function: input return .
Collision-resistant based on hidden order assumption: if for then .
Statistical distance
The statistical distance between random variables over a finite domain is :
Sequences of random variables are statistically indistinguishable if
Sequences on the same domain are computationally indistinguishable if for any polynomial time algorithm that receives an input and outputs or :
Learning parity with noise
The LPN assumption over a field has a dimension parameter , noise rate , and number of samples .
The assumption is that a list of samples of the form is computationally indistinguishable from a list of samples of the form where
- and are uniform
- is 0 with probability and otherwise uniform in .
Pseudorandom matrix from LPN
where and and all entries of are sampled as on previous slide.
Each entry of has the form
For each get samples of the form
Languages, NP, and P
A language is a subset of strings
A language is in NP if there exists a deterministic polynomial times algorithm and polynomial such that:
- for any there exists a “witness” of length such that
- if then for any of length .
A language is in P if there exists a polynomial time algorithm such that if and only if .
NP relations
A binary relation is a subset of The language of a binary relation is the set
is called an NP relation if the language is in NP.
How to represent algorithms?
- Turing machines (not useful for proof systems)
- Arithmetic circuit families
- RAM programs
Arithmetic circuits
Fix a finite field for some prime
An arithmetic circuit is defined . It is a directed acyclic graph (DAG) where internal nodes are labeled as or . Inputs are labeled . This defines an -variate polynomial with an evaluation recipe.
usually denotes the number of multiplication gates in .
5. Private, verifiable computation
Representing algorithms (above).
Boolean circuits can be represented as arithmetic circuits over :
- encoded as
- encoded as
- encoded as
Proof verification asymptotically faster than program evaluation = verifiable computation.
Sound: infeasible to produce valid proof if prover doesn’t know program Zero knowledge: proof doesn’t reveal anything about the program
Proof system syntax
- A transcript is a recording of messages between prover and verifier
- Prover algorithm:
- algorithm takes input and witness , internal state , transcript , and produces an updated state and next message, which is sent to verifier.
- Verifier algorithm:
- algorithm takes only input , internal state , transcript , and produces and updated state and next message, which is sent back to prover.
Completeness property
Notation: denotes output of verifier on interaction with prover for input and witness .
For all s.t. , there is a probability 1 that .
Soundness property
Notation: the output of verifier on interaction with an adversarial prover algorithm for input and witness .
For any where there does not exist such that and any polynomial time algorithm , the probability that is boundeed by
Weaker SNARKS with trusted setup
We believe there’s some trusted party that creates the parameters and then disappears. Risky because a broken trusted setup is very bad.
Sometimes we can use multi-party trusted setup.
Types of pre-processing setup:
- trusted setup per circuit
- universal trusted setup (secret part of setup not specific to circuit)
- updatable universal trusted setup (public parameters can be updated by anyone)
- transparent (setup does not use secret data at all)
Completeness property with setup
<P(pk, x,w), V(vk, x)> denotes output of verifier on interaction with prover for input and witness .
For all (finish line from slides)
Soundness property with setup
from slides
Knowledge
What does it mean to have knowledge?
Soundness saids that if the prover succeeds, there must exist a witness (except with very small probability). This is too weak for some applications.
“Knowledge soundness” captures the property that the prover must somehow “know” the witness in order to succeed in the protocol.
Knowledge soundness
A protocol is knowledge sound if there exists an extractor algorithm E that can obtain the witness w from any successful prover (informal).
E can run A for any number of steps, rewind A to a previous state, and re-run A on different inputs.
For every adversarial prover and input that causes verifier to accept with non-negligible probability, outputs such that with high probability.