AI summary by TwinMind
Lecture 9: BARGs Implies SNARGs and Connection to Non-Signaling PCPs, Part 1
MIT OpenCourseWare
1h 27m 27s
Course Conclusion & Overview
- Last class of cryptography course before break
- Cookies provided to make final class "sweet"
- Goal: construct SNARKs (Succinct Non-interactive Arguments of Knowledge) using building blocks developed throughout course
- Entire course was buildup to SNARK construction
BARG Review (Batch Arguments)
- Definition: prove many instances belong to NP language
- Three algorithms: Gen, Prov, Ver
- Gen: takes security parameter λ (unary), K instances (binary), N instance length (binary)
- Outputs CRS
- Runs in poly(λ) but poly log K, poly log N
- Prov: takes CRS, X₁...Xₖ with witnesses
- Outputs proof π of size poly(λ) + log K (succinct - depends only logarithmically on K)
- Ver: takes CRS, instances, proof → outputs 0/1
BARG Properties
- Completeness: valid witnesses generate accepting BARGs with probability 1
- Soundness: cheating prover cannot convince of false statement
- Semi-adaptive soundness: adversary commits to cheating location i before seeing CRS
- For any poly-size P, any i: probability P outputs X₁...Xₖ, π where Xᵢ ∉ L and π accepted is negligible
- Index Languages: if X₁...Xₖ have succinct description (machine M where Xᵢ = M(i)), verifier runtime grows with |M|, not K
Somewhere Extractable Hash Functions
- Five PPT algorithms: Gen, Eval, Open, Ver, Extract
- Gen: takes λ, n (input length), i (binding location) → outputs hash key HK, trapdoor TD
- Eval: takes HK, X ∈ {0,1}ⁿ → outputs hash value V
- Open: takes HK, X, index j → outputs opening ρⱼ
- Ver: takes HK, V, j, bit b, opening ρⱼ → outputs 0/1
- Extract: takes TD, V → outputs bit Xᵢ
Properties
- Completeness: honest openings always verify, extract outputs correct bit
- Index Hiding: hash keys for different indices are computationally indistinguishable
- Somewhere Statistically Binding (SSB): even all-powerful adversary cannot open location i to both 0 and 1
- Binding extends to all locations j computationally due to index hiding
- Multiple Locations: can bind on L locations by generating L hash keys, repeating L times
- Even revealing some trapdoors keeps other indices hidden
Construction Details - Somewhere Extractable Hash
- Based on Fully Homomorphic Encryption (FHE)
- Basic idea (doesn't work): Gen outputs encryption of index i, trapdoor is secret key
- Issue: malicious adversaries can provide garbage ciphertexts, breaking binding
- Solution: Use n public keys (one per layer), encrypt both iⱼ and secret key skⱼ₋₁
- Evaluation: decrypt both children, choose relevant one based on encrypted bit, re-encrypt
- Key insight: even if sibling ciphertexts are malformed, path ciphertexts remain well-formed through decryption process
SNARK Construction
Ingredients
- BARG (batch argument system)
- Somewhere extractable hash function
Algorithms
Gen(1^λ, n):
- Generate hash key HK for somewhere extractable hash
- Parameters: λ, number of wires in circuit C, binding locations i₁...iₗ
- Generate CRS_BARG for BARG
- Parameters: λ, K = number of gates in C, n' = statement length
- Output CRS = (HK, CRS_BARG)
Prover(CRS, X, witness):
- Compute all wire values W₁...Wₙ in verification circuit C (excluding input X)
- Compute hash value V = Eval(HK, W₁...Wₙ)
- Generate BARG proof π_BARG for K statements:
- For each gate j: prove existence of valid openings to input/output wires satisfying gate constraints
- Statement Xⱼ* = (HK, V, j)
- Witness Wⱼ* = (left_bit, right_bit, output_bit, ρ_left, ρ_right, ρ_output)
- Output π = (V, π_BARG)
Verifier(CRS, X, π):
- Parse π = (V, π_BARG)
- Run V_BARG(CRS_BARG, X₁...Xₖ, π_BARG) where Xⱼ* = (HK, V, j)
- Accept iff BARG verifies
Efficiency
- SNARK size: |V| + |π_BARG| = poly(λ) + L·poly(λ) + polylog(K)
- Verifier runtime: polylog(K) + |X| (due to index language property)
- L should ideally be polylog(K) for optimal succinctness
