Barretenberg
The ZK-SNARK library at the core of Aztec
|
#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 |
Definition at line 18 of file msm_builder.hpp.
using bb::ECCVMMSMMBuilder::AffineElement = typename CycleGroup::affine_element |
Definition at line 23 of file msm_builder.hpp.
Definition at line 20 of file msm_builder.hpp.
using bb::ECCVMMSMMBuilder::Element = typename CycleGroup::element |
Definition at line 22 of file msm_builder.hpp.
Definition at line 21 of file msm_builder.hpp.
Definition at line 24 of file msm_builder.hpp.
|
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
msms | A vector of vectors of ScalarMul s, a.k.a. a vector of MSM s. |
point_table_read_counts | Table of read counts to be populated. |
total_number_of_muls | A mul op in the OpQueue adds up to two muls, one for each nonzero z_i (i=1,2). |
num_msm_rows |
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.
|
staticconstexpr |
Definition at line 26 of file msm_builder.hpp.
|
staticconstexpr |
Definition at line 27 of file msm_builder.hpp.