Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Initial Plan: features and goal of an MVP #1

Open
2 tasks
alxiong opened this issue May 10, 2021 · 1 comment
Open
2 tasks

Initial Plan: features and goal of an MVP #1

alxiong opened this issue May 10, 2021 · 1 comment

Comments

@alxiong
Copy link
Owner

alxiong commented May 10, 2021

Motivation

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.

Targeted Feature for MVP

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);
}

Concrete tasks break-down

  • Survey list of popular, major ceremonies and existing code like zcash's mpc.
  • Design data flow and high-level API
@alxiong
Copy link
Owner Author

alxiong commented May 10, 2021

List of Existing Trusted Setup Ceremonies

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant