mirror of
https://github.com/arnaucube/ark-curves-cherry-picked.git
synced 2026-01-12 00:41:32 +01:00
Add the ed25519 curve (#121)
* add ed25519 curve * changelog * curve info * fix * cleanup the script * Update ed25519/src/curves/mod.rs * Update ed25519/src/curves/mod.rs Co-authored-by: onewayfunc <onewayfunc@gmail.com>
This commit is contained in:
11
ed25519/src/constraints/curves.rs
Normal file
11
ed25519/src/constraints/curves.rs
Normal file
@@ -0,0 +1,11 @@
|
||||
use ark_r1cs_std::groups::curves::twisted_edwards::AffineVar;
|
||||
|
||||
use crate::{constraints::FqVar, *};
|
||||
|
||||
/// A variable that is the R1CS equivalent of `crate::EdwardsAffine`.
|
||||
pub type EdwardsVar = AffineVar<EdwardsParameters, FqVar>;
|
||||
|
||||
#[test]
|
||||
fn test() {
|
||||
ark_curve_constraint_tests::curves::te_test::<EdwardsParameters, EdwardsVar>().unwrap();
|
||||
}
|
||||
11
ed25519/src/constraints/fields.rs
Normal file
11
ed25519/src/constraints/fields.rs
Normal file
@@ -0,0 +1,11 @@
|
||||
use ark_r1cs_std::fields::fp::FpVar;
|
||||
|
||||
use crate::Fq;
|
||||
|
||||
/// A variable that is the R1CS equivalent of `crate::Fq`.
|
||||
pub type FqVar = FpVar<Fq>;
|
||||
|
||||
#[test]
|
||||
fn test() {
|
||||
ark_curve_constraint_tests::fields::field_test::<_, _, FqVar>().unwrap();
|
||||
}
|
||||
8
ed25519/src/constraints/mod.rs
Normal file
8
ed25519/src/constraints/mod.rs
Normal file
@@ -0,0 +1,8 @@
|
||||
//! This module implements the R1CS equivalent of `ark_ed25519`.
|
||||
//! It requires a curve that embeds ed25519.
|
||||
|
||||
mod curves;
|
||||
mod fields;
|
||||
|
||||
pub use curves::*;
|
||||
pub use fields::*;
|
||||
Reference in New Issue
Block a user