prepare for publishing
This commit is contained in:
parent
4ed620ebf2
commit
86e3f9c442
@ -26,18 +26,16 @@ futures-cpupool = {version = "0.1", optional = true}
|
||||
num_cpus = {version = "1", optional = true}
|
||||
crossbeam = {version = "0.7.1", optional = true}
|
||||
|
||||
tiny-keccak = {version = "1.4.2", optional = true}
|
||||
web-sys = {version = "0.3.17", optional = true, features = ["console", "Performance", "Window"]}
|
||||
|
||||
[dependencies.blake2-rfc]
|
||||
git = "https://github.com/gtank/blake2-rfc"
|
||||
rev = "7a5b5fc99ae483a0043db7547fb79a6fa44b88a9"
|
||||
tiny-keccak = {version = "1.4.2", optional = true}
|
||||
blake2-rfc = {version = "0.2.18", optional = true}
|
||||
|
||||
[features]
|
||||
default = ["multicore"]
|
||||
#default = ["multicore", "gm17", "sonic"]
|
||||
#default = ["wasm"]
|
||||
multicore = ["futures-cpupool", "num_cpus", "crossbeam"]
|
||||
sonic = ["tiny-keccak"]
|
||||
sonic = ["tiny-keccak", "blake2-rfc"]
|
||||
gm17 = []
|
||||
wasm = ["web-sys"]
|
||||
|
@ -1,5 +1,3 @@
|
||||
extern crate pairing;
|
||||
|
||||
use crate::pairing::ff::{Field};
|
||||
use crate::pairing::{Engine};
|
||||
|
||||
|
@ -1,5 +1,3 @@
|
||||
extern crate pairing;
|
||||
|
||||
use crate::pairing::ff::{Field};
|
||||
use crate::pairing::{Engine, CurveProjective};
|
||||
use std::marker::PhantomData;
|
||||
|
@ -1,5 +1,3 @@
|
||||
extern crate pairing;
|
||||
|
||||
pub use crate::{SynthesisError};
|
||||
|
||||
pub mod sonic;
|
||||
|
@ -1,6 +1,3 @@
|
||||
extern crate pairing;
|
||||
extern crate rand;
|
||||
|
||||
use crate::pairing::ff::{Field, PrimeField};
|
||||
use crate::pairing::{Engine, CurveProjective};
|
||||
|
||||
|
@ -1,5 +1,3 @@
|
||||
extern crate pairing;
|
||||
|
||||
mod adaptor;
|
||||
|
||||
pub use self::adaptor::{Adaptor, AdaptorCircuit};
|
@ -1,4 +1,2 @@
|
||||
extern crate pairing;
|
||||
|
||||
mod srs;
|
||||
pub use self::srs::SRS;
|
@ -1,7 +1,3 @@
|
||||
extern crate bellman;
|
||||
extern crate pairing;
|
||||
extern crate rand;
|
||||
|
||||
// For randomness (during paramgen and proof generation)
|
||||
use rand::{thread_rng, Rng};
|
||||
|
||||
|
@ -2,7 +2,7 @@ extern crate tiny_keccak;
|
||||
extern crate blake2_rfc;
|
||||
|
||||
use self::tiny_keccak::Keccak;
|
||||
use self::blake2_rfc::blake2s::Blake2s;
|
||||
use self::blake2_rfc::blake2s::{Blake2s, blake2s};
|
||||
|
||||
pub trait Hasher {
|
||||
fn new(personalization: &[u8]) -> Self;
|
||||
@ -17,7 +17,8 @@ pub struct BlakeHasher {
|
||||
|
||||
impl Hasher for BlakeHasher {
|
||||
fn new(personalization: &[u8]) -> Self {
|
||||
let h = Blake2s::with_params(32, &[], &[], personalization);
|
||||
let mut h = Blake2s::new(32);
|
||||
h.update(personalization);
|
||||
|
||||
Self {
|
||||
h: h
|
||||
@ -31,7 +32,7 @@ impl Hasher for BlakeHasher {
|
||||
fn finalize(&mut self) -> Vec<u8> {
|
||||
use std::mem;
|
||||
|
||||
let new_h = Blake2s::with_params(32, &[], &[], &[]);
|
||||
let new_h = Blake2s::new(32);
|
||||
let h = std::mem::replace(&mut self.h, new_h);
|
||||
|
||||
let result = h.finalize();
|
||||
|
@ -1,5 +1,3 @@
|
||||
extern crate pairing;
|
||||
|
||||
use crate::pairing::ff::{Field, PrimeField, PrimeFieldRepr};
|
||||
use crate::pairing::{CurveAffine, CurveProjective, Engine};
|
||||
use std::io;
|
||||
|
@ -1,7 +1,3 @@
|
||||
extern crate bellman;
|
||||
extern crate pairing;
|
||||
extern crate rand;
|
||||
|
||||
// For randomness (during paramgen and proof generation)
|
||||
use rand::{thread_rng, Rng};
|
||||
|
||||
@ -9,32 +5,32 @@ use rand::{thread_rng, Rng};
|
||||
use std::time::{Duration, Instant};
|
||||
|
||||
// Bring in some tools for using pairing-friendly curves
|
||||
use crate::pairing::{
|
||||
use bellman_ce::pairing::{
|
||||
Engine
|
||||
};
|
||||
|
||||
use crate::pairing::ff::{
|
||||
use bellman_ce::pairing::ff::{
|
||||
Field,
|
||||
};
|
||||
|
||||
// We're going to use the BLS12-381 pairing-friendly elliptic curve.
|
||||
use crate::pairing::bls12_381::{
|
||||
use bellman_ce::pairing::bls12_381::{
|
||||
Bls12
|
||||
};
|
||||
|
||||
use crate::pairing::bn256::{
|
||||
use bellman_ce::pairing::bn256::{
|
||||
Bn256
|
||||
};
|
||||
|
||||
// We'll use these interfaces to construct our circuit.
|
||||
use bellman::{
|
||||
use bellman_ce::{
|
||||
Circuit,
|
||||
ConstraintSystem,
|
||||
SynthesisError
|
||||
};
|
||||
|
||||
// We're going to use the Groth16 proving system.
|
||||
use bellman::groth16::{
|
||||
use bellman_ce::groth16::{
|
||||
Proof,
|
||||
generate_random_parameters,
|
||||
prepare_verifying_key,
|
||||
|
Loading…
Reference in New Issue
Block a user