Skip to content

Commit 5a5c671

Browse files
committed
Hide EDWARDS_BASEPOINT_ORDER
1 parent 0910712 commit 5a5c671

File tree

2 files changed

+1
-8
lines changed

2 files changed

+1
-8
lines changed

ed448-goldilocks/src/constants.rs

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,3 @@ pub const DECAF_BASEPOINT: DecafPoint = DecafPoint(curve::twedwards::extended::E
66
Z: TWISTED_EDWARDS_BASE_POINT.Z,
77
T: TWISTED_EDWARDS_BASE_POINT.T,
88
});
9-
10-
/// `BASEPOINT_ORDER` is the order of the Ed448 basepoint, i.e.,
11-
/// $$
12-
/// \ell = 2^\{446\} + 0x8335dc163bb124b65129c96fde933d8d723a70aadc873d6d54a7bb0d.
13-
/// $$
14-
pub const EDWARDS_BASEPOINT_ORDER: EdwardsScalar = EdwardsScalar::new(ORDER);

ed448-goldilocks/src/edwards/extended.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ use core::fmt::{Display, Formatter, LowerHex, Result as FmtResult, UpperHex};
33
use core::iter::Sum;
44
use core::ops::{Add, AddAssign, Mul, MulAssign, Neg, Sub, SubAssign};
55

6-
use crate::constants::EDWARDS_BASEPOINT_ORDER;
76
use crate::curve::scalar_mul::variable_base;
87
use crate::curve::twedwards::extended::ExtendedPoint as TwistedExtendedPoint;
98
use crate::field::FieldElement;
@@ -724,7 +723,7 @@ impl EdwardsPoint {
724723
/// * `false` if `self` has a nonzero torsion component and is not
725724
/// in the prime-order subgroup.
726725
pub fn is_torsion_free(&self) -> Choice {
727-
(self * EDWARDS_BASEPOINT_ORDER).ct_eq(&Self::IDENTITY)
726+
(self * EdwardsScalar::new(ORDER)).ct_eq(&Self::IDENTITY)
728727
}
729728

730729
/// Hash a message to a point on the curve

0 commit comments

Comments
 (0)