File tree Expand file tree Collapse file tree 9 files changed +21
-20
lines changed
Expand file tree Collapse file tree 9 files changed +21
-20
lines changed Original file line number Diff line number Diff line change @@ -5,7 +5,7 @@ use bignum::BigNum;
55
66pub use bignum:: {BLS12_377_Fq , BLS12_377_Fr };
77
8- global BLS12_377_SCALAR_SLICES : u32 = 64 ;
8+ pub global BLS12_377_SCALAR_SLICES : u32 = 64 ;
99pub struct BLS12_377_Params {}
1010impl CurveParamsTrait <BLS12_377_Fq > for BLS12_377_Params {
1111 fn a () -> BLS12_377_Fq {
Original file line number Diff line number Diff line change @@ -4,7 +4,7 @@ use crate::scalar_field::ScalarField;
44use bignum::BigNum ;
55use bignum::BLS12_381_Fq ;
66
7- global BLS12_381_SCALAR_SLICES : u32 = 64 ;
7+ pub global BLS12_381_SCALAR_SLICES : u32 = 64 ;
88pub struct BLS12_381_Params {}
99impl CurveParamsTrait <BLS12_381_Fq > for BLS12_381_Params {
1010 fn a () -> BLS12_381_Fq {
Original file line number Diff line number Diff line change @@ -46,7 +46,7 @@ impl CurveParamsTrait<BN254_Fq> for BN254Params {
4646 }
4747}
4848
49- global BN254_SCALAR_SLICES : u32 = 64 ;
49+ pub global BN254_SCALAR_SLICES : u32 = 64 ;
5050pub type BN254 = BigCurve <BN254_Fq , BN254Params >;
5151pub type BN254Scalar = ScalarField <BN254_SCALAR_SLICES >;
5252// pub type Secp256r1Fr = BigNum<3, Secp256r1_Fr_Params>;
Original file line number Diff line number Diff line change @@ -4,7 +4,7 @@ use crate::scalar_field::ScalarField;
44use bignum::BigNum ;
55pub use bignum:: {MNT4_753_Fq , MNT4_753_Fr };
66
7- global MNT4_753_SCALAR_SLICES : u32 = 189 ;
7+ pub global MNT4_753_SCALAR_SLICES : u32 = 189 ;
88pub struct MNT4_753_Params {}
99impl CurveParamsTrait <MNT4_753_Fq > for MNT4_753_Params {
1010 fn a () -> MNT4_753_Fq {
Original file line number Diff line number Diff line change @@ -4,7 +4,7 @@ use crate::scalar_field::ScalarField;
44use bignum::BigNum ;
55pub use bignum:: {MNT6_753_Fq , MNT6_753_Fr };
66
7- global MNT6_753_SCALAR_SLICES : u32 = 189 ;
7+ pub global MNT6_753_SCALAR_SLICES : u32 = 189 ;
88pub struct MNT6_753_Params {}
99impl CurveParamsTrait <MNT6_753_Fq > for MNT6_753_Params {
1010 fn a () -> MNT6_753_Fq {
Original file line number Diff line number Diff line change 1- pub ( crate ) mod pallas ;
2- pub ( crate ) mod vesta ;
3- pub ( crate ) mod bls12_377 ;
4- pub ( crate ) mod bls12_381 ;
5- pub ( crate ) mod secp256k1 ;
6- pub ( crate ) mod secp256r1 ;
7- pub ( crate ) mod secp384r1 ;
8- pub ( crate ) mod mnt4_753 ;
9- pub ( crate ) mod mnt6_753 ;
10- pub ( crate ) mod bn254 ;
1+ pub mod pallas ;
2+ pub mod vesta ;
3+ pub mod bls12_377 ;
4+ pub mod bls12_381 ;
5+ pub mod secp256k1 ;
6+ pub mod secp256r1 ;
7+ pub mod secp384r1 ;
8+ pub mod mnt4_753 ;
9+ pub mod mnt6_753 ;
10+ pub mod bn254 ;
Original file line number Diff line number Diff line change @@ -5,7 +5,7 @@ use bignum::BigNum;
55
66pub use bignum:: {Pallas_Fq , Pallas_Fr };
77
8- global PALLAS_SCALAR_SLICES : u32 = 64 ;
8+ pub global PALLAS_SCALAR_SLICES : u32 = 64 ;
99
1010pub struct Pallas_Params {}
1111impl CurveParamsTrait <Pallas_Fq > for Pallas_Params {
Original file line number Diff line number Diff line change @@ -5,7 +5,7 @@ use bignum::BigNum;
55
66pub use bignum:: {Secp256k1_Fq , Secp256k1_Fr };
77
8- global SECP256k1_SCALAR_SLICES : u32 = 65 ;
8+ pub global SECP256k1_SCALAR_SLICES : u32 = 65 ;
99pub struct Secp256k1_Params {}
1010
1111impl CurveParamsTrait <Secp256k1_Fq > for Secp256k1_Params {
Original file line number Diff line number Diff line change 1- pub ( crate ) mod scalar_field ;
1+ pub mod scalar_field ;
22pub (crate ) mod curve_jac ;
33mod test_data ;
44mod bigcurve_test ;
@@ -23,7 +23,7 @@ pub struct BigCurve<B, CurveParams> {
2323 pub is_infinity : bool ,
2424}
2525
26- trait CurveParamsTrait <B : BigNum > {
26+ pub trait CurveParamsTrait <B : BigNum > {
2727 fn offset_generator () -> [B ; 2 ];
2828 fn offset_generator_final () -> [B ; 2 ];
2929 fn one () -> [B ; 2 ];
@@ -92,7 +92,7 @@ impl<B: BigNum> PointTable<B> {
9292 }
9393}
9494
95- trait BigCurveTrait {
95+ pub trait BigCurveTrait {
9696 fn neg (self ) -> Self ;
9797 fn point_at_infinity () -> Self ;
9898 fn offset_generator () -> Self ;
@@ -417,6 +417,7 @@ where
417417 [false ],
418418 );
419419
420+ // x3 = lambda * lambda - x2 - x1
420421 bignum::bignum:: evaluate_quadratic_expression (
421422 [[lambda ]],
422423 [[false ]],
You can’t perform that action at this time.
0 commit comments