mirror of
https://github.com/saymrwulf/curve25519-dalek-source.git
synced 2026-09-10 21:21:13 +00:00
Move DecafPoint * Scalar definition to decaf module.
This commit is contained in:
parent
e3adf3eea3
commit
0b70ab3638
2 changed files with 10 additions and 10 deletions
10
src/curve.rs
10
src/curve.rs
|
|
@ -897,16 +897,6 @@ impl<'a, 'b> Mul<&'b ExtendedPoint> for &'a Scalar {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#[cfg(feature = "yolocrypto")]
|
|
||||||
impl<'a, 'b> Mul<&'b DecafPoint> for &'a Scalar {
|
|
||||||
type Output = DecafPoint;
|
|
||||||
|
|
||||||
/// Scalar multiplication: compute `self * scalar`.
|
|
||||||
fn mul(self, point: &'b DecafPoint) -> DecafPoint {
|
|
||||||
DecafPoint(self * &point.0)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/// Precomputation
|
/// Precomputation
|
||||||
#[derive(Clone)]
|
#[derive(Clone)]
|
||||||
|
|
|
||||||
10
src/decaf.rs
10
src/decaf.rs
|
|
@ -458,6 +458,16 @@ impl<'a, 'b> Mul<&'b Scalar> for &'a DecafPoint {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
impl<'a, 'b> Mul<&'b DecafPoint> for &'a Scalar {
|
||||||
|
type Output = DecafPoint;
|
||||||
|
|
||||||
|
/// Scalar multiplication: compute `self * scalar`.
|
||||||
|
fn mul(self, point: &'b DecafPoint) -> DecafPoint {
|
||||||
|
DecafPoint(self * &point.0)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/// Precomputation
|
/// Precomputation
|
||||||
#[derive(Clone)]
|
#[derive(Clone)]
|
||||||
pub struct DecafBasepointTable(pub EdwardsBasepointTable);
|
pub struct DecafBasepointTable(pub EdwardsBasepointTable);
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue