Skip to content

Commit f5fba43

Browse files
committed
ed448-goldilocks: export LOW_A/LOW_B/LOW_C points
1 parent 425e867 commit f5fba43

File tree

2 files changed

+7
-5
lines changed

2 files changed

+7
-5
lines changed

ed448-goldilocks/src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ pub use edwards::{
6161
WideEdwardsScalarBytes,
6262
};
6363
pub use field::{MODULUS_LIMBS, ORDER, Scalar, WIDE_ORDER};
64-
pub use montgomery::{MontgomeryPoint, ProjectiveMontgomeryPoint};
64+
pub use montgomery::{LOW_A, LOW_B, LOW_C, MontgomeryPoint, ProjectiveMontgomeryPoint};
6565
pub use ristretto::{CompressedRistretto, RistrettoPoint};
6666
#[cfg(feature = "signing")]
6767
pub use sign::*;

ed448-goldilocks/src/montgomery.rs

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,20 +18,22 @@ use core::fmt;
1818
use core::ops::Mul;
1919
use subtle::{Choice, ConditionallySelectable, ConstantTimeEq};
2020

21-
// Low order points on Curve448 and it's twist
22-
const LOW_A: MontgomeryPoint = MontgomeryPoint([
21+
/// First low order point on Curve448 and it's twist
22+
pub const LOW_A: MontgomeryPoint = MontgomeryPoint([
2323
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2424
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2525
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2626
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2727
]);
28-
const LOW_B: MontgomeryPoint = MontgomeryPoint([
28+
/// Second low order point on Curve448 and it's twist
29+
pub const LOW_B: MontgomeryPoint = MontgomeryPoint([
2930
0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3031
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3132
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3233
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3334
]);
34-
const LOW_C: MontgomeryPoint = MontgomeryPoint([
35+
/// Third low order point on Curve448 and it's twist
36+
pub const LOW_C: MontgomeryPoint = MontgomeryPoint([
3537
0xfe, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
3638
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xfe, 0xff, 0xff, 0xff,
3739
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,

0 commit comments

Comments
 (0)