pub trait PointArithmetic<C: PrimeCurveParams> {
// Required methods
fn add(
lhs: &ProjectivePoint<C>,
rhs: &ProjectivePoint<C>,
) -> ProjectivePoint<C>;
fn add_mixed(
lhs: &ProjectivePoint<C>,
rhs: &AffinePoint<C>,
) -> ProjectivePoint<C>;
fn double(point: &ProjectivePoint<C>) -> ProjectivePoint<C>;
}Expand description
Elliptic point arithmetic implementation
Provides implementation of point arithmetic (point addition, point doubling) which might be optimized for the curve.
Required Methods§
Sourcefn add(lhs: &ProjectivePoint<C>, rhs: &ProjectivePoint<C>) -> ProjectivePoint<C>
fn add(lhs: &ProjectivePoint<C>, rhs: &ProjectivePoint<C>) -> ProjectivePoint<C>
Returns lhs + rhs
Sourcefn add_mixed(
lhs: &ProjectivePoint<C>,
rhs: &AffinePoint<C>,
) -> ProjectivePoint<C>
fn add_mixed( lhs: &ProjectivePoint<C>, rhs: &AffinePoint<C>, ) -> ProjectivePoint<C>
Returns lhs + rhs
Sourcefn double(point: &ProjectivePoint<C>) -> ProjectivePoint<C>
fn double(point: &ProjectivePoint<C>) -> ProjectivePoint<C>
Returns point + point
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.