Skip to content

Commit de513bb

Browse files
authored
fix: make necessary items public (#54)
1 parent 349c60b commit de513bb

File tree

9 files changed

+21
-20
lines changed

9 files changed

+21
-20
lines changed

src/curves/bls12_377.nr

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ use bignum::BigNum;
55

66
pub 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;
99
pub struct BLS12_377_Params {}
1010
impl CurveParamsTrait<BLS12_377_Fq> for BLS12_377_Params {
1111
fn a() -> BLS12_377_Fq {

src/curves/bls12_381.nr

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ use crate::scalar_field::ScalarField;
44
use bignum::BigNum;
55
use bignum::BLS12_381_Fq;
66

7-
global BLS12_381_SCALAR_SLICES: u32 = 64;
7+
pub global BLS12_381_SCALAR_SLICES: u32 = 64;
88
pub struct BLS12_381_Params {}
99
impl CurveParamsTrait<BLS12_381_Fq> for BLS12_381_Params {
1010
fn a() -> BLS12_381_Fq {

src/curves/bn254.nr

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff 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;
5050
pub type BN254 = BigCurve<BN254_Fq, BN254Params>;
5151
pub type BN254Scalar = ScalarField<BN254_SCALAR_SLICES>;
5252
// pub type Secp256r1Fr = BigNum<3, Secp256r1_Fr_Params>;

src/curves/mnt4_753.nr

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ use crate::scalar_field::ScalarField;
44
use bignum::BigNum;
55
pub 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;
88
pub struct MNT4_753_Params {}
99
impl CurveParamsTrait<MNT4_753_Fq> for MNT4_753_Params {
1010
fn a() -> MNT4_753_Fq {

src/curves/mnt6_753.nr

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ use crate::scalar_field::ScalarField;
44
use bignum::BigNum;
55
pub 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;
88
pub struct MNT6_753_Params {}
99
impl CurveParamsTrait<MNT6_753_Fq> for MNT6_753_Params {
1010
fn a() -> MNT6_753_Fq {

src/curves/mod.nr

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
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;

src/curves/pallas.nr

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ use bignum::BigNum;
55

66
pub use bignum::{Pallas_Fq, Pallas_Fr};
77

8-
global PALLAS_SCALAR_SLICES: u32 = 64;
8+
pub global PALLAS_SCALAR_SLICES: u32 = 64;
99

1010
pub struct Pallas_Params {}
1111
impl CurveParamsTrait<Pallas_Fq> for Pallas_Params {

src/curves/secp256k1.nr

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ use bignum::BigNum;
55

66
pub use bignum::{Secp256k1_Fq, Secp256k1_Fr};
77

8-
global SECP256k1_SCALAR_SLICES: u32 = 65;
8+
pub global SECP256k1_SCALAR_SLICES: u32 = 65;
99
pub struct Secp256k1_Params {}
1010

1111
impl CurveParamsTrait<Secp256k1_Fq> for Secp256k1_Params {

src/lib.nr

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
pub(crate) mod scalar_field;
1+
pub mod scalar_field;
22
pub(crate) mod curve_jac;
33
mod test_data;
44
mod 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]],

0 commit comments

Comments
 (0)