From 0b70ab36382b52a24aeb1d4161d06e894af9b278 Mon Sep 17 00:00:00 2001 From: Isis Lovecruft Date: Thu, 18 May 2017 02:57:10 +0000 Subject: [PATCH] Move `DecafPoint * Scalar` definition to decaf module. --- src/curve.rs | 10 ---------- src/decaf.rs | 10 ++++++++++ 2 files changed, 10 insertions(+), 10 deletions(-) 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);