organize nizk and scalar modules
This commit is contained in:
Родитель
958e9450db
Коммит
290bbc0897
|
@ -200,7 +200,7 @@ fn set_duration() -> Criterion {
|
|||
criterion_group! {
|
||||
name = benches_spartan;
|
||||
config = set_duration();
|
||||
targets = snark_encode_benchmark, snark_prove_benchmark, snark_verify_benchmark
|
||||
targets = snark_encode_benchmark, snark_prove_benchmark, snark_verify_benchmark, nizk_prove_benchmark, nizk_verify_benchmark
|
||||
}
|
||||
|
||||
criterion_main!(benches_spartan);
|
||||
|
|
|
@ -11,7 +11,6 @@ extern crate rayon;
|
|||
extern crate sha3;
|
||||
extern crate test;
|
||||
|
||||
mod bullet;
|
||||
pub mod commitments;
|
||||
pub mod dense_mlpoly;
|
||||
mod errors;
|
||||
|
@ -23,7 +22,6 @@ pub mod r1csinstance;
|
|||
pub mod r1csproof;
|
||||
pub mod random;
|
||||
pub mod scalar;
|
||||
mod scalar_25519;
|
||||
pub mod sparse_mlpoly;
|
||||
pub mod spartan;
|
||||
pub mod sumcheck;
|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
#![allow(non_snake_case)]
|
||||
|
||||
use super::errors::ProofVerifyError;
|
||||
use super::group::{CompressedGroup, GroupElement, VartimeMultiscalarMul};
|
||||
use super::math::Math;
|
||||
use super::scalar::Scalar;
|
||||
use super::transcript::ProofTranscript;
|
||||
use super::super::errors::ProofVerifyError;
|
||||
use super::super::group::{CompressedGroup, GroupElement, VartimeMultiscalarMul};
|
||||
use super::super::math::Math;
|
||||
use super::super::scalar::Scalar;
|
||||
use super::super::transcript::ProofTranscript;
|
||||
use merlin::Transcript;
|
||||
use serde::{Deserialize, Serialize};
|
||||
use std::iter;
|
|
@ -1,4 +1,3 @@
|
|||
use super::bullet::BulletReductionProof;
|
||||
use super::commitments::{Commitments, MultiCommitGens};
|
||||
use super::errors::ProofVerifyError;
|
||||
use super::group::CompressedGroup;
|
||||
|
@ -9,6 +8,9 @@ use super::transcript::{AppendToTranscript, ProofTranscript};
|
|||
use merlin::Transcript;
|
||||
use serde::{Deserialize, Serialize};
|
||||
|
||||
mod bullet;
|
||||
use bullet::BulletReductionProof;
|
||||
|
||||
#[derive(Serialize, Deserialize, Debug)]
|
||||
pub struct KnowledgeProof {
|
||||
alpha: CompressedGroup,
|
|
@ -1,4 +1,6 @@
|
|||
pub type Scalar = super::scalar_25519::Scalar;
|
||||
mod ristretto255;
|
||||
|
||||
pub type Scalar = ristretto255::Scalar;
|
||||
pub type ScalarBytes = curve25519_dalek::scalar::Scalar;
|
||||
|
||||
pub trait ScalarFromPrimitives {
|
Загрузка…
Ссылка в новой задаче