mirror of
https://github.com/serai-dex/serai.git
synced 2025-12-09 04:39:24 +00:00
Fully document crypto/
This commit is contained in:
@@ -47,6 +47,7 @@ fn recover_x(y: FieldElement) -> CtOption<FieldElement> {
|
||||
})
|
||||
}
|
||||
|
||||
/// Ed448 point.
|
||||
#[derive(Clone, Copy, Debug, Zeroize)]
|
||||
pub struct Point {
|
||||
x: FieldElement,
|
||||
@@ -270,7 +271,7 @@ impl MulAssign<&Scalar> for Point {
|
||||
}
|
||||
|
||||
impl Point {
|
||||
pub fn is_torsion_free(&self) -> Choice {
|
||||
fn is_torsion_free(&self) -> Choice {
|
||||
(*self * SCALAR_MODULUS).is_identity()
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user