Barretenberg
The ZK-SNARK library at the core of Aztec
Loading...
Searching...
No Matches
native_crs_factory.cpp
Go to the documentation of this file.
7
8namespace bb::srs::factories {
9
17MemBn254CrsFactory init_bn254_crs(const std::filesystem::path& path, size_t dyadic_circuit_size, bool allow_download)
18{
19 auto bn254_g1_data = get_bn254_g1_data(path, dyadic_circuit_size, allow_download);
20 auto bn254_g2_data = srs::get_bn254_g2_crs_element();
21 return { bn254_g1_data, bn254_g2_data };
22}
23
32MemGrumpkinCrsFactory init_grumpkin_crs(const std::filesystem::path& path,
33 size_t eccvm_dyadic_circuit_size,
34 bool allow_download)
35{
36 auto grumpkin_g1_data = get_grumpkin_g1_data(path, eccvm_dyadic_circuit_size, allow_download);
37 return { grumpkin_g1_data };
38}
39} // namespace bb::srs::factories
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.
g2::affine_element get_bn254_g2_crs_element()
Reference BN254 G2 element from the trusted setup CRS.
std::vector< curve::Grumpkin::AffineElement > get_grumpkin_g1_data(const std::filesystem::path &path, size_t num_points, bool allow_download)
std::vector< g1::affine_element > get_bn254_g1_data(const std::filesystem::path &path, size_t num_points, bool allow_download)