pub trait PointOps: Clone + ConditionallySelectable {
type BaseField: FieldOps;
type Curve;
// Required methods
fn identity(curve: &Self::Curve) -> Self;
fn is_identity(&self) -> bool;
fn negate(&self, curve: &Self::Curve) -> Self;
fn scalar_mul(&self, k: &[u64], curve: &Self::Curve) -> Self;
}Expand description
Generic group interface for curve points.
We intentionally do not require the standard operator traits here
(Add, Sub, Mul, Neg) because point addition and negation usually
need access to the curve parameters. The clean abstraction boundary is a
method-based API taking &Self::Curve explicitly.
Required Associated Types§
Required Methods§
Sourcefn is_identity(&self) -> bool
fn is_identity(&self) -> bool
Returns true if and only if self is the identity
Sourcefn scalar_mul(&self, k: &[u64], curve: &Self::Curve) -> Self
fn scalar_mul(&self, k: &[u64], curve: &Self::Curve) -> Self
Scalar multiplication [k]P (variable-time double-and-add).
Provided as a default so every PointOps implementor gets it
automatically.
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.