pub trait WeierstrassAffinePoint<const N: usize>: AffinePoint<N> {
// Required methods
fn infinity() -> Self;
fn is_infinity(&self) -> bool;
// Provided method
fn weierstrass_add_assign(&mut self, other: &Self) { ... }
}
Expand description
A trait for affine points on Weierstrass curves.
Required Methods§
Sourcefn infinity() -> Self
fn infinity() -> Self
The infinity point representation of the Weierstrass curve. Typically an enum variant.
Sourcefn is_infinity(&self) -> bool
fn is_infinity(&self) -> bool
Returns true if the point is the infinity point.
Provided Methods§
Sourcefn weierstrass_add_assign(&mut self, other: &Self)
fn weierstrass_add_assign(&mut self, other: &Self)
Performs the complete addition of two AffinePoint
’s on a Weierstrass curve.
For an addition of two points P1 and P2, the cases are:
1. P1 is infinity
2. P2 is infinity
3. P1 equals P2
4. P1 is the negation of P2
5. Default addition.
Implements the complete addition cases according to the Zcash complete addition spec.
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.