跳转到主要内容

热门内容

今日:


总体:


最近浏览:


Chinese, Simplified

category

Overview of Polynomial Commitments #

Polynomial commitment schemes allow one party to prove to another the correct evaluation of a polynomial at some set of points, without revealing any other information about the polynomial. A generalization of scalar commitment schemes such as Pedersen commitments, polynomial commitments are an important building block in zero-knowledge protocols; once the prover has committed to a polynomial, the verifier can query the value of the polynomial at one or many points and be assured that the responses are consistent with some predetermined polynomial which was selected without knowledge of the challenge queries.

Kate et. al.’s polynomial commitment scheme [KZG2010] consists, similarly to Pedersen commitments, of two phases.

  • During the commit phase,   Prover
    Prover

    generates a commitment to some polynomial \(\varf(\varx)\) 
    f(x)

    and shares it with Verifier
    Verifier

    .

  • During the open phase,
    Prover

    evaluates
    f

    at some point
    x0

    and sends
    x0,f(x0),w

    , where
    w

    is a proof (or “witness”) such that
    Verifier

    can check the correct evaluation of
    f

    at
    x0

    .

The commitment satisfies certain security properties:

  • Hiding: Given a commitment to an unknown degree-
    t

    polynomial
    f

    and up to
    t

    openings
    x1,f(x1),w1,,xt,f(xt),wt

    , one cannot find the value of
    f

    at any point not already queried.

  • Binding: It is computationally infeasible to construct a commitment
    C

    and two distinct valid openings
    x0,y,w,x0,y,w

    at the same point
    x0

    .


Applications of Polynomial Commitments #

Polynomial commitments serve as an important component of several modern noninteractive proof systems.

Vector Commitments #

Given a vector \(\vec{v} = [v_1, v_2, \dots, v_n]\) we can create a succinct commitment to the whole vector v 
v

by interpolating a degree- \((n-1)\) 
(n1)

polynomial  f such that  \(\varf(i) = v_i\)
f(i)=vi

. This enables provers to commit to a vector of field elements such that openings prove the value at a specific index. Vector commitments can in turn be used as a building block for Verkle Trees, a variant of Merkle trees with extremely small proof sizes.

zkSNARKs #

Polynomial commitment schemes are a core primitive in zkSNARKs such as [PLONK] and [Groth16] . These general-purpose zero knowledge proofs encode computations as polynomial identity constraints and then use openings of polynomial commitments at random points to verify polynomial equality. The power of polynomial commitments here comes from the fact that two distinct degree-
t

polynomials over a field of order
q>t

may intersect in at most
t

points, and thus agree at a random point with probability at most
tq

.


The KZG Construction #

Bilinear Pairings #

KZG is a pairing-based protocol, meaning it works over a group with an efficiently computable bilinear pairing.

Let
G1

,
G2

and
GT

be abelian groups of prime order
q

.
G1

and
G2

will be written additively while
GT

will be multiplicative. A bilinear pairing is an efficiently computable function
e:G1×G2GT

such that

$$ e(a\cdot x, b \cdot y) = e(x, y)^{ab} $$


e(ax,by)=e(x,y)ab

for all  \(x \in \cgroup_1, y \in \cgroup_2 \)
xG1,yG2

. We generally assume that
e

is non-degenerate, meaning that
e

is not the trivial function mapping all pairs to
1GT

.

The KZG commitment scheme was originally presented in the “type-1” setting, where
G1=G2

. In practice, and in our presentation here, the scheme is generally implemented in the “type-3” setting, where
G1G2

in the sense that there is no efficiently computable isomorphism between the two groups.

Common choices of pairing-friendly groups are the Barreto-Naehrig [BN05] and Barreto-Lynn-Scott curves [BLS12-381] .

Trusted Setup #

KZG requires a setup procedure to be carried out by a trusted third party. In practice this setup is often performed as a distributed multiparty computation, such that as long as one participant is honest the setup is secure.

The public parameters are
G1

,
G2

and
GT

, with generators
g1G1,g2G2

and
e:G1×G2GT

a nondegenerate bilinear pairing. Let
tN

also be publicly chosen;
t

will be the maximum degree of committed polynomials.

The setup procedure then computes

$$ \begin{align*}
\mathbf{SK} &= \sample{\alpha}\\
\mathbf{PK} &= \langle g_1, \alpha\cdot g_1, \alpha^2 \cdot g_1, \dots, \alpha^t \cdot g_1, g_2, \alpha \cdot g_2\rangle
\end{align*} $$


SK=α$ZqPK=g1,αg1,α2g1,,αtg1,g2,αg2

and publishes
PK

.

This pre-generated
PK

is sometimes known as a “Structured Reference String”


SK

must be kept secret and destroyed.

If a party knows the value
α

then they can forge openings of a commitment to
f

at
x0

with putative value
y

by computing


w=(f(α)/(αx0)y)g1

Commit #

A commitment to a polynomial
f

is simply the group element
f(α)g1

. Because the prover does not know
α

and thus cannot compute the value
f(α)

directly, the evaluation is carried out in the exponent as follows:

Given
PK

, to form a commitment to
fZq[X]

with
f(X)=i=0tciXi

, compute and publish
C=i=0tci(αig1)

Open #

For any degree-
t

polynomial
f

, the polynomial
(f(X)f(x0))

has a root at
x0

and thus can be factored as
f(X)f(x0)=(Xx0)fx0(X)

for some degree-
(t1)

polynomial
fx0

. The witness to an opening of
f

at
x0

is then
w=fx0(α)g1

.

More concretely, to open a commitment
C

to polynomial
f

at point
x0

, compute the quotient
fx0(X)=f(X)f(x0)Xx0=i=0tciXi

and compute the witness as
w=fx0(α)g1=i=0tci(αig1)

Reveal
x0,f(x0),w

.

Verify #

Verification of an opening of \(\varf\) at \(\varx_0 \) 
x0

with witness  \(\varw = \varf_{\varx_0}(\alpha)\cdot g_1 \)
w=fx0(α)g1

amounts to checking in the exponent that \( \varf(\alpha) \equalQ (X- \varx_0)(\alpha) \cdot \varf_{\varx_0}(\alpha) + \varf(\varx_0) \)
f(α)=?(Xx0)(α)fx0(α)+f(x0)

. Since the prover does not know the value of \( \alpha\)
α

, we can think of the check as happening at a random point and thus with high probability succeeds only if the polynomial identity  \(\varf(X) \equalQ (X- \varx_0) \cdot \varf_{\varx_0}(X) + \varf(\varx_0) \)
f(X)=?(Xx0)fx0(X)+f(x0)

holds at all points.

Concretely, to verify an evaluation \( \langle \varx_0, \varf(\varx_0), \varw \rangle \)
x0,f(x0),w

on commitment  \(\varC\) , check

$$e(\varC, g_2) \equalQ e(\varw, \alpha \cdot g_2 - \varx_0 \cdot g_2) \cdot e(g_1, g_2)^{\varf(\varx_0)}$$
e(C,g2)=?e(w,αg2x0g2)e(g1,g2)f(x0)

To see that the scheme is complete in the sense that every correctly computed opening passes verification, we compute

$$ \begin{align*}
&e(\varw, \alpha \cdot g_2 - \varx_0 \cdot g_2) \cdot e(g_1, g_2)^{\varf(\varx_0)}\\
&= e(\varf_{\varx_0}(\alpha)\cdot g_1, (\alpha - \varx_0)\cdot g_2) \cdot e(g_1, g_2)^{\varf(\varx_0)}\\
&= e(g_1, g_2)^{\varf_{\varx_0}(\alpha)\cdot (\alpha - \varx_0) + \varf(\varx_0)}\\
&= e(g_1, g_2)^{\frac{\varf(\alpha) - \varf(\varx_0)}{\alpha - \varx_0} \cdot (\alpha - \varx_0) + \varf(\varx_0)}\\
&= e(g_1, g_2)^{\varf(\alpha)}\\
&= e(\varf(\alpha)\cdot g_1, g_2)\\
&= e(\varC, g_2)
\end{align*} $$
e(w,αg2x0g2)e(g1,g2)f(x0)=e(fx0(α)g1,(αx0)g2)e(g1,g2)f(x0)=e(g1,g2)fx0(α)(αx0)+f(x0)=e(g1,g2)f(α)f(x0)αx0(αx0)+f(x0)=e(g1,g2)f(α)=e(f(α)g1,g2)=e(C,g2)


Hardness Assumptions #

Discrete Logarithm #

The hiding property of KZG commitments relies on the hardness of the discrete logarithm in the group
G1

.


t

-Strong Diffie Hellman #

The binding property requires the
t

-Strong Diffie Hellman (
t

-SDH) assumption: Given
g,αg,,αtg

it is hard to find a pair
c,1α+cg

. This is a slightly stronger form of the
t

-Polynomial Diffie Hellman assumption that, given
g,αg,,αtg

, it is hard to find
αt+1g

.


t

-SDH implies the computational Diffie Hellman assumption, as well as the hardness of the discrete logarithm problem.


KZG Variants #

Indistinguishable and Unconditionally hiding (“Pedersen”) variants #

The KZG commitment scheme as presented above can be viewed as a generalization of the Discrete Log commitment
C(x)=xg

. This scheme is binding and is hiding against a computationally-bounded adversary when
x

is chosen uniformly at random, but lacks indistinguishability: if
x

is drawn from a small set known to the adversary then the adversary can distinguish which of the elements was committed. For example, if Alice wants to commit to a single bit
b{0,1}

then she will either publish
0g=0

or
1g=g

and Bob can clearly learn which bit was committed. Pedersen commitments solve this problem by adding a random masking value
r

and an extra random public generator
h

such that
Cr(x)=xg+rh

. This commitment is now indistinguishable and unconditionally hiding: for any value
y

there exists some unique
s

such that
Cr(x)=xg+rh=yg+sh=Cs(y)

, so even a computationally-unbounded adversary cannot learn
x

from
Cr(x)

, if
r

is unknown.

In a similar vein, let
f(x)

be a degree-
t

polynomial.

  • An adversary capable of solving the Discrete Log problem can find the discrete log of
    C(f)=f(α)g1

    and acquire
    α,f(α)

    . Thus the scheme is only computationally hiding.

  • If
    f(x0)

    is chosen from a small set, say
    {0,1}

    , then given
    t

    openings an adversary can “guess and check” the value of
    f(x0)

    . Thus the scheme does not possess indistinguishability.

There are two common approaches to resolve these issues:

  1. Choose one extra point on
    f

    at random: if you want to commit to
    t

    “useful” points, instead commit to
    t+1

    points, where the last point is chosen uniformly at random. Then, any subset of the
    t

    useful points may be revealed without breaking indistinguishability.

  2. Use the “Pedersen Variant”: let
    h1

    be an agreed-upon random generator of
    G1

    . To commit to a degree-
    t

    polynomial
    f

    , choose a random degree-
    t

    polynomial
    f^

    and publish
    f(α)g1+f^(α)h1

    . To open at a point
    x0

    , let
    w=f(α)f(x0)αx0g1+f^(α)f^(x0)αx0h1

    reveal
    f(x0),f^(x0),wI

Security note:
h1

must be chosen independently from
g1

, i.e., no one may know the discrete log of
h1

with respect to
g1

. If Alice knows
s

such that
h1=sg1

then the commitment scheme fails to be binding:

If
h1=sg1

then
Cr(x)=xg1+rh1=xg1+(sr)g1=(x+(yx)+s(ryxs))g1=yg1+(ryxs)h1=Cr(yx)s(y)

$$ \begin{align*} \varC_r(x) &= x \cdot g_1 + r \cdot h_1\\ &= x\cdot g_1 + {(s \cdot r)}\cdot g_1\\ &= (x + (y - x) + s(r - \frac{y - x}{s}))\cdot g_1\\ &= y\cdot g_1 + (r - \frac{y - x}{s})\cdot h_1\\ &= C_{r-\frac{(y - x)}{s}}(y) \end{align*}$$


Security Pitfalls #

  • Small-order elements: Pairing based cryptography often involves elliptic curve groups of composite order. Any elliptic curve points accepted from untrusted parties must be verified to reside in the proper large prime-order subgroup.
  • Polynomial interpolation: If
    t+1

    points on a degree-
    t

    polynomial are revealed, then all further points can be recovered.

  • Trusted setup: If using a trusted setup,
    SK

    must be generated with strong randomness and erased immediately after generating
    PK

    .

References #

本文地址
最后修改
星期二, 一月 28, 2025 - 14:19
Tags
 
Article