Browse Source

Rename to `ed_on`

master
Pratyush Mishra 4 years ago
parent
commit
9391b1fd04
31 changed files with 62 additions and 66 deletions
  1. +1
    -1
      cp-benches/Cargo.toml
  2. +1
    -1
      cp-benches/benches/crypto_primitives/comm.rs
  3. +1
    -1
      cp-benches/benches/crypto_primitives/crh.rs
  4. +2
    -2
      cp-benches/benches/crypto_primitives/signature.rs
  5. +2
    -2
      crypto-primitives/Cargo.toml
  6. +1
    -1
      crypto-primitives/src/commitment/blake2s/constraints.rs
  7. +2
    -3
      crypto-primitives/src/commitment/pedersen/constraints.rs
  8. +2
    -2
      crypto-primitives/src/crh/bowe_hopwood/constraints.rs
  9. +1
    -1
      crypto-primitives/src/crh/bowe_hopwood/mod.rs
  10. +2
    -3
      crypto-primitives/src/crh/pedersen/constraints.rs
  11. +2
    -4
      crypto-primitives/src/merkle_tree/constraints.rs
  12. +1
    -1
      crypto-primitives/src/merkle_tree/mod.rs
  13. +1
    -1
      crypto-primitives/src/prf/blake2s/constraints.rs
  14. +1
    -1
      crypto-primitives/src/signature/mod.rs
  15. +6
    -6
      r1cs-std/Cargo.toml
  16. +2
    -2
      r1cs-std/src/instantiated/ed_on_bls12_377/curves.rs
  17. +1
    -1
      r1cs-std/src/instantiated/ed_on_bls12_377/fields.rs
  18. +0
    -0
      r1cs-std/src/instantiated/ed_on_bls12_377/mod.rs
  19. +2
    -2
      r1cs-std/src/instantiated/ed_on_bls12_381/curves.rs
  20. +8
    -0
      r1cs-std/src/instantiated/ed_on_bls12_381/fields.rs
  21. +0
    -0
      r1cs-std/src/instantiated/ed_on_bls12_381/mod.rs
  22. +2
    -2
      r1cs-std/src/instantiated/ed_on_bw6_761/curves.rs
  23. +1
    -1
      r1cs-std/src/instantiated/ed_on_bw6_761/fields.rs
  24. +1
    -0
      r1cs-std/src/instantiated/ed_on_bw6_761/mod.rs
  25. +2
    -2
      r1cs-std/src/instantiated/ed_on_cp6_782/curves.rs
  26. +1
    -1
      r1cs-std/src/instantiated/ed_on_cp6_782/fields.rs
  27. +0
    -0
      r1cs-std/src/instantiated/ed_on_cp6_782/mod.rs
  28. +0
    -8
      r1cs-std/src/instantiated/edwards_on_bls12_381/fields.rs
  29. +0
    -1
      r1cs-std/src/instantiated/edwards_on_bw6_761/mod.rs
  30. +10
    -10
      r1cs-std/src/instantiated/mod.rs
  31. +6
    -6
      r1cs-std/src/lib.rs

+ 1
- 1
cp-benches/Cargo.toml

@ -22,7 +22,7 @@ edition = "2018"
################################# Dependencies ################################
[dev-dependencies]
algebra = { path = "../algebra", default-features = false, features = [ "edwards_on_bls12_377" ] }
algebra = { path = "../algebra", default-features = false, features = [ "ed_on_bls12_377" ] }
blake2 = { version = "0.8", default-features = false }
criterion = "0.3.1"
crypto-primitives = { path = "../crypto-primitives" }

+ 1
- 1
cp-benches/benches/crypto_primitives/comm.rs

@ -3,7 +3,7 @@ use rand;
#[macro_use]
extern crate criterion;
use algebra::{edwards_on_bls12_377::EdwardsProjective as Edwards, UniformRand};
use algebra::{ed_on_bls12_377::EdwardsProjective as Edwards, UniformRand};
use criterion::Criterion;
use crypto_primitives::commitment::{pedersen::*, CommitmentScheme};

+ 1
- 1
cp-benches/benches/crypto_primitives/crh.rs

@ -3,7 +3,7 @@ use rand;
#[macro_use]
extern crate criterion;
use algebra::edwards_on_bls12_377::EdwardsProjective as Edwards;
use algebra::ed_on_bls12_377::EdwardsProjective as Edwards;
use criterion::Criterion;
use crypto_primitives::crh::{pedersen::*, FixedLengthCRH};

+ 2
- 2
cp-benches/benches/crypto_primitives/signature.rs

@ -2,7 +2,7 @@
extern crate criterion;
mod affine {
use algebra::edwards_on_bls12_377::EdwardsAffine as Edwards;
use algebra::ed_on_bls12_377::EdwardsAffine as Edwards;
use blake2::Blake2s;
use criterion::Criterion;
use crypto_primitives::signature::{schnorr::*, SignatureScheme};
@ -90,7 +90,7 @@ mod affine {
}
mod projective {
use algebra::edwards_on_bls12_377::EdwardsProjective as Edwards;
use algebra::ed_on_bls12_377::EdwardsProjective as Edwards;
use blake2::Blake2s;
use criterion::Criterion;
use crypto_primitives::signature::{schnorr::*, SignatureScheme};

+ 2
- 2
crypto-primitives/Cargo.toml

@ -46,6 +46,6 @@ std = ["r1cs", "algebra-core/std", "r1cs-core/std", "r1cs-std/std"]
parallel = ["std", "rayon", "gm17/parallel", "groth16/parallel", "ff-fft/parallel"]
[dev-dependencies]
algebra = { path = "../algebra", default-features = false, features = [ "edwards_on_bls12_381", "bls12_377", "mnt4_298", "mnt6_298" ] }
r1cs-std = { path = "../r1cs-std", default-features = false, features = [ "edwards_on_bls12_381", "bls12_377", "mnt4_298", "mnt6_298" ] }
algebra = { path = "../algebra", default-features = false, features = [ "ed_on_bls12_381", "bls12_377", "mnt4_298", "mnt6_298" ] }
r1cs-std = { path = "../r1cs-std", default-features = false, features = [ "ed_on_bls12_381", "bls12_377", "mnt4_298", "mnt6_298" ] }
rand_xorshift = { version = "0.2" }

+ 1
- 1
crypto-primitives/src/commitment/blake2s/constraints.rs

@ -143,7 +143,7 @@ mod test {
},
*,
};
use algebra::{edwards_on_bls12_381::Fq as Fr, test_rng};
use algebra::{ed_on_bls12_381::Fq as Fr, test_rng};
use r1cs_core::ConstraintSystem;
use r1cs_std::{prelude::*, test_constraint_system::TestConstraintSystem};
use rand::Rng;

+ 2
- 3
crypto-primitives/src/commitment/pedersen/constraints.rs

@ -200,7 +200,7 @@ where
#[cfg(test)]
mod test {
use algebra::{
edwards_on_bls12_381::{EdwardsProjective as JubJub, Fq, Fr},
ed_on_bls12_381::{EdwardsProjective as JubJub, Fq, Fr},
test_rng, ProjectiveCurve, UniformRand,
};
@ -215,8 +215,7 @@ mod test {
};
use r1cs_core::ConstraintSystem;
use r1cs_std::{
edwards_on_bls12_381::EdwardsGadget, prelude::*,
test_constraint_system::TestConstraintSystem,
ed_on_bls12_381::EdwardsGadget, prelude::*, test_constraint_system::TestConstraintSystem,
};
#[test]

+ 2
- 2
crypto-primitives/src/crh/bowe_hopwood/constraints.rs

@ -145,12 +145,12 @@ mod test {
FixedLengthCRH, FixedLengthCRHGadget,
};
use algebra::{
edwards_on_bls12_381::{EdwardsProjective as JubJub, Fq as Fr},
ed_on_bls12_381::{EdwardsProjective as JubJub, Fq as Fr},
test_rng, ProjectiveCurve,
};
use r1cs_core::ConstraintSystem;
use r1cs_std::{
alloc::AllocGadget, edwards_on_bls12_381::EdwardsGadget,
alloc::AllocGadget, ed_on_bls12_381::EdwardsGadget,
test_constraint_system::TestConstraintSystem, uint8::UInt8,
};

+ 1
- 1
crypto-primitives/src/crh/bowe_hopwood/mod.rs

@ -173,7 +173,7 @@ mod test {
crh::{bowe_hopwood::BoweHopwoodPedersenCRH, pedersen::PedersenWindow},
FixedLengthCRH,
};
use algebra::{edwards_on_bls12_381::EdwardsProjective, test_rng};
use algebra::{ed_on_bls12_381::EdwardsProjective, test_rng};
#[test]
fn test_simple_bh() {

+ 2
- 3
crypto-primitives/src/crh/pedersen/constraints.rs

@ -133,13 +133,12 @@ mod test {
FixedLengthCRH, FixedLengthCRHGadget,
};
use algebra::{
edwards_on_bls12_381::{EdwardsProjective as JubJub, Fq as Fr},
ed_on_bls12_381::{EdwardsProjective as JubJub, Fq as Fr},
test_rng, ProjectiveCurve,
};
use r1cs_core::ConstraintSystem;
use r1cs_std::{
edwards_on_bls12_381::EdwardsGadget, prelude::*,
test_constraint_system::TestConstraintSystem,
ed_on_bls12_381::EdwardsGadget, prelude::*, test_constraint_system::TestConstraintSystem,
};
use rand::Rng;

+ 2
- 4
crypto-primitives/src/merkle_tree/constraints.rs

@ -207,15 +207,13 @@ mod test {
},
merkle_tree::*,
};
use algebra::edwards_on_bls12_381::{EdwardsAffine as JubJub, Fq};
use algebra::ed_on_bls12_381::{EdwardsAffine as JubJub, Fq};
use r1cs_core::ConstraintSystem;
use rand::SeedableRng;
use rand_xorshift::XorShiftRng;
use super::*;
use r1cs_std::{
edwards_on_bls12_381::EdwardsGadget, test_constraint_system::TestConstraintSystem,
};
use r1cs_std::{ed_on_bls12_381::EdwardsGadget, test_constraint_system::TestConstraintSystem};
#[derive(Clone)]
pub(super) struct Window4x256;

+ 1
- 1
crypto-primitives/src/merkle_tree/mod.rs

@ -369,7 +369,7 @@ mod test {
crh::{pedersen::*, *},
merkle_tree::*,
};
use algebra::{edwards_on_bls12_381::EdwardsAffine as JubJub, Zero};
use algebra::{ed_on_bls12_381::EdwardsAffine as JubJub, Zero};
use rand::SeedableRng;
use rand_xorshift::XorShiftRng;

+ 1
- 1
crypto-primitives/src/prf/blake2s/constraints.rs

@ -537,7 +537,7 @@ impl PRFGadget for Blake2sGadget
#[cfg(test)]
mod test {
use algebra::edwards_on_bls12_381::Fq as Fr;
use algebra::ed_on_bls12_381::Fq as Fr;
use rand::{Rng, SeedableRng};
use rand_xorshift::XorShiftRng;

+ 1
- 1
crypto-primitives/src/signature/mod.rs

@ -54,7 +54,7 @@ pub trait SignatureScheme {
mod test {
use crate::{signature::schnorr::SchnorrSignature, SignatureScheme};
use algebra::{
edwards_on_bls12_381::EdwardsAffine as JubJub, groups::Group, test_rng, to_bytes, ToBytes,
ed_on_bls12_381::EdwardsAffine as JubJub, groups::Group, test_rng, to_bytes, ToBytes,
UniformRand,
};
use blake2::Blake2s;

+ 6
- 6
r1cs-std/Cargo.toml

@ -36,15 +36,15 @@ algebra = { path = "../algebra", default-features = false, features = [ "bls12_3
[features]
default = ["std"]
full = [
"bls12_377", "edwards_on_bls12_381", "edwards_on_bls12_377", "edwards_on_cp6_782",
"edwards_on_bw6_761", "mnt4_298", "mnt4_753", "mnt6_298", "mnt6_753"
"bls12_377", "ed_on_bls12_381", "ed_on_bls12_377", "ed_on_cp6_782",
"ed_on_bw6_761", "mnt4_298", "mnt4_753", "mnt6_298", "mnt6_753"
]
bls12_377 = [ "algebra/bls12_377" ]
edwards_on_bls12_381 = [ "algebra/edwards_on_bls12_381" ]
edwards_on_bls12_377 = [ "algebra/edwards_on_bls12_377" ]
edwards_on_cp6_782 = [ "algebra/edwards_on_cp6_782" ]
edwards_on_bw6_761 = [ "algebra/edwards_on_bw6_761", "algebra/edwards_on_cp6_782" ]
ed_on_bls12_381 = [ "algebra/ed_on_bls12_381" ]
ed_on_bls12_377 = [ "algebra/ed_on_bls12_377" ]
ed_on_cp6_782 = [ "algebra/ed_on_cp6_782" ]
ed_on_bw6_761 = [ "algebra/ed_on_bw6_761", "algebra/ed_on_cp6_782" ]
mnt4_298 = [ "algebra/mnt4_298" ]
mnt4_753 = [ "algebra/mnt4_753" ]
mnt6_298 = [ "algebra/mnt6_298" ]

r1cs-std/src/instantiated/edwards_on_bw6_761/curves.rs → r1cs-std/src/instantiated/ed_on_bls12_377/curves.rs

@ -1,7 +1,7 @@
use crate::groups::curves::twisted_edwards::AffineGadget;
use algebra::edwards_on_cp6_782::*;
use algebra::ed_on_bls12_377::*;
use crate::edwards_on_cp6_782::FqGadget;
use crate::ed_on_bls12_377::FqGadget;
pub type EdwardsGadget = AffineGadget<EdwardsParameters, Fq, FqGadget>;

r1cs-std/src/instantiated/edwards_on_bw6_761/fields.rs → r1cs-std/src/instantiated/ed_on_bls12_377/fields.rs

@ -1,5 +1,5 @@
use crate::fields::fp::FpGadget;
use algebra::edwards_on_cp6_782::fq::Fq;
use algebra::ed_on_bls12_377::fq::Fq;
pub type FqGadget = FpGadget<Fq>;

r1cs-std/src/instantiated/edwards_on_bls12_377/mod.rs → r1cs-std/src/instantiated/ed_on_bls12_377/mod.rs


r1cs-std/src/instantiated/edwards_on_bls12_381/curves.rs → r1cs-std/src/instantiated/ed_on_bls12_381/curves.rs

@ -1,7 +1,7 @@
use crate::groups::curves::twisted_edwards::AffineGadget;
use algebra::edwards_on_bls12_381::*;
use algebra::ed_on_bls12_381::*;
use crate::edwards_on_bls12_381::FqGadget;
use crate::ed_on_bls12_381::FqGadget;
pub type EdwardsGadget = AffineGadget<EdwardsParameters, Fq, FqGadget>;

+ 8
- 0
r1cs-std/src/instantiated/ed_on_bls12_381/fields.rs

@ -0,0 +1,8 @@
use crate::fields::fp::FpGadget;
pub type FqGadget = FpGadget<algebra::ed_on_bls12_381::Fq>;
#[test]
fn test() {
crate::fields::tests::field_test::<_, algebra::ed_on_bls12_381::Fq, FqGadget>();
}

r1cs-std/src/instantiated/edwards_on_bls12_381/mod.rs → r1cs-std/src/instantiated/ed_on_bls12_381/mod.rs


r1cs-std/src/instantiated/edwards_on_bls12_377/curves.rs → r1cs-std/src/instantiated/ed_on_bw6_761/curves.rs

@ -1,7 +1,7 @@
use crate::groups::curves::twisted_edwards::AffineGadget;
use algebra::edwards_on_bls12_377::*;
use algebra::ed_on_cp6_782::*;
use crate::edwards_on_bls12_377::FqGadget;
use crate::ed_on_cp6_782::FqGadget;
pub type EdwardsGadget = AffineGadget<EdwardsParameters, Fq, FqGadget>;

r1cs-std/src/instantiated/edwards_on_cp6_782/fields.rs → r1cs-std/src/instantiated/ed_on_bw6_761/fields.rs

@ -1,5 +1,5 @@
use crate::fields::fp::FpGadget;
use algebra::edwards_on_cp6_782::fq::Fq;
use algebra::ed_on_cp6_782::fq::Fq;
pub type FqGadget = FpGadget<Fq>;

+ 1
- 0
r1cs-std/src/instantiated/ed_on_bw6_761/mod.rs

@ -0,0 +1 @@
pub use crate::instantiated::ed_on_cp6_782::*;

r1cs-std/src/instantiated/edwards_on_cp6_782/curves.rs → r1cs-std/src/instantiated/ed_on_cp6_782/curves.rs

@ -1,7 +1,7 @@
use crate::groups::curves::twisted_edwards::AffineGadget;
use algebra::edwards_on_cp6_782::*;
use algebra::ed_on_cp6_782::*;
use crate::instantiated::edwards_on_cp6_782::FqGadget;
use crate::instantiated::ed_on_cp6_782::FqGadget;
pub type EdwardsGadget = AffineGadget<EdwardsParameters, Fq, FqGadget>;

r1cs-std/src/instantiated/edwards_on_bls12_377/fields.rs → r1cs-std/src/instantiated/ed_on_cp6_782/fields.rs

@ -1,5 +1,5 @@
use crate::fields::fp::FpGadget;
use algebra::edwards_on_bls12_377::fq::Fq;
use algebra::ed_on_cp6_782::fq::Fq;
pub type FqGadget = FpGadget<Fq>;

r1cs-std/src/instantiated/edwards_on_cp6_782/mod.rs → r1cs-std/src/instantiated/ed_on_cp6_782/mod.rs


+ 0
- 8
r1cs-std/src/instantiated/edwards_on_bls12_381/fields.rs

@ -1,8 +0,0 @@
use crate::fields::fp::FpGadget;
pub type FqGadget = FpGadget<algebra::edwards_on_bls12_381::Fq>;
#[test]
fn test() {
crate::fields::tests::field_test::<_, algebra::edwards_on_bls12_381::Fq, FqGadget>();
}

+ 0
- 1
r1cs-std/src/instantiated/edwards_on_bw6_761/mod.rs

@ -1 +0,0 @@
pub use crate::instantiated::edwards_on_cp6_782::*;

+ 10
- 10
r1cs-std/src/instantiated/mod.rs

@ -1,20 +1,20 @@
#[cfg(feature = "bls12_377")]
pub mod bls12_377;
#[cfg(feature = "edwards_on_bls12_377")]
pub mod edwards_on_bls12_377;
#[cfg(feature = "ed_on_bls12_377")]
pub mod ed_on_bls12_377;
#[cfg(feature = "edwards_on_cp6_782")]
pub mod edwards_on_cp6_782;
#[cfg(feature = "ed_on_cp6_782")]
pub mod ed_on_cp6_782;
#[cfg(all(not(feature = "edwards_on_cp6_782"), feature = "edwards_on_bw6_761"))]
pub(crate) mod edwards_on_cp6_782;
#[cfg(all(not(feature = "ed_on_cp6_782"), feature = "ed_on_bw6_761"))]
pub(crate) mod ed_on_cp6_782;
#[cfg(feature = "edwards_on_bw6_761")]
pub mod edwards_on_bw6_761;
#[cfg(feature = "ed_on_bw6_761")]
pub mod ed_on_bw6_761;
#[cfg(feature = "edwards_on_bls12_381")]
pub mod edwards_on_bls12_381;
#[cfg(feature = "ed_on_bls12_381")]
pub mod ed_on_bls12_381;
#[cfg(feature = "mnt4_298")]
pub mod mnt4_298;

+ 6
- 6
r1cs-std/src/lib.rs

@ -48,14 +48,14 @@ mod instantiated;
#[cfg(feature = "bls12_377")]
pub use instantiated::bls12_377;
#[cfg(feature = "edwards_on_bls12_377")]
pub use instantiated::edwards_on_bls12_377;
#[cfg(feature = "ed_on_bls12_377")]
pub use instantiated::ed_on_bls12_377;
#[cfg(feature = "edwards_on_cp6_782")]
pub use instantiated::edwards_on_cp6_782;
#[cfg(feature = "ed_on_cp6_782")]
pub use instantiated::ed_on_cp6_782;
#[cfg(feature = "edwards_on_bls12_381")]
pub use instantiated::edwards_on_bls12_381;
#[cfg(feature = "ed_on_bls12_381")]
pub use instantiated::ed_on_bls12_381;
#[cfg(feature = "mnt4_298")]
pub use instantiated::mnt4_298;

Loading…
Cancel
Save