Expand description
Clone of kimchi/precomputed_srs.rs but for MSM project with BN254
Re-exportsยง
use crate::Fp;๐use crate::BN254;๐use crate::DOMAIN_SIZE;๐use ark_ec::pairing::Pairing;๐use ark_ff::UniformRand;๐use ark_serialize::Write;๐use kimchi::circuits::domains::EvaluationDomains;๐use poly_commitment::kzg::PairingSRS;๐use poly_commitment::precomputed_srs::TestSRS;๐use poly_commitment::SRS as _;๐use rand::rngs::StdRng;๐use rand::SeedableRng;๐use serde::Deserialize;๐use serde::Deserialize;๐use serde::Serialize;๐use serde::Serialize;๐use std::fs::File;๐use std::io::BufReader;๐use std::path::PathBuf;๐use zeroize::Zeroize;๐use zeroize::Zeroize;๐
Structsยง
- Test
PairingSRS - A clone of the
PairingSRSthat is serialized in a test-optimised way.
Functionsยง
- create_
and_ store_ srs - Creates and writes the SRS into
get_bn254_srs_path(). - create_
and_ ๐store_ srs_ with_ path - Creates a BN254 SRS. If the
overwrite_srsflag is on, orSRS_OVERWRITEenv variable is ON, also writes it into the file. - get_
bn254_ srs - Obtains an SRS for a specific curve from disk, or generates it if absent.
- get_
bn254_ srs_ path - The path of the serialized BN254 SRS, inside this repo.
- read_
bn254_ ๐srs_ from_ disk - Tries to read the SRS from disk, otherwise panics. Returns the value without Lagrange basis.