More NIST curves (#142)

Co-authored-by: Pratyush Mishra <pratyushmishra@berkeley.edu>
This commit is contained in:
Ruben De Smet
2023-01-10 13:59:32 +01:00
committed by GitHub
parent bf8c488263
commit 69a9c3513b
27 changed files with 343 additions and 1 deletions

View 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();
}

View 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();
}

View File

@@ -0,0 +1,7 @@
//! This module implements the R1CS equivalent of `ark_secp384r1`.
mod curves;
mod fields;
pub use curves::*;
pub use fields::*;