Barretenberg
The ZK-SNARK library at the core of Aztec
Loading...
Searching...
No Matches
bb::ECCVMMSMMBuilder Class Reference

#include <msm_builder.hpp>

Classes

struct  MSMRow
 

Public Types

using CycleGroup = curve::BN254::Group
 
using FF = curve::Grumpkin::ScalarField
 
using Element = typename CycleGroup::element
 
using AffineElement = typename CycleGroup::affine_element
 
using MSM = bb::eccvm::MSM< CycleGroup >
 

Static Public Member Functions

static std::tuple< std::vector< MSMRow >, std::array< std::vector< size_t >, 2 > > compute_rows (const std::vector< MSM > &msms, const uint32_t total_number_of_muls, const size_t num_msm_rows)
 Computes the row values for the Straus MSM columns of the ECCVM.
 

Static Public Attributes

static constexpr size_t ADDITIONS_PER_ROW = bb::eccvm::ADDITIONS_PER_ROW
 
static constexpr size_t NUM_WNAF_DIGITS_PER_SCALAR = bb::eccvm::NUM_WNAF_DIGITS_PER_SCALAR
 

Detailed Description

Definition at line 18 of file msm_builder.hpp.

Member Typedef Documentation

◆ AffineElement

using bb::ECCVMMSMMBuilder::AffineElement = typename CycleGroup::affine_element

Definition at line 23 of file msm_builder.hpp.

◆ CycleGroup

◆ Element

using bb::ECCVMMSMMBuilder::Element = typename CycleGroup::element

Definition at line 22 of file msm_builder.hpp.

◆ FF

◆ MSM

Member Function Documentation

◆ compute_rows()

static std::tuple< std::vector< MSMRow >, std::array< std::vector< size_t >, 2 > > bb::ECCVMMSMMBuilder::compute_rows ( const std::vector< MSM > &  msms,
const uint32_t  total_number_of_muls,
const size_t  num_msm_rows 
)
inlinestatic

Computes the row values for the Straus MSM columns of the ECCVM.

For a detailed description of the Straus algorithm and its relation to the ECCVM, please see https://hackmd.io/@aztec-network/rJ5xhuCsn

Parameters
msmsA vector of vectors of ScalarMuls, a.k.a. a vector of MSMs.
point_table_read_countsTable of read counts to be populated.
total_number_of_mulsA mul op in the OpQueue adds up to two muls, one for each nonzero z_i (i=1,2).
num_msm_rows
Returns
std::vector<MSMRow>

The wNAF digits for base 16 lie in the range -15, -13, ..., 13, 15. The point table format is the following: (for positive point table) T[0] = P, T[1] = 3P, ..., T[7] = 15P (for negative point table) T[0] = -P, T[1] = -3P, ..., T[15] = -15P i.e. if the slice value is negative, we can use the compressed WNAF directly as the table index if the slice value is positive, we must take 15 - (compressed wNAF) to get the table index

Definition at line 84 of file msm_builder.hpp.

Member Data Documentation

◆ ADDITIONS_PER_ROW

constexpr size_t bb::ECCVMMSMMBuilder::ADDITIONS_PER_ROW = bb::eccvm::ADDITIONS_PER_ROW
staticconstexpr

Definition at line 26 of file msm_builder.hpp.

◆ NUM_WNAF_DIGITS_PER_SCALAR

constexpr size_t bb::ECCVMMSMMBuilder::NUM_WNAF_DIGITS_PER_SCALAR = bb::eccvm::NUM_WNAF_DIGITS_PER_SCALAR
staticconstexpr

Definition at line 27 of file msm_builder.hpp.


The documentation for this class was generated from the following file: