diff --git a/src/curve.rs b/src/curve.rs index 870d82d..ce09627 100644 --- a/src/curve.rs +++ b/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 #[derive(Clone)] diff --git a/src/decaf.rs b/src/decaf.rs index 07c24c6..1b9cccb 100644 --- a/src/decaf.rs +++ b/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 #[derive(Clone)] pub struct DecafBasepointTable(pub EdwardsBasepointTable);