mirror of
https://github.com/arnaucube/ark-r1cs-std.git
synced 2026-01-12 00:41:32 +01:00
Implement ed_on_bn254 curve (baby-jubjub) (#230)
This commit is contained in:
committed by
GitHub
parent
a83914af50
commit
36305e7247
11
r1cs-std/src/instantiated/ed_on_bn254/curves.rs
Normal file
11
r1cs-std/src/instantiated/ed_on_bn254/curves.rs
Normal file
@@ -0,0 +1,11 @@
|
||||
use crate::groups::curves::twisted_edwards::AffineGadget;
|
||||
use algebra::ed_on_bn254::*;
|
||||
|
||||
use crate::ed_on_bn254::FqGadget;
|
||||
|
||||
pub type EdwardsGadget = AffineGadget<EdwardsParameters, Fq, FqGadget>;
|
||||
|
||||
#[test]
|
||||
fn test() {
|
||||
crate::groups::curves::twisted_edwards::test::<Fq, _, EdwardsGadget>();
|
||||
}
|
||||
8
r1cs-std/src/instantiated/ed_on_bn254/fields.rs
Normal file
8
r1cs-std/src/instantiated/ed_on_bn254/fields.rs
Normal file
@@ -0,0 +1,8 @@
|
||||
use crate::fields::fp::FpGadget;
|
||||
|
||||
pub type FqGadget = FpGadget<algebra::ed_on_bn254::Fq>;
|
||||
|
||||
#[test]
|
||||
fn test() {
|
||||
crate::fields::tests::field_test::<_, algebra::ed_on_bn254::Fq, FqGadget>();
|
||||
}
|
||||
5
r1cs-std/src/instantiated/ed_on_bn254/mod.rs
Normal file
5
r1cs-std/src/instantiated/ed_on_bn254/mod.rs
Normal file
@@ -0,0 +1,5 @@
|
||||
mod curves;
|
||||
mod fields;
|
||||
|
||||
pub use curves::*;
|
||||
pub use fields::*;
|
||||
@@ -13,6 +13,9 @@ pub(crate) mod ed_on_cp6_782;
|
||||
#[cfg(feature = "ed_on_bw6_761")]
|
||||
pub mod ed_on_bw6_761;
|
||||
|
||||
#[cfg(feature = "ed_on_bn254")]
|
||||
pub mod ed_on_bn254;
|
||||
|
||||
#[cfg(feature = "ed_on_bls12_381")]
|
||||
pub mod ed_on_bls12_381;
|
||||
|
||||
|
||||
@@ -60,6 +60,9 @@ pub use instantiated::ed_on_mnt4_753;
|
||||
#[cfg(feature = "ed_on_cp6_782")]
|
||||
pub use instantiated::ed_on_cp6_782;
|
||||
|
||||
#[cfg(feature = "ed_on_bn254")]
|
||||
pub use instantiated::ed_on_bn254;
|
||||
|
||||
#[cfg(feature = "ed_on_bls12_381")]
|
||||
pub use instantiated::ed_on_bls12_381;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user