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

  1. Check that evals has length and each element of evals has length
  2. 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
  3. Constructs by
    • Reading SCALAR_SIZE bytes from transcript with utf-8 message open gamma
    • Intepreting the bytes as an integer in big endian modded by the modulus of the scalar field
  4. Computing
  5. Polynomial divide to get , discarding the remainer
  6. 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

  1. Checks that each element has the correct length
    • Commits has length
    • Each element of evals has length
  2. Transcribes the points/evals the same as in the opening
  3. Reads same is in the opening
  4. For each , computes represents the value of
  5. Use the to interpolate using the previously computed lagrange polynomials as
  6. Compute
  7. Compute
  8. Return true if