adding SW parameters for Bandersnatch curve (#67)

Co-authored-by: Pratyush Mishra <pratyushmishra@berkeley.edu>
This commit is contained in:
zhenfei
2021-10-20 13:12:15 -04:00
committed by GitHub
parent 5fe1862c9a
commit 461e4190b1
9 changed files with 199 additions and 54 deletions

View File

@@ -1,12 +1,17 @@
use crate::*;
use ark_r1cs_std::groups::curves::twisted_edwards::AffineVar;
use ark_r1cs_std::groups::curves::{short_weierstrass::ProjectiveVar, twisted_edwards::AffineVar};
use crate::constraints::FqVar;
/// A variable that is the R1CS equivalent of `crate::EdwardsAffine`.
pub type EdwardsVar = AffineVar<EdwardsParameters, FqVar>;
pub type EdwardsVar = AffineVar<JubjubParameters, FqVar>;
/// A variable that is the R1CS equivalent of `crate::SWProjective`
pub type SWVar = ProjectiveVar<JubjubParameters, FqVar>;
#[test]
fn test() {
ark_curve_constraint_tests::curves::te_test::<_, EdwardsVar>().unwrap();
ark_curve_constraint_tests::curves::sw_test::<_, SWVar>().unwrap();
ark_curve_constraint_tests::curves::group_test::<_, Fq, EdwardsVar>().unwrap();
}