Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion elliptic-curve/src/arithmetic.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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},
};
Expand Down Expand Up @@ -73,6 +73,10 @@ pub trait CurveArithmetic: Curve {
+ Into<Self::Uint>
+ Invert<Output = CtOption<Self::Scalar>>
+ IsHigh
+ Mul<Self::AffinePoint, Output = Self::ProjectivePoint>
+ for<'a> Mul<&'a Self::AffinePoint, Output = Self::ProjectivePoint>
+ Mul<Self::ProjectivePoint, Output = Self::ProjectivePoint>
+ for<'a> Mul<&'a Self::ProjectivePoint, Output = Self::ProjectivePoint>
+ PartialOrd
+ Reduce<Self::Uint, Bytes = FieldBytes<Self>>
+ ShrAssign<usize>
Expand Down
32 changes: 32 additions & 0 deletions elliptic-curve/src/dev.rs
Original file line number Diff line number Diff line change
Expand Up @@ -271,6 +271,38 @@ impl Mul<&Scalar> for Scalar {
}
}

impl Mul<AffinePoint> 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<ProjectivePoint> 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<Scalar> for Scalar {
fn mul_assign(&mut self, _rhs: Scalar) {
unimplemented!();
Expand Down