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

#include <eccvm_circuit_builder.hpp>

Public Types

using CycleGroup = bb::g1
 
using FF = grumpkin::fr
 
using Polynomial = bb::Polynomial< FF >
 
using CycleScalar = typename CycleGroup::Fr
 
using Element = typename CycleGroup::element
 
using AffineElement = typename CycleGroup::affine_element
 
using ScalarMul = bb::eccvm::ScalarMul< CycleGroup >
 
using MSM = bb::eccvm::MSM< CycleGroup >
 

Public Member Functions

 ECCVMCircuitBuilder (std::shared_ptr< ECCOpQueue > &op_queue)
 
uint32_t get_number_of_muls () const
 
std::vector< MSMget_msms () const
 
size_t get_estimated_num_finalized_gates () const
 
size_t get_circuit_subgroup_size (const size_t num_rows) const
 

Static Public Member Functions

static std::vector< ScalarMulget_flattened_scalar_muls (const std::vector< MSM > &msms)
 

Public Attributes

std::shared_ptr< ECCOpQueueop_queue
 

Static Public Attributes

static constexpr size_t NUM_SCALAR_BITS = bb::eccvm::NUM_SCALAR_BITS
 
static constexpr size_t NUM_WNAF_DIGIT_BITS = bb::eccvm::NUM_WNAF_DIGIT_BITS
 
static constexpr size_t NUM_WNAF_DIGITS_PER_SCALAR = bb::eccvm::NUM_WNAF_DIGITS_PER_SCALAR
 
static constexpr uint64_t WNAF_MASK = bb::eccvm::WNAF_MASK
 
static constexpr size_t POINT_TABLE_SIZE = bb::eccvm::POINT_TABLE_SIZE
 
static constexpr size_t WNAF_DIGITS_PER_ROW = bb::eccvm::WNAF_DIGITS_PER_ROW
 
static constexpr size_t ADDITIONS_PER_ROW = bb::eccvm::ADDITIONS_PER_ROW
 

Detailed Description

Definition at line 24 of file eccvm_circuit_builder.hpp.

Member Typedef Documentation

◆ AffineElement

◆ CycleGroup

◆ CycleScalar

◆ Element

◆ FF

◆ MSM

◆ Polynomial

◆ ScalarMul

Constructor & Destructor Documentation

◆ ECCVMCircuitBuilder()

bb::ECCVMCircuitBuilder::ECCVMCircuitBuilder ( std::shared_ptr< ECCOpQueue > &  op_queue)
inline

Definition at line 48 of file eccvm_circuit_builder.hpp.

Member Function Documentation

◆ get_circuit_subgroup_size()

size_t bb::ECCVMCircuitBuilder::get_circuit_subgroup_size ( const size_t  num_rows) const
inline

Definition at line 260 of file eccvm_circuit_builder.hpp.

◆ get_estimated_num_finalized_gates()

size_t bb::ECCVMCircuitBuilder::get_estimated_num_finalized_gates ( ) const
inline

Definition at line 253 of file eccvm_circuit_builder.hpp.

◆ get_flattened_scalar_muls()

static std::vector< ScalarMul > bb::ECCVMCircuitBuilder::get_flattened_scalar_muls ( const std::vector< MSM > &  msms)
inlinestatic

Definition at line 242 of file eccvm_circuit_builder.hpp.

◆ get_msms()

std::vector< MSM > bb::ECCVMCircuitBuilder::get_msms ( ) const
inline

For input point [P], return { -15[P], -13[P], ..., -[P], [P], ..., 13[P], 15[P] } this "precomputed table" will be an entry in ScalarMuls corresponding to [P]

Computes the WNAF representation of scalar. When scalar is even, we represent this by adding 1 to the least-significant slice. we will also later set the skew boolean to True when we populate ScalarMul. (this is necessary because otherwise we would only be able to represent odd multiples of our point.) Note also that in our applications, NUM_WNAF_DIGITS_PER_SCALAR = 32; this corresponds to the fact that we split up our scalar into two 128 bit numbers, using the endomorphism of the curve (corresponding to a primitive cube root of unity).

Definition at line 53 of file eccvm_circuit_builder.hpp.

◆ get_number_of_muls()

uint32_t bb::ECCVMCircuitBuilder::get_number_of_muls ( ) const
inline

Definition at line 51 of file eccvm_circuit_builder.hpp.

Member Data Documentation

◆ ADDITIONS_PER_ROW

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

Definition at line 40 of file eccvm_circuit_builder.hpp.

◆ NUM_SCALAR_BITS

constexpr size_t bb::ECCVMCircuitBuilder::NUM_SCALAR_BITS = bb::eccvm::NUM_SCALAR_BITS
staticconstexpr

Definition at line 34 of file eccvm_circuit_builder.hpp.

◆ NUM_WNAF_DIGIT_BITS

constexpr size_t bb::ECCVMCircuitBuilder::NUM_WNAF_DIGIT_BITS = bb::eccvm::NUM_WNAF_DIGIT_BITS
staticconstexpr

Definition at line 35 of file eccvm_circuit_builder.hpp.

◆ NUM_WNAF_DIGITS_PER_SCALAR

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

Definition at line 36 of file eccvm_circuit_builder.hpp.

◆ op_queue

std::shared_ptr<ECCOpQueue> bb::ECCVMCircuitBuilder::op_queue

Definition at line 42 of file eccvm_circuit_builder.hpp.

◆ POINT_TABLE_SIZE

constexpr size_t bb::ECCVMCircuitBuilder::POINT_TABLE_SIZE = bb::eccvm::POINT_TABLE_SIZE
staticconstexpr

Definition at line 38 of file eccvm_circuit_builder.hpp.

◆ WNAF_DIGITS_PER_ROW

constexpr size_t bb::ECCVMCircuitBuilder::WNAF_DIGITS_PER_ROW = bb::eccvm::WNAF_DIGITS_PER_ROW
staticconstexpr

Definition at line 39 of file eccvm_circuit_builder.hpp.

◆ WNAF_MASK

constexpr uint64_t bb::ECCVMCircuitBuilder::WNAF_MASK = bb::eccvm::WNAF_MASK
staticconstexpr

Definition at line 37 of file eccvm_circuit_builder.hpp.


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