3. Method 1
This method biases towards a faster opening time, and requires roughly half the compute of FastVerify
.
See A. Optimizations for more details.
For the following, the notation of BDFG21 is followed, namely
- For a set of points and a polynomial , is the unique degree polynomial such that
M1Open
#![allow(unused)] fn main() { M1Open(transcript: Transcript, evals: Vec<Vec<Scalar>>, polys: Vec<Polynomial>, point_set_index: usize) -> Proof }
Let the polynomials be and the points be
- Check that
evals
has length and each element of evals has length - Transcribes the following to the Merlin transcript
- each of the evals row by row with the utf-8 message
open evals
- each of the points in order with the utf-8 message
open points
- each of the evals row by row with the utf-8 message
- Constructs by
- Reading
SCALAR_SIZE
bytes fromtranscript
with utf-8 messageopen gamma
- Intepreting the bytes as an integer in big endian modded by the modulus of the scalar field
- Reading
- Computing
- Polynomial divide to get , discarding the remainer
- Compute and serialize in compressed form.
M1Verify
#![allow(unused)] fn main() { M1Verify(transcript: Transcript, commits: Vec<Commitment>, evals: Vec<Vec<Scalar>>, proof: Proof, point_set_index: usize) -> bool }
Let the evals be , commits be , and the points be . Commit must be for the polynomial that evaluates to at points .
This method
- Checks that each element has the correct length
- Commits has length
- Each element of evals has length
- Transcribes the points/evals the same as in the opening
- Reads same is in the opening
- For each , computes represents the value of
- Use the to interpolate using the previously computed lagrange polynomials as
- Compute
- Compute
- Return
true
if