[−][src]Module dusk_plonk::notes::prove_verify
This module contains the notes on how the prover algorithm is constructed for PLONK.
PLONK proof construction
Following on from the generic SNARK construction, here we will give the set up of a PLONK proof and show which steps need to be satisfied to utilise the protocol.
First we will explain the derivation and simplification of the arithmetic circuits.
PLONK uses both gate constraints and copy constraints, to collect like expressions. Using the same example of:
We can express multiples of the same wires in or out of the same gate, with the above equation.
Thus we have 'ith' gates, so the index from left or right across the circuit is mitigated for wires which are equal.
For example, in the two equations:
and
We can state the equalities that:
These are examples of constraints collected in PLONK. Which is done the same for addition gates, except the gate constrain satisfies:
PLONK also uses 'copy constraints', which are used to associate wires, which have equality, from the entire circuit. These constraints are checked with a permutation argument. In essence, this checks that wires are not repeated by using randomness given by the verifier.
This process is better explained in the permutation notes.
After the constraints are made, they are formatted into a system of numerical equations, which in PLONK are reduced to a small amount of polynomial equations which are capable of representing the constraints. PLONK allows us to combine the two gate equations by describing their relationship relative to the role in the circuit. PLONK also has constants, which are denoted as 'Q'. These values will change for each programme. The shape of the circuit is defined by these values. When they are combined with the gate equations, we get the polynomial equation for a reduced form as:
This can be used for both addition and multiplication gates, where their values can be provided by the user depending on the circuit composition. For an addition gate, we derive it as follows:
Which results in:
For a multiplication gate, we derive it as follows:
Which results in:
With this format, there is a specific method used to convert all the equations into polynomial form. Basically, in order to bundle these together, PLONK can take sets of equations and turn them into one single equation over polynomials. This is called the evaluation form. We are then able to use Lagrangian interpolation to convert to coefficient form. The only thing this interpolation is doing, is allowing us to evaluate a functions over specific points, for 'x' values, where the target polynomial is equal to '1' or '0'.
With these specific bases, we can derive the relation between all sets of equations into one single polynomial equation, where we have a vector of inputs to each gate type:
The utility for this in PLONK, as a univeral SNARK, is that any operation or relationship that holds with the inputted vectors, will also hold over the polynomial.
In order to check this in PLONK, a 'vanishing polynomial' is introduced. Which is just a polynomial equal to zero for all the points we evaluate at. So this means that the vectors will be divisible by this vanishing polynomial, if the expression we check does indeed hold.
To summarise what the PLONK proof must satisfy:
The generation of copy and
gate constraints where the
former are representative
of permuted wires. Generate
all of the polynomials to
be checked against the
vanishing polynomials.
Take all of the wire values
and convert them into three
polynomials, ,
,
.
Check the polynomials at
some random , by making
commitments and checking
the evaluation form.
Then commit all evalution
polynomials forms for the
verfier.
Lagrangian polynomials
The use of polynomials in the
PLONK proving scheme refers
to specific evaluation domains,
named Lagrangian polynomials,
based on interpolation of two
functions of particular group
elements. The following section
gives a more comprehensive
understanding to the way in
which these polynomials are
formed, given certain inputs.
Langrangian polynomials are introduced as a means of constructing continous functions from discrete data. With alternative polynomial constructions, discrete data sets can be approximated; Langrangian polynomials, however, form a solution that fits data exactly. This is achieved through interpolation, which finds a linear combination of 'n' inputted functions with respect to a given data set which imposes 'n' constraints and computes an exact fitting solution.
Linear Algebra dictates that the interpolation polynomial ought to be formed from the system = , where = , i = 0,...,n and the entries of are defined by = , and Additionally, the used points for the interpolation are , from which the data points , are obtained, and . Where . The basis of the space of polynomials, degree n+1 is called the monomial basis, and the corresponding matrix A is called the Vandermode matrix for the points .
Langrangian interpolation, however, has the matrix A, as the identity matrix. This stems from writing the interpolating polynomial as:
The polynomials and
= 0,...,n are interpolations
of the points . They are commonly called the
Lagrangian polynomials.
They are wriiten in the form:
the unique solution polynomial of degree 'n' that satisfies this
where
This polynomial, is called the interpolating polynomial of .
To understand these as an expanded product argument, it can be written as
Given a set of k + 1 data points
where no two
x_j are the same,
the interpolation polynomial in the Lagrange form is a linear combination
of Lagrange basis polynomials. Basis Polynomial