From 1959a3de63beeec679b6551a65ba818c7ebbc99b Mon Sep 17 00:00:00 2001 From: Pratyush Mishra Date: Tue, 9 Jun 2020 23:08:29 -0700 Subject: [PATCH] Rename curves --- cp-benches/Cargo.toml | 2 +- cp-benches/benches/crypto_primitives/comm.rs | 2 +- cp-benches/benches/crypto_primitives/crh.rs | 2 +- cp-benches/benches/crypto_primitives/signature.rs | 4 ++-- crypto-primitives/Cargo.toml | 4 ++-- .../src/commitment/blake2s/constraints.rs | 2 +- .../src/commitment/pedersen/constraints.rs | 5 +++-- .../src/crh/bowe_hopwood/constraints.rs | 6 +++--- crypto-primitives/src/crh/bowe_hopwood/mod.rs | 6 +++--- crypto-primitives/src/crh/pedersen/constraints.rs | 5 +++-- crypto-primitives/src/merkle_tree/constraints.rs | 6 ++++-- crypto-primitives/src/merkle_tree/mod.rs | 2 +- crypto-primitives/src/prf/blake2s/constraints.rs | 2 +- crypto-primitives/src/signature/mod.rs | 3 ++- r1cs-std/Cargo.toml | 8 ++++---- r1cs-std/src/instantiated/edwards_bls12/curves.rs | 11 ----------- .../src/instantiated/edwards_on_bls12_377/curves.rs | 11 +++++++++++ .../{edwards_sw6 => edwards_on_bls12_377}/fields.rs | 2 +- .../{edwards_bls12 => edwards_on_bls12_377}/mod.rs | 0 .../src/instantiated/edwards_on_bls12_381/curves.rs | 11 +++++++++++ .../src/instantiated/edwards_on_bls12_381/fields.rs | 8 ++++++++ .../{edwards_sw6 => edwards_on_bls12_381}/mod.rs | 0 .../src/instantiated/edwards_on_cp6_782/curves.rs | 11 +++++++++++ .../{edwards_bls12 => edwards_on_cp6_782}/fields.rs | 2 +- .../{jubjub => edwards_on_cp6_782}/mod.rs | 0 r1cs-std/src/instantiated/edwards_sw6/curves.rs | 11 ----------- r1cs-std/src/instantiated/jubjub/curves.rs | 11 ----------- r1cs-std/src/instantiated/jubjub/fields.rs | 8 -------- r1cs-std/src/instantiated/mod.rs | 12 ++++++------ r1cs-std/src/lib.rs | 12 ++++++------ r1cs-std/src/test_constraint_system.rs | 5 ++++- 31 files changed, 91 insertions(+), 83 deletions(-) delete mode 100644 r1cs-std/src/instantiated/edwards_bls12/curves.rs create mode 100644 r1cs-std/src/instantiated/edwards_on_bls12_377/curves.rs rename r1cs-std/src/instantiated/{edwards_sw6 => edwards_on_bls12_377}/fields.rs (77%) rename r1cs-std/src/instantiated/{edwards_bls12 => edwards_on_bls12_377}/mod.rs (100%) create mode 100644 r1cs-std/src/instantiated/edwards_on_bls12_381/curves.rs create mode 100644 r1cs-std/src/instantiated/edwards_on_bls12_381/fields.rs rename r1cs-std/src/instantiated/{edwards_sw6 => edwards_on_bls12_381}/mod.rs (100%) create mode 100644 r1cs-std/src/instantiated/edwards_on_cp6_782/curves.rs rename r1cs-std/src/instantiated/{edwards_bls12 => edwards_on_cp6_782}/fields.rs (78%) rename r1cs-std/src/instantiated/{jubjub => edwards_on_cp6_782}/mod.rs (100%) delete mode 100644 r1cs-std/src/instantiated/edwards_sw6/curves.rs delete mode 100644 r1cs-std/src/instantiated/jubjub/curves.rs delete mode 100644 r1cs-std/src/instantiated/jubjub/fields.rs diff --git a/cp-benches/Cargo.toml b/cp-benches/Cargo.toml index 018bbfd..9ed0a53 100644 --- a/cp-benches/Cargo.toml +++ b/cp-benches/Cargo.toml @@ -22,7 +22,7 @@ edition = "2018" ################################# Dependencies ################################ [dev-dependencies] -algebra = { path = "../algebra", default-features = false, features = [ "edwards_bls12" ] } +algebra = { path = "../algebra", default-features = false, features = [ "edwards_on_bls12_377" ] } blake2 = { version = "0.8", default-features = false } criterion = "0.3.1" crypto-primitives = { path = "../crypto-primitives" } diff --git a/cp-benches/benches/crypto_primitives/comm.rs b/cp-benches/benches/crypto_primitives/comm.rs index 5c3645c..0ff4a7c 100644 --- a/cp-benches/benches/crypto_primitives/comm.rs +++ b/cp-benches/benches/crypto_primitives/comm.rs @@ -3,7 +3,7 @@ use rand; #[macro_use] extern crate criterion; -use algebra::{edwards_bls12::EdwardsProjective as Edwards, UniformRand}; +use algebra::{edwards_on_bls12_377::EdwardsProjective as Edwards, UniformRand}; use criterion::Criterion; use crypto_primitives::commitment::{pedersen::*, CommitmentScheme}; diff --git a/cp-benches/benches/crypto_primitives/crh.rs b/cp-benches/benches/crypto_primitives/crh.rs index 81a98d7..b8ac1ce 100644 --- a/cp-benches/benches/crypto_primitives/crh.rs +++ b/cp-benches/benches/crypto_primitives/crh.rs @@ -3,7 +3,7 @@ use rand; #[macro_use] extern crate criterion; -use algebra::edwards_bls12::EdwardsProjective as Edwards; +use algebra::edwards_on_bls12_377::EdwardsProjective as Edwards; use criterion::Criterion; use crypto_primitives::crh::{pedersen::*, FixedLengthCRH}; diff --git a/cp-benches/benches/crypto_primitives/signature.rs b/cp-benches/benches/crypto_primitives/signature.rs index 2bca6e2..57d2803 100644 --- a/cp-benches/benches/crypto_primitives/signature.rs +++ b/cp-benches/benches/crypto_primitives/signature.rs @@ -2,7 +2,7 @@ extern crate criterion; mod affine { - use algebra::edwards_bls12::EdwardsAffine as Edwards; + use algebra::edwards_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_bls12::EdwardsProjective as Edwards; + use algebra::edwards_on_bls12_377::EdwardsProjective as Edwards; use blake2::Blake2s; use criterion::Criterion; use crypto_primitives::signature::{schnorr::*, SignatureScheme}; diff --git a/crypto-primitives/Cargo.toml b/crypto-primitives/Cargo.toml index 0b451df..fcf1910 100644 --- a/crypto-primitives/Cargo.toml +++ b/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 = [ "jubjub", "bls12_377", "mnt4_298", "mnt6_298" ] } -r1cs-std = { path = "../r1cs-std", default-features = false, features = [ "jubjub", "bls12_377", "mnt4_298", "mnt6_298" ] } +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" ] } rand_xorshift = { version = "0.2" } diff --git a/crypto-primitives/src/commitment/blake2s/constraints.rs b/crypto-primitives/src/commitment/blake2s/constraints.rs index 1fbeff5..495d093 100644 --- a/crypto-primitives/src/commitment/blake2s/constraints.rs +++ b/crypto-primitives/src/commitment/blake2s/constraints.rs @@ -143,7 +143,7 @@ mod test { }, *, }; - use algebra::{jubjub::Fq as Fr, test_rng}; + use algebra::{edwards_on_bls12_381::Fq as Fr, test_rng}; use r1cs_core::ConstraintSystem; use r1cs_std::{prelude::*, test_constraint_system::TestConstraintSystem}; use rand::Rng; diff --git a/crypto-primitives/src/commitment/pedersen/constraints.rs b/crypto-primitives/src/commitment/pedersen/constraints.rs index f408b9c..941dec3 100644 --- a/crypto-primitives/src/commitment/pedersen/constraints.rs +++ b/crypto-primitives/src/commitment/pedersen/constraints.rs @@ -200,7 +200,7 @@ where #[cfg(test)] mod test { use algebra::{ - jubjub::{Fq, Fr, JubJubProjective as JubJub}, + edwards_on_bls12_381::{EdwardsProjective as JubJub, Fq, Fr}, test_rng, ProjectiveCurve, UniformRand, }; @@ -215,7 +215,8 @@ mod test { }; use r1cs_core::ConstraintSystem; use r1cs_std::{ - jubjub::JubJubGadget, prelude::*, test_constraint_system::TestConstraintSystem, + edwards_on_bls12_381::JubJubGadget, prelude::*, + test_constraint_system::TestConstraintSystem, }; #[test] diff --git a/crypto-primitives/src/crh/bowe_hopwood/constraints.rs b/crypto-primitives/src/crh/bowe_hopwood/constraints.rs index 5afc543..8e9a905 100644 --- a/crypto-primitives/src/crh/bowe_hopwood/constraints.rs +++ b/crypto-primitives/src/crh/bowe_hopwood/constraints.rs @@ -145,13 +145,13 @@ mod test { FixedLengthCRH, FixedLengthCRHGadget, }; use algebra::{ - jubjub::{Fq as Fr, JubJubProjective as JubJub}, + edwards_on_bls12_381::{EdwardsProjective as JubJub, Fq as Fr}, test_rng, ProjectiveCurve, }; use r1cs_core::ConstraintSystem; use r1cs_std::{ - alloc::AllocGadget, jubjub::JubJubGadget, test_constraint_system::TestConstraintSystem, - uint8::UInt8, + alloc::AllocGadget, edwards_on_bls12_381::JubJubGadget, + test_constraint_system::TestConstraintSystem, uint8::UInt8, }; type TestCRH = BoweHopwoodPedersenCRH; diff --git a/crypto-primitives/src/crh/bowe_hopwood/mod.rs b/crypto-primitives/src/crh/bowe_hopwood/mod.rs index f7d9681..fe4a7ad 100644 --- a/crypto-primitives/src/crh/bowe_hopwood/mod.rs +++ b/crypto-primitives/src/crh/bowe_hopwood/mod.rs @@ -173,7 +173,7 @@ mod test { crh::{bowe_hopwood::BoweHopwoodPedersenCRH, pedersen::PedersenWindow}, FixedLengthCRH, }; - use algebra::{jubjub::JubJubProjective, test_rng}; + use algebra::{edwards_on_bls12_381::EdwardsProjective, test_rng}; #[test] fn test_simple_bh() { @@ -186,9 +186,9 @@ mod test { let rng = &mut test_rng(); let params = - as FixedLengthCRH>::setup(rng) + as FixedLengthCRH>::setup(rng) .unwrap(); - as FixedLengthCRH>::evaluate( + as FixedLengthCRH>::evaluate( ¶ms, &[1, 2, 3], ) diff --git a/crypto-primitives/src/crh/pedersen/constraints.rs b/crypto-primitives/src/crh/pedersen/constraints.rs index bb3f6a2..6857317 100644 --- a/crypto-primitives/src/crh/pedersen/constraints.rs +++ b/crypto-primitives/src/crh/pedersen/constraints.rs @@ -133,12 +133,13 @@ mod test { FixedLengthCRH, FixedLengthCRHGadget, }; use algebra::{ - jubjub::{Fq as Fr, JubJubProjective as JubJub}, + edwards_on_bls12_381::{EdwardsProjective as JubJub, Fq as Fr}, test_rng, ProjectiveCurve, }; use r1cs_core::ConstraintSystem; use r1cs_std::{ - jubjub::JubJubGadget, prelude::*, test_constraint_system::TestConstraintSystem, + edwards_on_bls12_381::JubJubGadget, prelude::*, + test_constraint_system::TestConstraintSystem, }; use rand::Rng; diff --git a/crypto-primitives/src/merkle_tree/constraints.rs b/crypto-primitives/src/merkle_tree/constraints.rs index 58b242e..a91a4b9 100644 --- a/crypto-primitives/src/merkle_tree/constraints.rs +++ b/crypto-primitives/src/merkle_tree/constraints.rs @@ -207,13 +207,15 @@ mod test { }, merkle_tree::*, }; - use algebra::jubjub::{Fq, JubJubAffine as JubJub}; + use algebra::edwards_on_bls12_381::{EdwardsAffine as JubJub, Fq}; use r1cs_core::ConstraintSystem; use rand::SeedableRng; use rand_xorshift::XorShiftRng; use super::*; - use r1cs_std::{jubjub::JubJubGadget, test_constraint_system::TestConstraintSystem}; + use r1cs_std::{ + edwards_on_bls12_381::JubJubGadget, test_constraint_system::TestConstraintSystem, + }; #[derive(Clone)] pub(super) struct Window4x256; diff --git a/crypto-primitives/src/merkle_tree/mod.rs b/crypto-primitives/src/merkle_tree/mod.rs index 9087149..9c8210e 100644 --- a/crypto-primitives/src/merkle_tree/mod.rs +++ b/crypto-primitives/src/merkle_tree/mod.rs @@ -369,7 +369,7 @@ mod test { crh::{pedersen::*, *}, merkle_tree::*, }; - use algebra::{jubjub::JubJubAffine as JubJub, Zero}; + use algebra::{edwards_on_bls12_381::EdwardsAffine as JubJub, Zero}; use rand::SeedableRng; use rand_xorshift::XorShiftRng; diff --git a/crypto-primitives/src/prf/blake2s/constraints.rs b/crypto-primitives/src/prf/blake2s/constraints.rs index 68576eb..0b6deee 100644 --- a/crypto-primitives/src/prf/blake2s/constraints.rs +++ b/crypto-primitives/src/prf/blake2s/constraints.rs @@ -537,7 +537,7 @@ impl PRFGadget for Blake2sGadget #[cfg(test)] mod test { - use algebra::jubjub::Fq as Fr; + use algebra::edwards_on_bls12_381::Fq as Fr; use rand::{Rng, SeedableRng}; use rand_xorshift::XorShiftRng; diff --git a/crypto-primitives/src/signature/mod.rs b/crypto-primitives/src/signature/mod.rs index 9612ed3..261e6cf 100644 --- a/crypto-primitives/src/signature/mod.rs +++ b/crypto-primitives/src/signature/mod.rs @@ -54,7 +54,8 @@ pub trait SignatureScheme { mod test { use crate::{signature::schnorr::SchnorrSignature, SignatureScheme}; use algebra::{ - groups::Group, jubjub::JubJubAffine as JubJub, test_rng, to_bytes, ToBytes, UniformRand, + edwards_on_bls12_381::EdwardsAffine as JubJub, groups::Group, test_rng, to_bytes, ToBytes, + UniformRand, }; use blake2::Blake2s; diff --git a/r1cs-std/Cargo.toml b/r1cs-std/Cargo.toml index d7caf9a..42e0a98 100644 --- a/r1cs-std/Cargo.toml +++ b/r1cs-std/Cargo.toml @@ -35,12 +35,12 @@ algebra = { path = "../algebra", default-features = false, features = [ "bls12_3 [features] default = ["std"] -full = [ "bls12_377", "jubjub", "edwards_bls12", "edwards_sw6", "mnt4_298", "mnt4_753", "mnt6_298", "mnt6_753" ] +full = [ "bls12_377", "edwards_on_bls12_381", "edwards_on_bls12_377", "edwards_on_cp6_782", "mnt4_298", "mnt4_753", "mnt6_298", "mnt6_753" ] bls12_377 = [ "algebra/bls12_377" ] -jubjub = [ "algebra/jubjub" ] -edwards_bls12 = [ "algebra/edwards_bls12" ] -edwards_sw6 = [ "algebra/edwards_sw6" ] +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" ] mnt4_298 = [ "algebra/mnt4_298" ] mnt4_753 = [ "algebra/mnt4_753" ] mnt6_298 = [ "algebra/mnt6_298" ] diff --git a/r1cs-std/src/instantiated/edwards_bls12/curves.rs b/r1cs-std/src/instantiated/edwards_bls12/curves.rs deleted file mode 100644 index e476033..0000000 --- a/r1cs-std/src/instantiated/edwards_bls12/curves.rs +++ /dev/null @@ -1,11 +0,0 @@ -use crate::groups::curves::twisted_edwards::AffineGadget; -use algebra::edwards_bls12::*; - -use crate::edwards_bls12::FqGadget; - -pub type EdwardsBlsGadget = AffineGadget; - -#[test] -fn test() { - crate::groups::curves::twisted_edwards::test::<_, EdwardsParameters, EdwardsBlsGadget>(); -} diff --git a/r1cs-std/src/instantiated/edwards_on_bls12_377/curves.rs b/r1cs-std/src/instantiated/edwards_on_bls12_377/curves.rs new file mode 100644 index 0000000..7c9081e --- /dev/null +++ b/r1cs-std/src/instantiated/edwards_on_bls12_377/curves.rs @@ -0,0 +1,11 @@ +use crate::groups::curves::twisted_edwards::AffineGadget; +use algebra::edwards_on_bls12_377::*; + +use crate::edwards_on_bls12_377::FqGadget; + +pub type EdwardsGadget = AffineGadget; + +#[test] +fn test() { + crate::groups::curves::twisted_edwards::test::<_, EdwardsParameters, EdwardsGadget>(); +} diff --git a/r1cs-std/src/instantiated/edwards_sw6/fields.rs b/r1cs-std/src/instantiated/edwards_on_bls12_377/fields.rs similarity index 77% rename from r1cs-std/src/instantiated/edwards_sw6/fields.rs rename to r1cs-std/src/instantiated/edwards_on_bls12_377/fields.rs index b4a2d7a..81cf3ed 100644 --- a/r1cs-std/src/instantiated/edwards_sw6/fields.rs +++ b/r1cs-std/src/instantiated/edwards_on_bls12_377/fields.rs @@ -1,5 +1,5 @@ use crate::fields::fp::FpGadget; -use algebra::edwards_sw6::fq::Fq; +use algebra::edwards_on_bls12_377::fq::Fq; pub type FqGadget = FpGadget; diff --git a/r1cs-std/src/instantiated/edwards_bls12/mod.rs b/r1cs-std/src/instantiated/edwards_on_bls12_377/mod.rs similarity index 100% rename from r1cs-std/src/instantiated/edwards_bls12/mod.rs rename to r1cs-std/src/instantiated/edwards_on_bls12_377/mod.rs diff --git a/r1cs-std/src/instantiated/edwards_on_bls12_381/curves.rs b/r1cs-std/src/instantiated/edwards_on_bls12_381/curves.rs new file mode 100644 index 0000000..da21409 --- /dev/null +++ b/r1cs-std/src/instantiated/edwards_on_bls12_381/curves.rs @@ -0,0 +1,11 @@ +use crate::groups::curves::twisted_edwards::AffineGadget; +use algebra::edwards_on_bls12_381::*; + +use crate::edwards_on_bls12_381::FqGadget; + +pub type EdwardsGadget = AffineGadget; + +#[test] +fn test() { + crate::groups::curves::twisted_edwards::test::(); +} diff --git a/r1cs-std/src/instantiated/edwards_on_bls12_381/fields.rs b/r1cs-std/src/instantiated/edwards_on_bls12_381/fields.rs new file mode 100644 index 0000000..7eabc57 --- /dev/null +++ b/r1cs-std/src/instantiated/edwards_on_bls12_381/fields.rs @@ -0,0 +1,8 @@ +use crate::fields::fp::FpGadget; + +pub type FqGadget = FpGadget; + +#[test] +fn test() { + crate::fields::tests::field_test::<_, algebra::edwards_on_bls12_381::Fq, FqGadget>(); +} diff --git a/r1cs-std/src/instantiated/edwards_sw6/mod.rs b/r1cs-std/src/instantiated/edwards_on_bls12_381/mod.rs similarity index 100% rename from r1cs-std/src/instantiated/edwards_sw6/mod.rs rename to r1cs-std/src/instantiated/edwards_on_bls12_381/mod.rs diff --git a/r1cs-std/src/instantiated/edwards_on_cp6_782/curves.rs b/r1cs-std/src/instantiated/edwards_on_cp6_782/curves.rs new file mode 100644 index 0000000..9850916 --- /dev/null +++ b/r1cs-std/src/instantiated/edwards_on_cp6_782/curves.rs @@ -0,0 +1,11 @@ +use crate::groups::curves::twisted_edwards::AffineGadget; +use algebra::edwards_on_cp6_782::*; + +use crate::edwards_on_cp6_782::FqGadget; + +pub type EdwardsGadget = AffineGadget; + +#[test] +fn test() { + crate::groups::curves::twisted_edwards::test::<_, EdwardsParameters, EdwardsGadget>(); +} diff --git a/r1cs-std/src/instantiated/edwards_bls12/fields.rs b/r1cs-std/src/instantiated/edwards_on_cp6_782/fields.rs similarity index 78% rename from r1cs-std/src/instantiated/edwards_bls12/fields.rs rename to r1cs-std/src/instantiated/edwards_on_cp6_782/fields.rs index f5333b9..3031843 100644 --- a/r1cs-std/src/instantiated/edwards_bls12/fields.rs +++ b/r1cs-std/src/instantiated/edwards_on_cp6_782/fields.rs @@ -1,5 +1,5 @@ use crate::fields::fp::FpGadget; -use algebra::edwards_bls12::fq::Fq; +use algebra::edwards_on_cp6_782::fq::Fq; pub type FqGadget = FpGadget; diff --git a/r1cs-std/src/instantiated/jubjub/mod.rs b/r1cs-std/src/instantiated/edwards_on_cp6_782/mod.rs similarity index 100% rename from r1cs-std/src/instantiated/jubjub/mod.rs rename to r1cs-std/src/instantiated/edwards_on_cp6_782/mod.rs diff --git a/r1cs-std/src/instantiated/edwards_sw6/curves.rs b/r1cs-std/src/instantiated/edwards_sw6/curves.rs deleted file mode 100644 index a521f31..0000000 --- a/r1cs-std/src/instantiated/edwards_sw6/curves.rs +++ /dev/null @@ -1,11 +0,0 @@ -use crate::groups::curves::twisted_edwards::AffineGadget; -use algebra::edwards_sw6::*; - -use crate::edwards_sw6::FqGadget; - -pub type EdwardsSWGadget = AffineGadget; - -#[test] -fn test() { - crate::groups::curves::twisted_edwards::test::<_, EdwardsParameters, EdwardsSWGadget>(); -} diff --git a/r1cs-std/src/instantiated/jubjub/curves.rs b/r1cs-std/src/instantiated/jubjub/curves.rs deleted file mode 100644 index 26de2d0..0000000 --- a/r1cs-std/src/instantiated/jubjub/curves.rs +++ /dev/null @@ -1,11 +0,0 @@ -use crate::groups::curves::twisted_edwards::AffineGadget; -use algebra::jubjub::*; - -use crate::jubjub::FqGadget; - -pub type JubJubGadget = AffineGadget; - -#[test] -fn test() { - crate::groups::curves::twisted_edwards::test::(); -} diff --git a/r1cs-std/src/instantiated/jubjub/fields.rs b/r1cs-std/src/instantiated/jubjub/fields.rs deleted file mode 100644 index 2a01c45..0000000 --- a/r1cs-std/src/instantiated/jubjub/fields.rs +++ /dev/null @@ -1,8 +0,0 @@ -use crate::fields::fp::FpGadget; - -pub type FqGadget = FpGadget; - -#[test] -fn test() { - crate::fields::tests::field_test::<_, algebra::jubjub::Fq, FqGadget>(); -} diff --git a/r1cs-std/src/instantiated/mod.rs b/r1cs-std/src/instantiated/mod.rs index d1b2286..d88452d 100644 --- a/r1cs-std/src/instantiated/mod.rs +++ b/r1cs-std/src/instantiated/mod.rs @@ -1,14 +1,14 @@ #[cfg(feature = "bls12_377")] pub mod bls12_377; -#[cfg(feature = "edwards_bls12")] -pub mod edwards_bls12; +#[cfg(feature = "edwards_on_bls12_377")] +pub mod edwards_on_bls12_377; -#[cfg(feature = "edwards_sw6")] -pub mod edwards_sw6; +#[cfg(feature = "edwards_on_cp6_782")] +pub mod edwards_on_cp6_782; -#[cfg(feature = "jubjub")] -pub mod jubjub; +#[cfg(feature = "edwards_on_bls12_381")] +pub mod edwards_on_bls12_381; #[cfg(feature = "mnt4_298")] pub mod mnt4_298; diff --git a/r1cs-std/src/lib.rs b/r1cs-std/src/lib.rs index 6736471..066371e 100644 --- a/r1cs-std/src/lib.rs +++ b/r1cs-std/src/lib.rs @@ -48,14 +48,14 @@ mod instantiated; #[cfg(feature = "bls12_377")] pub use instantiated::bls12_377; -#[cfg(feature = "edwards_bls12")] -pub use instantiated::edwards_bls12; +#[cfg(feature = "edwards_on_bls12_377")] +pub use instantiated::edwards_on_bls12_377; -#[cfg(feature = "edwards_sw6")] -pub use instantiated::edwards_sw6; +#[cfg(feature = "edwards_on_cp6_782")] +pub use instantiated::edwards_on_cp6_782; -#[cfg(feature = "jubjub")] -pub use instantiated::jubjub; +#[cfg(feature = "edwards_on_bls12_381")] +pub use instantiated::edwards_on_bls12_381; #[cfg(feature = "mnt4_298")] pub use instantiated::mnt4_298; diff --git a/r1cs-std/src/test_constraint_system.rs b/r1cs-std/src/test_constraint_system.rs index 458b7bb..4a934f8 100644 --- a/r1cs-std/src/test_constraint_system.rs +++ b/r1cs-std/src/test_constraint_system.rs @@ -132,7 +132,10 @@ impl TestConstraintSystem { fn compute_path(ns: &[String], this: String) -> String { if this.chars().any(|a| a == '/') { - panic!(format!("'/' is not allowed in namespace names. Error in namespace name: {:?}", this)); + panic!(format!( + "'/' is not allowed in namespace names. Error in namespace name: {:?}", + this + )); } let mut name = String::new();