mirror of
https://github.com/arnaucube/ark-curves-cherry-picked.git
synced 2026-01-12 00:41:32 +01:00
More NIST curves (#142)
Co-authored-by: Pratyush Mishra <pratyushmishra@berkeley.edu>
This commit is contained in:
10
secp384r1/src/constraints/curves.rs
Normal file
10
secp384r1/src/constraints/curves.rs
Normal file
@@ -0,0 +1,10 @@
|
||||
use crate::{constraints::FqVar, *};
|
||||
use ark_r1cs_std::groups::curves::short_weierstrass::ProjectiveVar;
|
||||
|
||||
/// A group element in the secp384r1 curve.
|
||||
pub type GVar = ProjectiveVar<Config, FqVar>;
|
||||
|
||||
#[test]
|
||||
fn test() {
|
||||
ark_curve_constraint_tests::curves::sw_test::<Config, GVar>().unwrap();
|
||||
}
|
||||
11
secp384r1/src/constraints/fields.rs
Normal file
11
secp384r1/src/constraints/fields.rs
Normal file
@@ -0,0 +1,11 @@
|
||||
use ark_r1cs_std::fields::fp::FpVar;
|
||||
|
||||
use crate::fq::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();
|
||||
}
|
||||
7
secp384r1/src/constraints/mod.rs
Normal file
7
secp384r1/src/constraints/mod.rs
Normal file
@@ -0,0 +1,7 @@
|
||||
//! This module implements the R1CS equivalent of `ark_secp384r1`.
|
||||
|
||||
mod curves;
|
||||
mod fields;
|
||||
|
||||
pub use curves::*;
|
||||
pub use fields::*;
|
||||
Reference in New Issue
Block a user