alxiong / ark-srs Goto Github PK
View Code? Open in Web Editor NEWUse Common/Structured Reference String (CRS/SRS) from existing ceremonies with ease
License: MIT License
Use Common/Structured Reference String (CRS/SRS) from existing ceremonies with ease
License: MIT License
Relevant sources:
ark-circom
's zkey.rs parsing codephase2-bn254
repoAccording to offline communication, ppot provides not only powers_of_g
, but also powers_of_h
, which is very useful in applications like PCS multiproofs.
Currently, I have only locally tested the parsing code for Aztec's CRS (by replacing occurrences of KZG10::setup()
with our crs::aztec20::get_crs()
in tests in ark_poly_commit::kzg10
module) -- partly because current code relies on reading from 6 GB of transcripts file that anyone can download by running ./scripts/download_transcripts_aztec.sh
, but I don't want to burden the CI just yet.
This issue aims to:
There are many trusted setup (ceremonies) hosted for CRS parameter generation via MPC by various companies, some circuit-specific, others universal and updateable. However, it is currently inconvenient to directly import those existing parameters and leverage on them in your rust code. Furthermore, it is hard to keep track of those different ceremonies and even harder to switch between parameters.
This library aims to provide an "awesome-crs" list as well as light-weight modular wrapper code for importing those parameter files into a standardize, easy-to-use struct.
use crs::preclude::*;
use crs::CeremonyList;
struct MySnark;
impl<F: PrimeField, PC: PolynomialCommitment<F, DensePolynomial<F>>> MySnark<F, PC> {
pub fn index<C: Circuit<F>>(srs: UniversalSRS<F, PCS>, c: C) -> (ProverKey<F, PC>, VerifierKey<F, PC>){
// utilize existing SRS from a PCS to generate circuit-specific keys
}
}
fn test() {
let circuit: Circuit;
let srs1 = UniversalSRS<BlsScalar, KZG10>::get(CeremonyList::Aztec2020);
let srs2 = UniversalSRS<JubjubScalar, MarlinPC>::get(CeremonyList::Marlin2021);
let (pk1, vk1) = MySnark::index(srs1, circuit);
let (pk2, vk2) = MySnark::index(srs2, circuit);
}
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.