diff --git a/r1cs-std/Cargo.toml b/r1cs-std/Cargo.toml index 119bc2c..b46a07f 100644 --- a/r1cs-std/Cargo.toml +++ b/r1cs-std/Cargo.toml @@ -37,7 +37,7 @@ algebra = { path = "../algebra", default-features = false, features = [ "bls12_3 default = ["std"] full = [ "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" + "ed_on_bw6_761", "ed_on_mnt4_298", "ed_on_mnt4_753", "mnt4_298", "mnt4_753", "mnt6_298", "mnt6_753" ] bls12_377 = [ "algebra/bls12_377" ] @@ -45,6 +45,8 @@ 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" ] +ed_on_mnt4_298 = [ "algebra/ed_on_mnt4_298" ] +ed_on_mnt4_753 = [ "algebra/ed_on_mnt4_753" ] mnt4_298 = [ "algebra/mnt4_298" ] mnt4_753 = [ "algebra/mnt4_753" ] mnt6_298 = [ "algebra/mnt6_298" ] diff --git a/r1cs-std/src/instantiated/ed_on_mnt4_298/curves.rs b/r1cs-std/src/instantiated/ed_on_mnt4_298/curves.rs new file mode 100644 index 0000000..1385447 --- /dev/null +++ b/r1cs-std/src/instantiated/ed_on_mnt4_298/curves.rs @@ -0,0 +1,11 @@ +use crate::groups::curves::twisted_edwards::AffineGadget; +use algebra::ed_on_mnt4_298::*; + +use crate::instantiated::ed_on_mnt4_298::fields::FqGadget; + +pub type EdwardsGadget = AffineGadget; + +#[test] +fn test() { + crate::groups::curves::twisted_edwards::test::<_, EdwardsParameters, EdwardsGadget>(); +} diff --git a/r1cs-std/src/instantiated/ed_on_mnt4_298/fields.rs b/r1cs-std/src/instantiated/ed_on_mnt4_298/fields.rs new file mode 100644 index 0000000..ee9052c --- /dev/null +++ b/r1cs-std/src/instantiated/ed_on_mnt4_298/fields.rs @@ -0,0 +1,9 @@ +use crate::fields::fp::FpGadget; +use algebra::ed_on_mnt4_298::fq::Fq; + +pub type FqGadget = FpGadget; + +#[test] +fn test() { + crate::fields::tests::field_test::<_, Fq, FqGadget>(); +} diff --git a/r1cs-std/src/instantiated/ed_on_mnt4_298/mod.rs b/r1cs-std/src/instantiated/ed_on_mnt4_298/mod.rs new file mode 100644 index 0000000..cd5e758 --- /dev/null +++ b/r1cs-std/src/instantiated/ed_on_mnt4_298/mod.rs @@ -0,0 +1,5 @@ +mod curves; +mod fields; + +pub use curves::*; +pub use fields::*; diff --git a/r1cs-std/src/instantiated/ed_on_mnt4_753/curves.rs b/r1cs-std/src/instantiated/ed_on_mnt4_753/curves.rs new file mode 100644 index 0000000..e34a2cc --- /dev/null +++ b/r1cs-std/src/instantiated/ed_on_mnt4_753/curves.rs @@ -0,0 +1,11 @@ +use crate::groups::curves::twisted_edwards::AffineGadget; +use algebra::ed_on_mnt4_753::*; + +use crate::instantiated::ed_on_mnt4_753::fields::FqGadget; + +pub type EdwardsGadget = AffineGadget; + +#[test] +fn test() { + crate::groups::curves::twisted_edwards::test::<_, EdwardsParameters, EdwardsGadget>(); +} diff --git a/r1cs-std/src/instantiated/ed_on_mnt4_753/fields.rs b/r1cs-std/src/instantiated/ed_on_mnt4_753/fields.rs new file mode 100644 index 0000000..dc7a991 --- /dev/null +++ b/r1cs-std/src/instantiated/ed_on_mnt4_753/fields.rs @@ -0,0 +1,9 @@ +use crate::fields::fp::FpGadget; +use algebra::ed_on_mnt4_753::fq::Fq; + +pub type FqGadget = FpGadget; + +#[test] +fn test() { + crate::fields::tests::field_test::<_, Fq, FqGadget>(); +} diff --git a/r1cs-std/src/instantiated/ed_on_mnt4_753/mod.rs b/r1cs-std/src/instantiated/ed_on_mnt4_753/mod.rs new file mode 100644 index 0000000..cd5e758 --- /dev/null +++ b/r1cs-std/src/instantiated/ed_on_mnt4_753/mod.rs @@ -0,0 +1,5 @@ +mod curves; +mod fields; + +pub use curves::*; +pub use fields::*; diff --git a/r1cs-std/src/instantiated/mod.rs b/r1cs-std/src/instantiated/mod.rs index 118f789..09a616c 100644 --- a/r1cs-std/src/instantiated/mod.rs +++ b/r1cs-std/src/instantiated/mod.rs @@ -16,6 +16,12 @@ pub mod ed_on_bw6_761; #[cfg(feature = "ed_on_bls12_381")] pub mod ed_on_bls12_381; +#[cfg(feature = "ed_on_mnt4_298")] +pub mod ed_on_mnt4_298; + +#[cfg(feature = "ed_on_mnt4_753")] +pub mod ed_on_mnt4_753; + #[cfg(feature = "mnt4_298")] pub mod mnt4_298; diff --git a/r1cs-std/src/lib.rs b/r1cs-std/src/lib.rs index 2fb1979..dafa822 100644 --- a/r1cs-std/src/lib.rs +++ b/r1cs-std/src/lib.rs @@ -51,6 +51,12 @@ pub use instantiated::bls12_377; #[cfg(feature = "ed_on_bls12_377")] pub use instantiated::ed_on_bls12_377; +#[cfg(feature = "ed_on_mnt4_298")] +pub use instantiated::ed_on_mnt4_298; + +#[cfg(feature = "ed_on_mnt4_753")] +pub use instantiated::ed_on_mnt4_753; + #[cfg(feature = "ed_on_cp6_782")] pub use instantiated::ed_on_cp6_782;