Try   HackMD

Image Not Showing Possible Reasons
  • The image file may be corrupted
  • The server hosting the image is unavailable
  • The image path is incorrect
  • The image format is not supported
Learn More →

Univarite polynomials are functions of the form

f(x)=a0x0+a1x1+a2x2+...+anxn with a single scalar input (univariate)
x
and a scalar output. Coefficients
fa=[a0,a1,...,an]
of a univariate polynomial
f
of maximal degree
n
(
an=0
etc. must be considered, hence maximal qualifier) uniquely identifies it and differentiates it from other univariate polynomials of maximal degree
n
.

On the other hand, this is not the only way to identify and represent a polynomial of maximal degree

n. Knowing the evaluation of the polynomial at any
n+1
unique points, also identifies and represents such a polynomial, i.e. given a unique set of points
x¯=[x0,x1,x2,...,xn]
,
fx¯=[(x0,f(x0)),(x1,f(x1)),(x2,f(x2)),...,(xn,f(xn))]
is a representation that identifies
f
among all such polynomials as well. Mapping this representation
fx¯
to the polynomial
f(x)
is accomplished through Lagrange interpolation.
f(x)=i=1nlxi(x)f(xi)(Green in the figure below.)lxi(x)=j=0,jinxxjxixj(Blue/animated in the figure.)

Image Not Showing Possible Reasons
  • The image file may be corrupted
  • The server hosting the image is unavailable
  • The image path is incorrect
  • The image format is not supported
Learn More →

The goal of this chapter is to discuss commitments to univariate polynomials. An obvious question that follows is, since we can represent a polynomial

f as the coefficient vector
fa
or the evaluation vector
fx¯
of length
n+1
, can we not simply commit to these representation vectors and be done? Are vector commitment schemes equivalent to univariate polynomial commitment schemes?

Vector commitment schemes are not equivalent to polynomial commitment schemes. Even though polynomials can be represented by these fixed length vectors, a polynomial commitment scheme in our classification requires the ability to open/reveal evaluations of the polynomial at random points without revealing the entire polynomial (hiding property), which is not possible when we commit directly to these vector represenations instead and open them through the vector commitment scheme.

Evaluating a polynomial at distinct random points as many times as the degree of the polynomial could in principle reveal the entire polynomial (this would require knowing the maximal degree first). However, single point evaluations should reveal minimal information for the commitment scheme to be classified a polynomial commitment.

In other words, if we commit to

fa or
fx¯
using a vector commitment scheme, and wish to create an opening for a random point
x+
(not in
x¯
) and validate its evaluation candidate
fx+=f(x+)
to the public, we cannot do so without revealing the entire set of coefficients of the polynomial. This is due to the fact that a vector commitment scheme is designed only for accommodating partial openings of the vector and therefore it can partially open a coefficient (or an evaluation at a point in
x¯
) but not the evaluation of the polynomial at a random point.

However, as we will see later in our reduction of polynomial commitment schemes to vector commitment schemes, any polynomial commitment can simulate a vector commitment, as we can simply commit to a polynomial with the desired vector

m as the evaluations of the polynomial at some unique set of
n+1
points
x¯
, i.e. by committing to the polynomial represented by
fx¯=m
, using Lagrange interpolation first to obtain
f
from
fx¯
.

Next we discuss some of the methods designed to commit to a polynomial

f directly and not just to a vector representation of
f
such as
fa
and
fx¯
.


A polynomial commitment using groups of known order DL

The first polynomial commitment scheme we present is based on encryption with groups of known order (discrete logarithm). It is a very inefficient scheme as it produces a very large digest of size

O(nmax), where the maximal degree of the polynomials the scheme can handle is
nmax
. As it looks similar to vector commitments we are familiar with from the last chapter in some ways, we begin our discussion with this scheme.

Given a polynomial

f(x)=a0x0+a1x1+a2x2+...+anxn with coefficient vector
m=[a0,a1,...,an]
, which we will refer to as the message for consistency, the following are the algorithms of the scheme that commits to
f
.

  • As usual with groups of known order, the setup algorithm outputs the group generator, and its order, based on some security parameters
    s
    , such as the size of the group to be used,
    Φ(s)=ρ=(p,g)
    .
  • The commitment algorithm creates a group encrpyted version of each individual coefficient after right-padding
    m
    with
    (nmaxn)
    zeros, and publishes it as the digest
    C(ρ,m)=d=[ga0,ga1,...,gan,g0=gp=1,1,...,1]
    . As we can see, this is a digest in name only, as its length is
    nmax+1
    . However, despite being public, it hides the coefficients (though not the maximal order
    n
    ) as long as the DL problem is hard in
    G
    .
  • The opening algorithm outputs an empty proof for any random evaluation point
    i(m)=f(i)
    ,
    O(ρ,m,i)=πi=()
    .
  • The verification algorithm aims to verify whether a candidate evaluation of the polynomial at point
    i
    ,
    mi
    , is correct, i.e.
    f(i)=mi
    . This is accomplished, without needing to reveal the coefficients of the polynomial, through a key idea, additive homomorphism within the group encryption. Instead of checking that the evaluation
    f(i)
    is equal to the candidate
    mi
    directly, the verification algorithm checks that the encrypted version of the evaluation
    gf(i)
    is equal to the encrypted version of the candidate, i.e.
    V(ρ,d,i,πi,mi)=(gmi=?gf(i)=gj=0nmaxajij=j=0nmax(gaj)ij)
    . Since the elements of the digest are given as
    dj=gaj
    , we can rewrite the verification algorithm as
    V(ρ,d,i,πi,mi)=(gmi=?j=0nmaxdjij)
    .

Efficiency: The space/communication complexity of the digest

d is
nmax
group elements (whose size depends on the group size and representation) and the opening proofs are empty.

The complexity of the commitment algorithm is

O(nmaxlog(maxjajmodp))) group operations in
G
, using fast exponentiation such as the square & multiply algorithm. The opening algorithm has no cost as it does nothing.

The complexity of the verification algorithm is

O(nmax+log(maxjijmodp)) group operations in
G
, using fast exponentiation.

The scheme does not require a trusted-setup algorithm.


Kate Polynomial Commitments

Next, we discuss Kate commitments, a polynomial commitment scheme with many real world applications. Similar to the scheme above, it relies on a group of known order (an elliptic curve is used) and DL assumptions, but in addition, it also requires the group to be pairing-compatible (as it uses a pairing in its verification algorithm) and requires a trusted-setup. We will assume some knowledge of pairings in this discussion.

These additional requirements results in significant improvements to the space efficiency of the scheme, i.e. both the digest and the opening proof for any point is of constant size. For example, this makes Kate scheme the ideal candidate to be used for Verkle tree node level vector commitments after the reduction. There are many other places, such as zero-knowledge proofs and zk-SNARKs, where Kate commitments come up as an important tool.

Let us give the formal definitions of the algorithms of the scheme as usual. We will again assume that the maximum order the scheme can handle is

nmax.

  • As usual with groups of known order, the setup algorithm outputs the generator
    g
    , and its order
    p
    , based on some security parameters
    s
    , such as the size of the group to be used. The group is a pairing-compatible elliptic curve, i.e. from a special class of cyclic groups that have nice security/efficiency properties that comes equipped with a symmetric bilinear pairing function
    h:G×GG
    . Then, a private key
    kpriv
    is generated, by chosing it uniformly randomly from the set
    {2,...,p1}
    . Then
    k=[g=gkpriv0=gkprivp1,gkpriv1,gkpriv2,...,gkprivnmax]
    is generated as the public key, whereupon the private key is completely discarded as toxic waste (it is imperative the private key is unknown to all parties). The public setup parameters are then
    ρ=(p,g,h,k)
    .
  • The commitment algorithm generates the digest for a polynomial
    f
    with coefficient vector
    m=[a0,a1,...,an]
    by combining the elements of the public key
    k
    as
    C(ρ,m)=d=j=0n(kj)aj=j=0n(gkprivj)aj=j=0ngajkprivj=gj=0najkprivj=gf(kpriv)
    . The product of the public key elements raised to the coefficients of the polynomial,
    (kj)aj
    , results in a group encrypted version of the evalution of the polynomial at the unknown private key,
    f(kpriv)
    . The idea of additive homomorphism within the group encryption is moved from the verification algorithm to the commitment algorithm in this scheme.

The opening and the verification algorithms depends on the following algebraic property of polynomials: Given a polynomial

f(x) of maximal degree
n
, for any
z
in the domain of
f
, we can shift the polynomial vertically,
fz(x)=f(x)f(z)
, such that this new polynomial has a root (passes through zero) at
z
, which means that
(xz)
is a perfect divisor/factor of
fz
. The quotient polynomial
ψz(x)=fz(x)xz=j=0n1bjxj
has a maximal degree of
n1
with coefficients
[b0,b1,...,bn1]
. A noteworthy relation to keep in mind is
f(x)=ψz(x)(xz)+f(z)
.

  • The opening algorithm operates very similar to the commitment algorithm. Given any random evaluation point
    i(m)=f(i)
    , the opening proof
    πi
    is a product of the public key elements raised to the coefficients of the quotient polynomial for point
    i
    ψi(x)=fi(x)xi=j=0n1bjxj
    , with coefficients
    [b0,b1,...,bn1]
    . This corresponds to
    O(ρ,m,i)=πi=j=0n1(kj)bj=j=0n1gbjkprivj=gi=0n1bikprivi=gψi(kpriv)
    . Note that this is equivalent to the group encrypted version of the evaluation of the quotient polynomial
    ψi
    at the unknown private key
    kpriv
    , calculated using the public key. As usual, the opening proof for
    i
    encapsulates key information pertaining the polynomial
    f
    that cannot be gleaned from
    f(i)
    itself in a succinct manner.

The verification algorithm is the most intricate part of this scheme, where pairing of the group

h becomes important. Since
f(x)=ψi(x)(xi)+f(i)
for any
x
and
i
, we know that
f(kpriv)=ψi(kpriv)(kprivi)+f(i)
, which is equivalent to
loggd=(loggπi)(kprivi)+f(i)
, can be used to check whether a digest
d
, an opening proof
πi
and an evaluation candidate for
f(i)
fit together. This is easier said then done however, as it requires both solving the discrete logarithm problem for the group, as well as utilizing the unknown private key
kpriv
.

Let us first see what happens when we group encrypt both sides of the equation,

gloggd=g(loggπi)(kprivi)+f(i), which can be simplified as
d=πi(kprivi)gf(i)
(which requires knowing
kpriv
to be useful) or
d=(k1gpi)loggπigf(i)
(which requires solving DL to be useful). As we can see, dealing with group encrypted version of things does not help much in this case.
g(loggπi)(kprivi)
is the real problematic term and this is where pairings come into play to break this exponent to an expression involving
g(loggπi)=πi
and
g(kprivi)=k1gpi
separately.

Among other properties, pairings are functions that have the property,

h(g,g)ab=h(ga,gb). We can use this property to split up the problematic expression, by considering
h(g,g)(loggπi)(kprivi)
instead of
g(loggπi)(kprivi)
. Clearly, this expression can be written as
h(g,g)(loggπi)(kprivi)=h(g(loggπi),g(kprivi))=h(πi,k1g(pi))
using the property given. So, instead of looking at the group encrpyted version of the relationship between
d
,
πi
and
f(i)
, let us consider the pairing encrpyted version, which simplifies more favorably.
h(g,g)loggd=h(g,g)(loggπi)(kprivi)+f(i)h(gloggd,g)=h(g(loggπi),g(kprivi))h(g,g)f(i)h(d,g)=h(πi,k1g(pi))h(gf(i),g)
This final simplification does not require knowledge of the private key
kpriv
nor the ability to solve the DL problem in
G
. It only requires efficient evaluation of the pairing function
h
, along with regular group operations. Therefore, Kate commitment scheme uses the pairing
h
in its validation algorithm with this final expression. Let us define the validation algorithm formally as well.

  • The verification algorithm aims to verify whether a candidate evaluation of the polynomial at point
    i
    ,
    mi
    , is correct, i.e.
    f(i)=mi
    . It checks the above simplified relationship
    V(ρ,d,i,πi,mi)=(h(d,g)=?h(πi,k1g(pi))h(gmi,g))
    .

Efficiency: The space/communication complexity of the digest

d and the opening proof for any evaluation point
πi
is a single group element (whose size depends on the group size and representation).

The complexity of the commitment algorithm is

O(n+log(maxjajmodp)) group operations in
G
, using fast exponentiation such as the square & multiply algorithm. The opening algorithm is similar,
O(n1+log(maxjbjmodp))
.

The complexity of the verification algorithm is

O(log(max(mi,pi)modp)) group operations in
G
using fast exponentiation, plus a constant number of evaluations of the pairing function.

The scheme requires a trusted-setup algorithm. Getting rid of the private key as toxic waste is imperative and usually requires a cumbersome public ceremony of sorts.


Reduction to vector commitments

Given a univariate polynomial commitment

(Φ+,C+,O+,V+), it is straightforward to simulate a vector commitment
(Φ,C,O,V)
through the following reduction:

  • The setup algorithm is the same, i.e.
    Φ(s)=Φ+(s)=ρ
    .
  • The commitment algorithm creates a digest for a vector message
    m=[m1,m2,...,mn]
    by creating a polynomial whose evaluation vector representation is
    fx¯=[(0,0),(1,m1),(2,m2),...,(n,mn)]
    , which can be obtained in function form as
    f(x)
    through Lagrange interpolation. Then this polynomial
    f(x)
    is committed to using
    C+
    ,
    C(ρ,m)=C+(ρ,f)=d
    .
  • The opening algorithm
    O
    for the
    i
    element of the vector
    i(m)=mi
    creates the opening proof for the evaluation of the polynomial at point
    i
    with
    O+
    ,
    O(ρ,m,i)=O+(ρ,f,i)=πi
    .
  • The verification algorithm for a candidate message
    mi
    is simulated as
    V(ρ,d,i,πi,mi)=V+(ρ,d,i,πi,mi)
    without any changes.

The simple idea is to wrap the vector message

m as a polynomial passing through the values of the vector at the index points and using the polynomial commitment algorithms to simulate the vector commitment by committing to that polynomial. The polynomial used is unique as it is created through Lagrange interpolation, which creates the lowest degree unique polynomial passing though those points.


Remarks

In the next chapter, we discuss multilinear polynomial commitment schemes, which are commitments to polynomials with multiple inputs where each term in the polynomial is linear w.r.t. each individual input variable. This is a more restricted class of multivariate polynomials, which normally would accommodate every term in the polynomial to be nonlinear in each input variable.

Intro: A Hierarchical View of Cryptographic Commitment Schemes
Previous: Vector Commitments
Next: Multilinear Polynomial Commitments