ZKP9 SNARKs based on Linear PCP (Pinocchio & Groth16)

ZKP学习笔记

ZK-Learning MOOC课程笔记

Lecture 9: SNARKs based on Linear PCP (Yupeng Zhang)

  • SNARKs learned so far
    在这里插入图片描述

  • Earliest Implemented SNARKs

    • Pros
      • Shortest proof size (3 elements [Groth16])
      • Fast verifier (bilinear pairing)
    • Cons
      • FFT and group exponentiations on the prover
      • Circuit-specific trusted setup
  • History of SNARKs
    在这里插入图片描述

9.1 Quadratic Arithmetic Program (QAP)

  • Recall: SNARKs for circuit-satisfiability
    在这里插入图片描述

  • Transcript/trace of Circuit

    • Interactive proof (lecture 4, slide 76): value of every gate
    • Plonk (lecture 5, slide 42): left input, right input, output of every gate
    • QAP: input + output of every multiplication gate
  • QAP

    • Ignore the output of the addition gates
      在这里插入图片描述

    • Labeling multiplication gates

    • Selector Polynomials

      • l i ( x ) l_i(x) li(x): is c i c_i ci the left input of gate 𝑗, for 𝑗 = 1,2,3?

        • Examples:
          在这里插入图片描述

          For l 1 ( x ) l_1(x) l1(x):

          • 3 is the left input of gate 1? Yes! -> 1
          • 3 is the left input of gate 2? No! -> 0
          • 3 is the left input of gate 3? No! -> 0
            在这里插入图片描述

          For l 3 ( x ) l_3(x) l3(x):

          • 1 is the left input of gate 1? No! -> 0
          • 1 is the left input of gate 2? No! -> 0
          • 1 is the left input of gate 3?
            • Yes! -> 1
            • Because “1” is the input of the addition gate, and the addition gate is the left input of gate 3
              在这里插入图片描述
      • Properties of the selector polynomials
        在这里插入图片描述

      • More Selector Polynomials

        • r i ( x ) r_i(x) ri(x): is c i c_i ci the right input of gate 𝑗, for 𝑗 = 1,2,3?
          在这里插入图片描述

        • o i ( x ) o_i(x) oi(x): is c i c_i ci the output of gate 𝑗, for 𝑗 = 1,2,3?
          在这里插入图片描述

      • Master polynomial
        在这里插入图片描述

      • Vanishing polynomial
        在这里插入图片描述

  • Circuit-SAT to QAP [GGPR13, PGHR13]
    在这里插入图片描述

在这里插入图片描述

  • The table is sparse.

9.2 From QAP to SNARK

  • Probabilistically Checkable Proofs (PCP)
    在这里插入图片描述

  • IPCP [Kalai-Raz’08] and IOP [Ben-Sasson-Chiesa-Spooner’16]
    在这里插入图片描述

  • Polynomial IOP [Bünz-Fisch-Szepieniec’20]
    在这里插入图片描述

  • Linear PCP [Ishai-Kushilevitz-Ostrovsky’07]
    在这里插入图片描述

  • QAP and Linear PCP
    在这里插入图片描述

    • We don’t use random checks.
  • Key Generation

    • The c i c_i ci and q ( x ) q(x) q(x) are private
    • The selector polynomials and the vanishing polynomial are public.
    • The circuit can be pre-processed. (The preprocessing phase is circuit-dependent)
      在这里插入图片描述
  • Prove
    在这里插入图片描述

  • Verify
    在这里插入图片描述

  • Towards the real protocol

    • Q1: How to make sure π 1 \pi_1 π1 is computed from g l i ( τ ) g^{l_i(\tau)} gli(τ)

      • Solution: Knowledge of Exponent assumption (KoE) or Generic Group Model (GGM)

      • Recall: KoE
        在这里插入图片描述

      • Recall: GGM
        在这里插入图片描述

    • Q2: how to make sure the same c c c is used in π 1 \pi_1 π1, π 2 \pi_2 π2 and π 3 \pi_3 π3?

      • Solution
        在这里插入图片描述
    • Q3: What about public input and output?
      在这里插入图片描述

      • I m i d I_{mid} Imid: secret witness
      • I i o I_{io} Iio: public input and public output
  • Putting everything together
    在这里插入图片描述

  • Properties of SNARK [PGHR13]
    在这里插入图片描述

9.3 Other variants

  • Rank-1-Constraint-System (R1CS)

    • QAP
      在这里插入图片描述

    • R1CS:
      在这里插入图片描述

      • Advantages
        • Can support generalized constraints or gates
        • more convenient to use in practice
      • Matrix View of R1CS
        在这里插入图片描述
  • Groth16
    在这里插入图片描述

    • Combine the π 3 \pi_3 π3, π 4 \pi_4 π4, π 5 \pi_5 π5 of [PGHR13] together
      • α \alpha α and β \beta β are secret keys in the trusted key generation, and g α g^\alpha gα and g β g^\beta gβ are public parameters for the prover and the verifier
      • π 3 \pi_3 π3: move the Σ i = 1 m c i × o i ( x ) \Sigma_{i=1}^m c_i \times o_i(x) Σi=1mci×oi(x) to the right side of the equation -> Σ i = 1 m c i × o i ( x ) + V ( x ) q ( x ) \Sigma_{i=1}^m c_i \times o_i(x) + V(x)q(x) Σi=1mci×oi(x)+V(x)q(x)
    • Change the keygen accordingly
    • Proof size: 3 group elements, 144 bytes
    • Verifier time: 1 pairing equation
  • Achieving Zero-Knowledge

    • The above is not zero-knowledge, because the adversary can infer some information by brute force attack.
    • Solution: add some random values (times the vanishing polynomial)
      • The [PGHR13] version:
        在这里插入图片描述
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值