Batch-Opening KZG Commitments at One Point: A Lemma and Its Proof

· Updated

A polynomial commitment lets a prover commit to a polynomial ff and later open its value at any point convincingly. In the KZG scheme1 both the commitment and an opening proof are a single group element, which makes it a building block of proof systems such as PLONK. In practice a verifier often needs tt polynomials opened at the same point zz: checking them one by one costs 2t2t pairings, and a single random linear combination brings that down to 22.2 This note takes the lemma behind that step on its own and proves it in full.

Notation

Let G1,G2,GT\G_1, \G_2, \G_T be cyclic groups of prime order pp with generators g1,g2,gTg_1, g_2, g_T, let e ⁣:G1×G2→GTe\colon \G_1 \times \G_2 \to \G_T be a non-degenerate bilinear map, and let F=Fp\F = \F_p. For a∈Fa \in \F write [a]1=a⋅g1\gi{a} = a \cdot g_1 and [a]2=a⋅g2\gii{a} = a \cdot g_2.

Definition (KZG polynomial commitment)

Let dd be a degree bound. The trusted setup picks a random τ←F\tau \gets \F, outputs

srs=([1]1, [τ]1, [τ2]1, …, [τd]1;    [1]2, [τ]2)\srs = \bigl(\gi{1},\, \gi{\tau},\, \gi{\tau^2},\, \dots,\, \gi{\tau^d};\;\; \gii{1},\, \gii{\tau}\bigr)

and destroys τ\tau. For any f∈F[X]f \in \F[X] with deg⁡f≤d\deg f \le d:

  • Commit: com(f)=[f(τ)]1\com(f) = \gi{f(\tau)}, which can be computed linearly from srs\srs;
  • Open: to prove f(z)=vf(z) = v, let q(X)=f(X)−vX−zq(X) = \dfrac{f(X) - v}{X - z}; the proof is π=[q(τ)]1\pi = \gi{q(\tau)};
  • Verify: accept if and only if e(C−[v]1, [1]2)=e(π, [τ]2−[z]2)e\bigl(C - \gi{v},\, \gii{1}\bigr) = e\bigl(\pi,\, \gii{\tau} - \gii{z}\bigr).

The verification equation holds because qq is a polynomial if and only if (X−z)∣f(X)−v(X - z) \mid f(X) - v, that is, if and only if f(z)=vf(z) = v.

Batch opening at one point

Suppose the prover has committed to f1,…,ftf_1, \dots, f_t with commitments Ci=com(fi)C_i = \com(f_i), and claims fi(z)=vif_i(z) = v_i for every ii. The protocol:

  1. The verifier sends a random challenge γ←F\gamma \gets \F (non-interactively, γ\gamma comes from the Fiat–Shamir transform);
  2. The prover computes the batched quotient h(X)=∑i=1tγi−1⋅fi(X)−viX−zh(X) = \sum_{i=1}^{t} \gamma^{i-1} \cdot \dfrac{f_i(X) - v_i}{X - z} and sends π=[h(τ)]1\pi = \gi{h(\tau)};
  3. The verifier computes Cγ=∑i=1tγi−1CiC_\gamma = \sum_{i=1}^{t} \gamma^{i-1} C_i and vγ=∑i=1tγi−1viv_\gamma = \sum_{i=1}^{t} \gamma^{i-1} v_i, and accepts if and only if
e(Cγ−[vγ]1, [1]2)=e(π, [τ]2−[z]2).e\bigl(C_\gamma - \gi{v_\gamma},\, \gii{1}\bigr) = e\bigl(\pi,\, \gii{\tau} - \gii{z}\bigr).

Write Fγ(X)=∑i=1tγi−1(fi(X)−vi)F_\gamma(X) = \sum_{i=1}^{t} \gamma^{i-1}\bigl(f_i(X) - v_i\bigr). An honest prover has Cγ−[vγ]1=[Fγ(τ)]1C_\gamma - \gi{v_\gamma} = \gi{F_\gamma(\tau)} and Fγ(X)=h(X) (X−z)F_\gamma(X) = h(X)\,(X - z), so completeness follows directly from bilinearity:

e(Cγ−[vγ]1, [1]2)=e([Fγ(τ)]1, [1]2)=e([h(τ) (τ−z)]1, [1]2)=e([h(τ)]1, [τ−z]2)=e(π, [τ]2−[z]2).\begin{aligned} e\bigl(C_\gamma - \gi{v_\gamma},\, \gii{1}\bigr) &= e\bigl(\gi{F_\gamma(\tau)},\, \gii{1}\bigr) \\ &= e\bigl(\gi{h(\tau)\,(\tau - z)},\, \gii{1}\bigr) \\ &= e\bigl(\gi{h(\tau)},\, \gii{\tau - z}\bigr) = e\bigl(\pi,\, \gii{\tau} - \gii{z}\bigr). \end{aligned}

Expanding hh in full gives the long expression below (it also tests horizontal scrolling on narrow screens):

h(X)=f1(X)−v1X−z+γ⋅f2(X)−v2X−z+γ2⋅f3(X)−v3X−z+γ3⋅f4(X)−v4X−z+⋯+γt−1⋅ft(X)−vtX−z=1X−z∑i=1tγi−1(fi(X)−vi).h(X) = \frac{f_1(X) - v_1}{X - z} + \gamma \cdot \frac{f_2(X) - v_2}{X - z} + \gamma^{2} \cdot \frac{f_3(X) - v_3}{X - z} + \gamma^{3} \cdot \frac{f_4(X) - v_4}{X - z} + \cdots + \gamma^{t-1} \cdot \frac{f_t(X) - v_t}{X - z} = \frac{1}{X - z} \sum_{i=1}^{t} \gamma^{i-1} \bigl(f_i(X) - v_i\bigr).

The lemma and its proof

The heart of soundness: if even one claimed value is wrong, then after the random linear combination it is, with overwhelming probability, still wrong.

Lemma (Random linear combination)

Let f1,…,ft∈F[X]f_1, \dots, f_t \in \F[X] and z,v1,…,vt∈Fz, v_1, \dots, v_t \in \F, with FγF_\gamma as above. If fj(z)≠vjf_j(z) \neq v_j for some jj, then

Pr⁡γ←F[ (X−z)∣Fγ(X) ]  ≤  t−1∣F∣.\Pr_{\gamma \gets \F}\Bigl[\, (X - z) \mid F_\gamma(X) \,\Bigr] \;\le\; \frac{t-1}{|\F|}.
Proof

By the remainder theorem, (X−z)∣Fγ(X)(X - z) \mid F_\gamma(X) if and only if Fγ(z)=0F_\gamma(z) = 0. Read Fγ(z)F_\gamma(z) as a polynomial in γ\gamma:

P(γ)=∑i=1t(fi(z)−vi) γi−1  ∈  F[γ].P(\gamma) = \sum_{i=1}^{t} \bigl(f_i(z) - v_i\bigr)\, \gamma^{i-1} \;\in\; \F[\gamma].

Its degree is at most t−1t - 1, and the coefficient of γj−1\gamma^{j-1} is fj(z)−vj≠0f_j(z) - v_j \neq 0, so PP is not the zero polynomial. A nonzero polynomial over a field has no more roots than its degree, so at most t−1t - 1 values of γ\gamma give P(γ)=0P(\gamma) = 0; since γ\gamma is uniform over F\F, the probability is at most (t−1)/∣F∣(t-1)/|\F|.

Theorem (Soundness of batch opening, informally)

Assume the single-polynomial KZG scheme is evaluation binding, and that the polynomial fif_i behind every commitment CiC_i the adversary outputs can be extracted (for instance in the algebraic group model3). Then for any polynomial-time adversary, the probability that batch verification passes while fj(z)≠vjf_j(z) \neq v_j for some jj is at most (t−1)/∣F∣+negl(λ)(t-1)/|\F| + \negl(\lambda).

Proof

(Sketch.) Suppose verification passes and fj(z)≠vjf_j(z) \neq v_j for some jj. By Lemma 1, except with probability at most (t−1)/∣F∣(t-1)/|\F|, we have Fγ(z)≠0F_\gamma(z) \neq 0. Then Cγ−[vγ]1C_\gamma - \gi{v_\gamma} is a commitment to the polynomial FγF_\gamma, and the adversary’s π\pi opens it to 00 at zz; the reduction, knowing every fif_i, can honestly compute a proof that opens the same commitment at zz to Fγ(z)≠0F_\gamma(z) \neq 0. Two valid openings of one commitment at one point, with different values, contradict evaluation binding.

Cost

One at a timeBatched
Proof sizett elements of G1\G_111 element of G1\G_1
Pairings2t2t22
Scalar multiplications in G1\G_1about 2t2tabout t+1t + 1
Extra soundness lossnone(t−1)/∣F∣(t-1)/\lvert\F\rvert

For ∣F∣≈2255|\F| \approx 2^{255} and the t≤210t \le 2^{10} that occur in practice, this loss is entirely negligible.

Footnotes

  1. Aniket Kate, Gregory M. Zaverucha, Ian Goldberg, “Constant-Size Commitments to Polynomials and Their Applications”, ASIACRYPT 2010. ↩︎

  2. Ariel Gabizon, Zachary J. Williamson, Oana Ciobotaru, “PLONK: Permutations over Lagrange-bases for Oecumenical Noninteractive arguments of Knowledge”, IACR ePrint 2019/953. ↩︎

  3. Georg Fuchsbauer, Eike Kiltz, Julian Loss, “The Algebraic Group Model and its Applications”, CRYPTO 2018. ↩︎

评论