Fully document crypto/

This commit is contained in:
Luke Parker
2023-03-20 20:10:00 -04:00
parent e1bb2c191b
commit 8d4d630e0f
45 changed files with 335 additions and 208 deletions

View File

@@ -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()
}
}