diff --git a/elliptic-curve/src/arithmetic.rs b/elliptic-curve/src/arithmetic.rs index e1cc29987..d0d17bc4c 100644 --- a/elliptic-curve/src/arithmetic.rs +++ b/elliptic-curve/src/arithmetic.rs @@ -2,7 +2,7 @@ use crate::{ Curve, FieldBytes, NonZeroScalar, PrimeCurve, ScalarPrimitive, - ops::{Invert, LinearCombination, Reduce, ShrAssign}, + ops::{Invert, LinearCombination, Mul, Reduce, ShrAssign}, point::{AffineCoordinates, NonIdentity}, scalar::{FromUintUnchecked, IsHigh}, }; @@ -73,6 +73,10 @@ pub trait CurveArithmetic: Curve { + Into + Invert> + IsHigh + + Mul + + for<'a> Mul<&'a Self::AffinePoint, Output = Self::ProjectivePoint> + + Mul + + for<'a> Mul<&'a Self::ProjectivePoint, Output = Self::ProjectivePoint> + PartialOrd + Reduce> + ShrAssign diff --git a/elliptic-curve/src/dev.rs b/elliptic-curve/src/dev.rs index d9aaabbd3..862b678be 100644 --- a/elliptic-curve/src/dev.rs +++ b/elliptic-curve/src/dev.rs @@ -271,6 +271,38 @@ impl Mul<&Scalar> for Scalar { } } +impl Mul for Scalar { + type Output = ProjectivePoint; + + fn mul(self, _other: AffinePoint) -> ProjectivePoint { + unimplemented!(); + } +} + +impl Mul<&AffinePoint> for Scalar { + type Output = ProjectivePoint; + + fn mul(self, _other: &AffinePoint) -> ProjectivePoint { + unimplemented!(); + } +} + +impl Mul for Scalar { + type Output = ProjectivePoint; + + fn mul(self, _other: ProjectivePoint) -> ProjectivePoint { + unimplemented!(); + } +} + +impl Mul<&ProjectivePoint> for Scalar { + type Output = ProjectivePoint; + + fn mul(self, _other: &ProjectivePoint) -> ProjectivePoint { + unimplemented!(); + } +} + impl MulAssign for Scalar { fn mul_assign(&mut self, _rhs: Scalar) { unimplemented!();