start adding the groth16 constraint circuit and setup method

This commit is contained in:
ada
2020-12-15 21:04:50 +01:00
parent 8f37dc8aa5
commit b09adcd438
2 changed files with 4 additions and 1 deletions

View File

@@ -372,7 +372,7 @@ impl Circuit<bls12_381::Scalar> for MyCircuit {
}
}
pub fn setup(ast: &MalVal) -> Result<String, MalErr> {
pub fn setup(ast: &MalVal) -> MalRet {
let start = Instant::now();
// Create parameters for our circuit. In a production deployment these would
// be generated securely using a multiparty computation.
@@ -384,6 +384,8 @@ pub fn setup(ast: &MalVal) -> Result<String, MalErr> {
// Prepare the verification key (for proof verification).
let pvk = groth16::prepare_verifying_key(&params.vk);
Ok(MalVal::Str("k".to_string()))
/*
// Pick a preimage and compute its hash.
let quantity = bls12_381::Scalar::from(3);

1
lisp/run.sh Executable file
View File

@@ -0,0 +1 @@
cargo run --bin lisp load new-cs.lisp