Skip to content

Commit

Permalink
fix: update new_impl_curve calls
Browse files Browse the repository at this point in the history
  • Loading branch information
davidnevadoc committed Feb 21, 2024
1 parent 6d32c7c commit 56c07ba
Show file tree
Hide file tree
Showing 6 changed files with 16 additions and 10 deletions.
5 changes: 3 additions & 2 deletions src/bn256/curve.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ use crate::arithmetic::EndoParameters;
use crate::bn256::Fq;
use crate::bn256::Fq2;
use crate::bn256::Fr;
use crate::derive::curve::{IS_IDENTITY_MASK, IS_IDENTITY_SHIFT, NEG_Y_MASK, NEG_Y_SHIFT};
use crate::endo;
use crate::ff::WithSmallOrderMulGroup;
use crate::ff::{Field, PrimeField};
Expand Down Expand Up @@ -32,7 +33,7 @@ new_curve_impl!(
(pub),
G1,
G1Affine,
false,
2,
Fq,
Fr,
(G1_GENERATOR_X,G1_GENERATOR_Y),
Expand All @@ -46,7 +47,7 @@ new_curve_impl!(
(pub),
G2,
G2Affine,
false,
2,
Fq2,
Fr,
(G2_GENERATOR_X, G2_GENERATOR_Y),
Expand Down
3 changes: 2 additions & 1 deletion src/grumpkin/curve.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ use crate::arithmetic::mul_512;
use crate::arithmetic::sbb;
use crate::arithmetic::CurveEndo;
use crate::arithmetic::EndoParameters;
use crate::derive::curve::{IS_IDENTITY_MASK, IS_IDENTITY_SHIFT, NEG_Y_MASK, NEG_Y_SHIFT};
use crate::ff::WithSmallOrderMulGroup;
use crate::ff::{Field, PrimeField};
use crate::group::Curve;
Expand Down Expand Up @@ -29,7 +30,7 @@ new_curve_impl!(
(pub),
G1,
G1Affine,
false,
2,
Fq,
Fr,
(G1_GENERATOR_X, G1_GENERATOR_Y),
Expand Down
7 changes: 4 additions & 3 deletions src/pluto_eris/curve.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
use super::fields::{fp::Fp, fp2::Fp2, fq::Fq};
use crate::derive::curve::{IS_IDENTITY_MASK, IS_IDENTITY_SHIFT, NEG_Y_MASK, NEG_Y_SHIFT};
use crate::ff::WithSmallOrderMulGroup;
use crate::ff::{Field, PrimeField};
use crate::group::{prime::PrimeCurveAffine, Curve, Group as _, GroupEncoding};
Expand Down Expand Up @@ -124,7 +125,7 @@ new_curve_impl!(
(pub),
G1,
G1Affine,
false,
2,
Fp,
Fq,
(G1_GENERATOR_X,G1_GENERATOR_Y),
Expand Down Expand Up @@ -160,7 +161,7 @@ new_curve_impl!(
(pub),
Eris,
ErisAffine,
false,
2,
Fq,
Fp,
(ERIS_GENERATOR_X,ERIS_GENERATOR_Y),
Expand Down Expand Up @@ -232,7 +233,7 @@ new_curve_impl!(
(pub),
G2,
G2Affine,
false,
2,
Fp2,
Fq,
(G2_GENERATOR_X,G2_GENERATOR_Y),
Expand Down
5 changes: 3 additions & 2 deletions src/secp256k1/curve.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
use crate::derive::curve::{IS_IDENTITY_MASK, IS_IDENTITY_SHIFT, NEG_Y_MASK, NEG_Y_SHIFT};
use crate::ff::WithSmallOrderMulGroup;
use crate::ff::{Field, PrimeField};
use crate::group::{prime::PrimeCurveAffine, Curve, Group as _, GroupEncoding};
Expand Down Expand Up @@ -58,7 +59,7 @@ new_curve_impl!(
(pub),
Secp256k1,
Secp256k1Affine,
true,
0,
Fp,
Fq,
(SECP_GENERATOR_X,SECP_GENERATOR_Y),
Expand Down Expand Up @@ -127,7 +128,7 @@ new_curve_impl!(
(pub(crate)),
IsoSecp256k1,
IsoSecp256k1Affine,
true,
0,
Fp,
Fq,
(ISO_SECP_GENERATOR_X, ISO_SECP_GENERATOR_Y),
Expand Down
3 changes: 2 additions & 1 deletion src/secp256r1/curve.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
use crate::derive::curve::{IS_IDENTITY_MASK, IS_IDENTITY_SHIFT, NEG_Y_MASK, NEG_Y_SHIFT};
use crate::ff::WithSmallOrderMulGroup;
use crate::ff::{Field, PrimeField};
use crate::group::{prime::PrimeCurveAffine, Curve, Group as _, GroupEncoding};
Expand Down Expand Up @@ -69,7 +70,7 @@ new_curve_impl!(
(pub),
Secp256r1,
Secp256r1Affine,
true,
0,
Fp,
Fq,
(SECP_GENERATOR_X,SECP_GENERATOR_Y),
Expand Down
3 changes: 2 additions & 1 deletion src/secq256k1/curve.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
use crate::derive::curve::{IS_IDENTITY_MASK, IS_IDENTITY_SHIFT, NEG_Y_MASK, NEG_Y_SHIFT};
use crate::ff::WithSmallOrderMulGroup;
use crate::ff::{Field, PrimeField};
use crate::group::Curve;
Expand Down Expand Up @@ -41,7 +42,7 @@ new_curve_impl!(
(pub),
Secq256k1,
Secq256k1Affine,
true,
0,
Fq,
Fp,
(SECQ_GENERATOR_X, SECQ_GENERATOR_Y),
Expand Down

0 comments on commit 56c07ba

Please sign in to comment.