Barretenberg
The ZK-SNARK library at the core of Aztec
Loading...
Searching...
No Matches
bb::srs::factories Namespace Reference

Classes

class  Crs
 
class  Crs< curve::BN254 >
 
class  Crs< curve::Grumpkin >
 
class  CrsFactory
 
class  MemBn254CrsFactory
 
class  MemGrumpkinCrsFactory
 
class  NativeBn254CrsFactory
 
class  NativeGrumpkinCrsFactory
 

Functions

MemBn254CrsFactory init_bn254_crs (const std::filesystem::path &path, size_t dyadic_circuit_size, bool allow_download)
 Initialize a memory crs factory for bn254 based on a known dyadic circuit size.
 
MemGrumpkinCrsFactory init_grumpkin_crs (const std::filesystem::path &path, size_t eccvm_dyadic_circuit_size, bool allow_download)
 Initialize a memory crs factory for grumpkin based on a known dyadic circuit size.
 

Function Documentation

◆ init_bn254_crs()

MemBn254CrsFactory bb::srs::factories::init_bn254_crs ( const std::filesystem::path &  path,
size_t  dyadic_circuit_size,
bool  allow_download 
)

Initialize a memory crs factory for bn254 based on a known dyadic circuit size.

Parameters
dyadic_circuit_sizepower-of-2 circuit size
allow_downloadwhether to download the crs files if they are not found. Useful for making sure benches and tests do not rely on the network.

The transcript is divided into G1 and G2 point files: The G1 flat file: | XX XX XX XX | ‾\ ‾\ ... > G1 point \ | XX XX XX XX | _/ \ ... > 64 bytes each | XX XX XX XX | ‾\ / ... > G1 point / | XX XX XX XX | _/ _/

BN254 has one 128 byte G2 point. Grumpkin has no G2 points.

Definition at line 16 of file native_crs_factory.cpp.

◆ init_grumpkin_crs()

MemGrumpkinCrsFactory bb::srs::factories::init_grumpkin_crs ( const std::filesystem::path &  path,
size_t  eccvm_dyadic_circuit_size,
bool  allow_download 
)

Initialize a memory crs factory for grumpkin based on a known dyadic circuit size.

Grumpkin crs is required only for the ECCVM

Parameters
dyadic_circuit_sizepower-of-2 circuit size
allow_downloadwhether to download the crs files if they are not found. Useful for making sure benches and tests do not rely on the network.

Definition at line 31 of file native_crs_factory.cpp.