mirror of
https://github.com/arnaucube/ark-r1cs-std.git
synced 2026-01-12 00:41:32 +01:00
Add constraints for Edwards curves over MNT4 (#221)
This commit is contained in:
11
r1cs-std/src/instantiated/ed_on_mnt4_298/curves.rs
Normal file
11
r1cs-std/src/instantiated/ed_on_mnt4_298/curves.rs
Normal file
@@ -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<EdwardsParameters, Fq, FqGadget>;
|
||||
|
||||
#[test]
|
||||
fn test() {
|
||||
crate::groups::curves::twisted_edwards::test::<_, EdwardsParameters, EdwardsGadget>();
|
||||
}
|
||||
9
r1cs-std/src/instantiated/ed_on_mnt4_298/fields.rs
Normal file
9
r1cs-std/src/instantiated/ed_on_mnt4_298/fields.rs
Normal file
@@ -0,0 +1,9 @@
|
||||
use crate::fields::fp::FpGadget;
|
||||
use algebra::ed_on_mnt4_298::fq::Fq;
|
||||
|
||||
pub type FqGadget = FpGadget<Fq>;
|
||||
|
||||
#[test]
|
||||
fn test() {
|
||||
crate::fields::tests::field_test::<_, Fq, FqGadget>();
|
||||
}
|
||||
5
r1cs-std/src/instantiated/ed_on_mnt4_298/mod.rs
Normal file
5
r1cs-std/src/instantiated/ed_on_mnt4_298/mod.rs
Normal file
@@ -0,0 +1,5 @@
|
||||
mod curves;
|
||||
mod fields;
|
||||
|
||||
pub use curves::*;
|
||||
pub use fields::*;
|
||||
11
r1cs-std/src/instantiated/ed_on_mnt4_753/curves.rs
Normal file
11
r1cs-std/src/instantiated/ed_on_mnt4_753/curves.rs
Normal file
@@ -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<EdwardsParameters, Fq, FqGadget>;
|
||||
|
||||
#[test]
|
||||
fn test() {
|
||||
crate::groups::curves::twisted_edwards::test::<_, EdwardsParameters, EdwardsGadget>();
|
||||
}
|
||||
9
r1cs-std/src/instantiated/ed_on_mnt4_753/fields.rs
Normal file
9
r1cs-std/src/instantiated/ed_on_mnt4_753/fields.rs
Normal file
@@ -0,0 +1,9 @@
|
||||
use crate::fields::fp::FpGadget;
|
||||
use algebra::ed_on_mnt4_753::fq::Fq;
|
||||
|
||||
pub type FqGadget = FpGadget<Fq>;
|
||||
|
||||
#[test]
|
||||
fn test() {
|
||||
crate::fields::tests::field_test::<_, Fq, FqGadget>();
|
||||
}
|
||||
5
r1cs-std/src/instantiated/ed_on_mnt4_753/mod.rs
Normal file
5
r1cs-std/src/instantiated/ed_on_mnt4_753/mod.rs
Normal file
@@ -0,0 +1,5 @@
|
||||
mod curves;
|
||||
mod fields;
|
||||
|
||||
pub use curves::*;
|
||||
pub use fields::*;
|
||||
@@ -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;
|
||||
|
||||
|
||||
@@ -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;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user