πŸͺ‘ Session chair: Jan (Duties: Read material above-average carefully πŸ€“; prepare fallback discussions/questions (worst-case: just prepare some quiz questions about the material) πŸ™‹. Prepare a few slides to guide the session through subtopics (this is not supposed to be a detailed summary of the material)

✍️ Notetaker: Akira (Duties: Take notes during the session, push them to the wiki afterwards πŸ“. Moderate to get input for the wiki pages 🧠. Make people summarize / dumb down discussion results to keep things comprehensible for everyone πŸ§‘β€βš–οΈ.)

🎯 Goals

This session covers the KZG commitment and PLONKish PolyIOP. We will particularly focus on the following contents from Lecture 5 (see πŸ“š Material).

  1. The KZG polynomial commitment scheme

    • Efficiency: commitment size, proof size, proving time, verification time
    • Compiling the equality check IOP with KZG
    • Security will be covered in the next session
  2. Simple-PLONK PolyIOP

    • Gadgets for univariate polynomials: ZeroTest, SumCheck, ProdCheck, (Prescribed) Permutation Check (cf. Univariate Poly Tricks)
    • PLONK’s arithmetization

❓ Quiz Questions

KZG

  • Why does have to be discarded? How would you break the binding property using ?
  • What does the Lagrange ”selector” polynomial do?
  • Can you safely publish both the β€œnormal” KZG pp and the β€œLagrange” KZG pp at the same time?
  • If proofs are so much shorter, why don’t we just use KZG as a vector commitment everywhere instead of Merkle trees?

Polynomial gadgets

  • What’s the advantage of using the subgroup as a set for the ZeroTest/ProdCheck?
  • Can we do an efficient ZeroTest/ProdCheck on arbitrary subsets? Or do we crucially need the subgroup properties?
  • What is the role of the second polynomial variable () in the prescribed permutation check?

Arithmetization

  • does the prover actually have to run FFT to compute the coefficients of the computation trace polynomial?
  • how many polynomials does the IOP prover commit to? How many are computed by the verifier? How many can be computed during preprocessing?

πŸ“š Material

πŸ“ Notes

Subsession 1-3 (July 13, 20, 27)

Overview of KZG Polynomial Commietment

  • To support polynomials of degree at most as input, of KZG must be run by a trusted party who makes sure to β€žforgetβ€œ the secret exponent . Revealing is devastating in many ways. For example, it is easy to break evaluation binding with the knowledge of :
    1. Given , generate a commitment
    2. Upon receiving an evaluation point , pick an arbitrary fake statement . Generate a fake opening proof . Such always gets accepted by a verifier.
  • With known , one can generate arbitrary power of tau , which also allows to break the maximum degree bound of supported polynomials.
  • To verify KZG opening proof, the verifer does not need to know the entire SRS---only is sufficient. This is because the verification equation is simply .
  • Some times, the input polynomial is represented in point-value form rather than a vector of coefficients. In that case, it is more convenient to turn the SRS into Lagrange form . Then the committing operation only takes linear time in , instead of spent on NTT to move to the coefficient representation.
  • Feist-Khovratovich algorithm for fast multi-point proof generation
    • To generate KZG proofs for opening proofs in such that , a naive method requires time if .
    • The FK algorithm can speed it up to achieve , taking advantage of NTT!

Commit-and-Prove IOP gadgets

Zero Test on :
  • The vanishing polynomial of of size is . By choosing where is a primitive -th root of unity, the vanishing polynomial splits completely in . This form is easy to deal with, because evaluation of of is simple double-and-add and only takes field multiplications.
  • Compiled ZeroTest on can be slightly optimized using KZG. That is, the prover directly computes as amortized opening proofs for . The verifier can check
Product Check on :
  • Core idea: (1) Construct a degree- polynomial which encodes β€œthe -th parttial product of ” (i.e. ) at for , and (2) invoke Zero Test on for the polynomial .
  • Q. How many queries does the verifier make? - 5
    • at
    • at
    • at , , and
Permutation Check: for some permutation
  • Q. To prove is a permutation of , why can’t we just rely on the equality check for and ?
    • A. Without Product Check, the verifier cannot (efficiently) check that are correctly constructed from
  • Q. Why 6 queries?
    • at
    • at
    • at
    • at , , and
Prescribed Permutation Check:
  • Naive approach (i.e. invoking Zero Test on ) is still okay for constructing SNARK in theory.
    • Linear time prover is usually not a requirement for SNARK. We only care about the verification time and proof size.

Simple-PLONK

  • Remark: The original PLONK construction encodes left, right, output wires separately into polynomials , respectively. The present construction simplifies it by combining them in a single of degree .

  • The selector polynomial only encodes binary info, but if we need more gate types than just addition and multiplication, we can generalize in a straightforward manner.

  • We can construct PolyIOP for PLONK constraint systems by taking advantage of the above commit-and-prove gadgets:

  1. Input Check:
  2. Gate-by-Gate Check:
  3. Wiring Check:
  • Q. Why the soundness error ?

    • A. In Gate-by-Gate Check (realized by Zero Check on the polynomial F(X)), the prover sends which has degree at most because:
      • ;
      • ;
      • ;
      • assuming ;
      • and therefore,
  • Q. On page 53, why and are β€œuntrusted”?

    • A. Anyone can publicly check that and are correctly constructed from the circuit constraints (in the offline phase). No need to rely on any trusted third party generating them correctly.