Try   HackMD

Proving multiple evaluations on multiple polynomials using IPAs

This is a slightly-rewritten version of the original post from here.

Introduction

This document explains how to open different polynomials at different points.
The opening proof consists of one inner-product argument (IPA) proof, one commitment and one scalar.

The key application here is computing a slim Verkle proof fast!

Notation

Let

G be a group of order
p
whose group operation is denoted additively.

Let

c=[f(X)] denote a polynomial commitment to
f(X)
, typically done as:
c=i=0ngifi

where
giG
are generators of
G
and
f=[f0,,fn]
are the coefficients of the degree-
n
polynomial
f
.

Statement

Given

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

f0(z0)=y0fm1(zm1)=ym1

Batch proof using two IPA proofs

  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), we denote this by
C=[g(X)]
.

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

C is a commitment to
g(X)
. We do this by evaluating
g(X)
at some random point
t

We split the evaluation into two parts

g1(t) and
g2(t)
.

g2(t) can be computed by the verifier.

However,

g1(t) cannot be computed by the verifier since it involves random evaluations of the polynomials
fi(X)
. Instead, the prover will compute
g1(t)
and send a proof of it's correctness.

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

g2(t)=i=0m1riyitzi

  1. Let
    tH(r,C)

We note that

g1(X)=i=0m1rifi(X)Xzi.
However, the verifier will work with:
g1(X)=i=0m1rifi(X)tzi

Note that

g1(t)=g1(t), so proving an evaluation proof for
g1(t)
is equivalent to proving
g1(t)
.
Crucially, the verifier is able to compute the commitment for
g1(X)
, which it could not do for
g1(X)
due to the
Xzi
's in the denominator.

Now we form two IPA proofs:

  • One for
    g1(X)
    at
    t
    . We call this
    π1
  • One for
    g(X)
    at
    t
    . We call this
    π

The prover now computes

y=g1(t)

The proof consists of

C,(π1,y),π

In this non-aggregated variation, the prover does not need to add

[g1(X)] to the transcript.

Verification

The Verifier ultimately wants to verify that

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

The verifier computes

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)

  • We know that
    g1(t)
    was supplied in the proof as
    y
    .
  • g2(t)
    can be computed by the verifier.

Hence the verifier can compute

g(t).

Note, however, that they cannot be sure that

g1(t) is the correct computation by the prover. They need to build
[g1(X)]
themselves and verify it against
g1(t)

Computing
[g1(X)]

This is

g1(X):

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

Hence

[g1(X)] is:

[g1(X)]=i=0m1ritziCi

The verifier is able to compute this themselves, and so is able to verify the proof

π1 for
g1(t)
against
[g1(X)]
.

Is
g(t)
correct?

Note now that since

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

Verify
g(x)
at
t

We can now verify

g(t) against
C=[g(X)]
using the proof
π
.

Complexity

The communication complexity of this protocol is two IPA proofs, 1 scalar and 1 commitment. We can get a better protocol by aggregating things together!

More efficient batch proof using one IPA proof

We now present a protocol to aggregate the two IPA proofs together, only requiring one IPA proof.

Prover

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

The prover no longer computes an IPA proof for

g1(X) and
g(X)
.
Instead, the prover combines them using
q
.

Let:

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

Now, we form an IPA proof

π3 for
g3(X)
at
t
.

The prover still computes

y=g1(t)

The smaller proof now consists of

(C=[g(X)],π3,y)

Verifier

In the previous step, the verifier checked

g1(t)'s proof
π1
against
[g1(X)]
.
We delay this verification and instead compute:

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

The verifier now checks

g3(t)'s proof
π3
against
[g3(X)]
.

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, from the equation.

Complexity

The communication complexity of the protocol is one IPA Proof, one commitment and one scalar.

Do we need to add
[g1(X)]
to the transcript?

In the KZG document, this is

h(X)

If we were able to avoid this, then we could save a lot on prover time, as they could evaluate each

fi at
t
, then do
rifi(t)tzi
instead of needing to first compute
rifi(X)tzi
. (In the non-batched version)

However, we do need to do this because the challenge

q is aggregating
[g1(X)]
and
[g(X)]
, we need to bind
[g1(X)]
to the challenge
q
.

There may be an argument to say that since

g1(X) uses
t
and simply using
q=H(t)
is enough to bind
g1(X)
to
q
. We can restate this problem as:

Given two polynomials :

f(X,Y) and
g(X)

I generate a completely random variable

t.

If I want to add together

f(X,t) and
g(x)

Is it enough to generate randomness based on

g(X) and
t
alone?

The answer is no because the prover has free reign over

X and can change it without affecting
q