Try   HackMD

Vector Commitment Scheme - Multipoint/Index

Vector Commitment Scheme vs Polynomial Commitment Scheme

We may use these two terms interchangeably however they are not the same, a vector commitment scheme is strictly more powerful than a polynomial commitment scheme. One can take the dot product between two vectors and if one vector is of the form

<1,t,t2,t3,...,tn> then one can realise the dot product as the evaluation of a polynomial in monomial basis at the point
t
.

Converting a vector to a polynomial can be done by either interpreting the elements in the vector as the coefficients for the polynomial or interpreting the elements as evaluations of the polynomial. Hence, we can state our schemes in terms of a polynomial commitment scheme and the translation would be done as mentioned above.

Similarly, the term multipoint will be used when referring to a polynomial commitment scheme and multi-index when referring to a vector commitment scheme. they mean the same thing, but just in different contexts.

Introduction

A vector commitment scheme allows you to prove that an element

e in a vector
v
is indeed at some specific index
i
, ie the fact that
v[i]=e
.

A multi-index vector commitment scheme, takes in a list of vectors

vk, a list of indices
ik
and a list of values
ek
and produces a proof that for all
k
the following holds :
vk[ik]=ek
.

One could simply call a single index vector commitment scheme

k times and produce
k
proofs in order to simulate a multi-index vector commitment scheme. However we are interested in multi-index vector commitment schemes which are more efficient than doing this. The most common strategy to do this, is to call a function which aggregates all of the tuples
(vk,ik,ek)
into a single tuple and calls the single index vector commitment scheme on the aggregated tuples.

This is the strategy that our specific algorithm will also follow.

Assumptions

The particular single index vector commitment scheme being used does not matter. We only require it to be homomorphic.

This means that commitments to polynomials can be summed, and the result will be a commitment to the sum of polynomials.

KZG and IPA/bulletproofs both have this property. Hash based commitment schemes do not have this property.

Multipoint scheme

Singlepoint scheme

We describe a singlepoint polynomial scheme using the following algorithms:

  • Commit
  • Prove
  • Verify

Commit

Input: A univariate polynomial,

f(X)
Output: A commitment to
f(X)
denoted
[f(X)]
or
C

Prove

Input: A polynomial

f(X), an evaluation point
z
and a purported evaluated point
y=f(z)

Output : A proof
π
that the polynomial
f(X)
gives a value of
y
when evaluated at
z

Verify

Input: A proof

π, a commitment
C
to a polynomial, an evaluation point
z
and a purported evaluation
y

Output: True if the committed polynomial in
C
does indeed evaluate to
y
on
z

Quotient styled commitment schemes

A quotient styled polynomial commitment scheme is one which uses the factor theorem, in order to provide opening proofs. The factor theorem, is well known, so the proof is omitted for brevity.

Theorem 1: Given a polynomial

p(X), if
p(t)=0
then
(Xt)
factors
p(X)
.

Theorem 2: Given a polynomial

p(X), if
p(k)=r
, then there exists a polynomial
q(X)=p(X)rXk

  • If
    p(k)=r
    , then this implies that
    p(k)r=0
  • Let
    p1(X)=p(X)r
    , this means we have
    p1(k)=0
  • Using Theorem 1, this implies that
    (Xk)
    factors
    p1(X)
  • Which implies the following equation
    p1(X)=q(X)(Xk)
    for some
    q(X)
  • Rearranging, we have
    q(X)=p1(X)Xk=p(X)rXk

Observe that

q(X), the quotient, is only a polynomial, if
p(k)=r
. If it is not, then
q(X)
will be a rational function. We then use the fact that a polynomial commitment scheme is only able to commit to polynomials, in order to provide soundness guarantees.


In what follows, we will describe the multipoint scheme using the singe point scheme as an opaque algorithm.


Statement

Given

m commitments
C0=[f0(X)]...Cm1=[fm1(X)]
, we want to prove evaluations:

f0(z0)=y0fm1(zm1)=ym1

where

zi{0,...,d1}

Observations

  • C0=[f0(X)]
    refers to a commitment to the univariate polynomial
    f0(X)
  • The evaluation points must be taken from the domain
    [0,d)
    , we can apply this restriction without loss of generality. Noting that
    d
    will be the length of our vectors.
  • It is possible to open the same polynomial at different points and different polynomials at the same points.
  • It is also possible to open the same polynomial twice at the same point, it would only be wasting time.

Proof

We will first detail two sub-optimal proofs for explanation purposes and optimise after. For the final proof, you can click here


We use

H() to denote a hash function which can heuristically be realised as a random oracle.


  1. Let
    rH(C0,...Cm1,z0,...,zm1,y0,...,ym1)

g(X)=r0f0(X)y0Xz0+r1f1(X)y1Xz1++rm1fm1(X)ym1Xzm1

The prover starts off by committing to

g(X) using the commit function from the single point commitment scheme, we denote this by
D
or
[g(X)]
.

The prover's job is to now convince the verifier that

D is a commitment to a polynomial
g(X)
. We do this by evaluating
g(X)
at some random point
t
. If
g(X)
is not a polynomial, then it is not possible to commit to it.

  1. Let
    tH(r,D)

We split the evaluation of

g(X) into two parts
g1(t)
and
g2(t)
,
g2(t)
can be computed by the verifier, while
g1(t)
cannot, because it involves random evaluations at the polynomials
fi(X)
.

  • The verifier is able to compute the
    g2(t)
    .
  • The prover will compute
    g1(t)
    and send a proof of it's correctness.

g1(t)=i=0m1rifi(t)tzi

g2(t)=i=0m1riyitzi

We note that

g1(X)=rifi(X)Xzi, however, we specify it as
rifi(X)tzi
because the latter is also able to prove an opening for
g1(t)
and the verifier is able to compute the commitment for it.

Now we form two proofs using a single point polynomial commitment scheme:

  • One for
    g1(X)
    at
    t
    . We call this
    π
    . This is computed using
    Prove(g1(X),t,g1(t))
  • One for
    g(X)
    at
    t
    . We call this
    ρ
    . This is computed using
    Prove(g(X),t,g(t))

The proof consists of

D,(π,g1(t)),ρ

Verification

The Verifier ultimately wants to verify that

D is the commitment to the polynomial
g(x)
.

The verifier computes the challenges

r and
t
.

The verifier also computes

g2(t), we mentioned above that they can do this by themselves.

Computing
g(t)

The verifier now needs to compute

g(t):

g(t)=g1(t)g2(t)

  • g1(t)
    was supplied in the proof.
  • g2(t)
    can be computed by the verifier.

Hence the verifier can compute

g(t).

Note however, the verifier cannot be sure that

g1(t) is the correct computation by the prover ie they cannot be sure that it is indeed the evaluation of
g1(X)
at
t
. They need to build
[g1(X)]
themselves and verify it against
g1(t)

Computing
[g1(X)]

Consider

g1(X):

g1(X)=rifi(X)tzi

[g1(X)] is therefore:

[g1(X)]=ritziCi

The verifier is able to compute this commitment themselves, and so is able to verify that

g1(t) was computed correctly using the
Verify
function .

The verifier now calls

Verify([g1(X)],g1(t),π) and aborts if the return value is false.

Correctness of
g(t)

Since

g1(t) was verified to be correct and
g2(t)
was computed by the verifier,
g(t)
is correct.

Verify
g(x)
at
t

The verifier now calls

Verify(D,g(t),ρ) and aborts if the return value is false.

Aggregated Proof

In the above protocol, the prover needed to compute two proofs, one for

g(X) and another for
g1(X)
. We now present a protocol which aggregates both proofs together.


  1. Let
    qH(t,[g1(X)])

The prover no longer computes an IPA proof for

g1(X) and
g(X)
instead they combine both polynomials using a new random challenge
q
.

g3(X)=g1(X)+qg(X)

Now we form an single polynomial commitment scheme proof for

g3(X) at
t
. Lets call this
σ
. This is computed using
Prove(g3(X),t,g3(t))

The prover still computes

g1(t).

The proof consists of

D,σ,g1(t)

Aggregated Verification

In the previous step, the verifier called

Verify([g1(X)],g1(t),π). Instead they now delay this verification and instead compute the commitment to the aggregated polynomials and the evaluation of the aggregated polynomial at
t
:

  • [g3(X)]=[g1(X)]+q[g(X)]
  • g3(t)=g1(t)+qg(t)

The verifier now computes

Verify([g3(X)],g3(t),σ)

With overwhelming probability over

q this will only return true iff
[g1(X)]
and
[g(X)]
opened at
t
are
g1(t)
and
g(t)
respectively.

Opening
g2(X)

This optimisation allows us to reduce the proof size by one element, by revisiting

g(X) and opening at
g2(X)
. The gist is that if we open at
g2(X)
then we do not need to send any evaluations since the verifier can compute this themselves.

In particular, we opened the polynomial :

g3(X)=g1(X)+qg(X)

  • First note that
    g(X)=g1(X)g2(X)
    which implies that
    g2(X)=g1(X)g(X)
  • It is argued that if the verifier can open
    g2(X)
    at
    t
    using
    D=[g(X)]
    , then this implies that
    g(X)
    can be correctly opened at
    t
    using
    [g(X)]
    .

We now list out the full protocol using this optimisation.

Proof - Final

  1. Let
    rH(C0,...Cm1,z0,...,zm1,y0,...,ym1)

g(X)=r0f0(X)y0Xz0+r1f1(X)y1Xz1++rm1fm1(X)ym1Xzm1

The prover starts off by committing to

g(X) using the commit function from the single point commitment scheme, we denote this by
D
or
[g(X)]
.

The prover's job is to now convince the verifier that

D is a commitment to a polynomial
g(X)
. We do this by indirectly evaluating
g(X)
at some random point
t
. If
g(X)
is a rational function, then it is not possible to commit to it as a polynomial, and consequently, it is not possible to prove that
g(t)=k
using
D
.

  1. Let
    tH(r,D)

Define g1(X):

rifi(X)tzi

Define g2(X):

riyiXzi

It is clear to see that

g(t)=g1(t)g2(t).

g2(t) can be computed by the verifier, while
g1(t)
cannot, because it involves random evaluations at the polynomials
fi(X)
.

We note that the natural definition for

g1(X) would be
rifi(X)Xzi
, however, we specify it as
rifi(X)tzi
because the latter is also able to prove an opening for
g1(t)
and the verifier is able to compute the commitment for it.

  • The prover will compute an opening proof for
    g2(X)
    . Correctness of
    g2(X)
    implies correctness for
    g(X)
    since
    g2(t)=g1(t)g(t)
    .

The prover forms an opening proof for

g2(X) using a single point polynomial commitment scheme:

  • We call this
    π
    . This is computed using
    Prove(g2(X),t,g2(t))

The proof consists of

(D,π)

Verification - Final

The Verifier ultimately wants to verify that

D is the commitment to the polynomial
g(x)
.

The verifier computes the challenges

r,
t
and
g2(t)

Computing
[g1(X)]

Consider

g1(X):

g1(X)=rifi(X)tzi

[g1(X)] is therefore:

[g1(X)]=ritziCi

Noting that the verifier is able to compute this value themselves.

Verifying
g2(t)

Since :

g2(t)=g1(t)g(t)

The commitment to

g2(X) with respects to
t
* is therefore:

[g2(X)]=[g1(X)]D

*We again note that

[g1(X)] is only valid, if the point being evaluated is
t
because
g1(X)
has already been partially evaluated at
t
.

Since the verifier computed

[g1(X)] , if
D
is indeed a commitment to
g(X)
, then
[g1(X)]D
is a commitment to
g2(X)
.

Now if

[g2(X)] is a commitment to
g2(X)
, then it will pass the following verification check
Verify([g2(X)],t,g2(t))
.

Summary

  • We describe the multipoint commitment scheme which we will use for verkle trees.
  • We did not describe the exact single point commitment scheme being used, however we note that at the time of writing this document, the bulletpoofs variant described in section A.1 of BCMS20 is what has been implemented.