pub struct JacobiIntersectionPoint<F: FieldOps> {
pub s: F,
pub c: F,
pub d: F,
}Expand description
An affine point $(s, c, d)$ on a Jacobi intersection.
Fields§
§s: FThe coordinate s of the point
c: FThe coordinate c of the point
d: FThe coordinate d of the point
Implementations§
Source§impl<F: FieldOps> JacobiIntersectionPoint<F>
impl<F: FieldOps> JacobiIntersectionPoint<F>
Sourcepub fn is_identity(&self) -> bool
pub fn is_identity(&self) -> bool
Source§impl<F: FieldOps> JacobiIntersectionPoint<F>
impl<F: FieldOps> JacobiIntersectionPoint<F>
Sourcepub fn negate(&self, _curve: &JacobiIntersectionCurve<F>) -> Self
pub fn negate(&self, _curve: &JacobiIntersectionCurve<F>) -> Self
Negation: -(s, c, d) = (-s, c, d).
Sourcepub fn add(&self, other: &Self, curve: &JacobiIntersectionCurve<F>) -> Self
pub fn add(&self, other: &Self, curve: &JacobiIntersectionCurve<F>) -> Self
Affine addition formulas from the EFD:
s₃ = (c₂ s₁ d₂ + d₁ s₂ c₁)/(c₂² + (d₁ s₂)²)
c₃ = (c₂ c₁ - d₁ s₂ s₁ d₂)/(c₂² + (d₁ s₂)²)
d₃ = (d₁ d₂ - a s₁ c₁ s₂ c₂)/(c₂² + (d₁ s₂)²).Sourcepub fn double(&self, curve: &JacobiIntersectionCurve<F>) -> Self
pub fn double(&self, curve: &JacobiIntersectionCurve<F>) -> Self
Affine doubling formulas from the EFD:
s₃ = 2c s d / (c² + (d s)²)
c₃ = (c² - d² s²) / (c² + (d s)²)
d₃ = (d² - a s² c²) / (c² + (d s)²).Sourcepub fn scalar_mul(&self, k: &[u64], curve: &JacobiIntersectionCurve<F>) -> Self
pub fn scalar_mul(&self, k: &[u64], curve: &JacobiIntersectionCurve<F>) -> Self
Trait Implementations§
Source§impl<F: Clone + FieldOps> Clone for JacobiIntersectionPoint<F>
impl<F: Clone + FieldOps> Clone for JacobiIntersectionPoint<F>
Source§fn clone(&self) -> JacobiIntersectionPoint<F>
fn clone(&self) -> JacobiIntersectionPoint<F>
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl<F> ConditionallySelectable for JacobiIntersectionPoint<F>
impl<F> ConditionallySelectable for JacobiIntersectionPoint<F>
Source§fn conditional_select(a: &Self, b: &Self, choice: Choice) -> Self
fn conditional_select(a: &Self, b: &Self, choice: Choice) -> Self
Source§fn conditional_assign(&mut self, other: &Self, choice: Choice)
fn conditional_assign(&mut self, other: &Self, choice: Choice)
Source§fn conditional_swap(a: &mut Self, b: &mut Self, choice: Choice)
fn conditional_swap(a: &mut Self, b: &mut Self, choice: Choice)
Conditionally swap
self and other if choice == 1; otherwise,
reassign both unto themselves. Read moreSource§impl<F> ConstantTimeEq for JacobiIntersectionPoint<F>
impl<F> ConstantTimeEq for JacobiIntersectionPoint<F>
Source§impl<F> Display for JacobiIntersectionPoint<F>
impl<F> Display for JacobiIntersectionPoint<F>
Source§impl<F: FieldOps> PartialEq for JacobiIntersectionPoint<F>
impl<F: FieldOps> PartialEq for JacobiIntersectionPoint<F>
Source§impl<F: FieldOps> PointAdd for JacobiIntersectionPoint<F>
impl<F: FieldOps> PointAdd for JacobiIntersectionPoint<F>
Source§impl<F: FieldOps> PointOps for JacobiIntersectionPoint<F>
impl<F: FieldOps> PointOps for JacobiIntersectionPoint<F>
Source§type Curve = JacobiIntersectionCurve<F>
type Curve = JacobiIntersectionCurve<F>
The elliptic curve we’re working on
Source§fn is_identity(&self) -> bool
fn is_identity(&self) -> bool
Returns true if and only if
self is the identityimpl<F: Copy + FieldOps> Copy for JacobiIntersectionPoint<F>
impl<F: FieldOps> Eq for JacobiIntersectionPoint<F>
Auto Trait Implementations§
impl<F> Freeze for JacobiIntersectionPoint<F>where
F: Freeze,
impl<F> RefUnwindSafe for JacobiIntersectionPoint<F>where
F: RefUnwindSafe,
impl<F> Send for JacobiIntersectionPoint<F>where
F: Send,
impl<F> Sync for JacobiIntersectionPoint<F>where
F: Sync,
impl<F> Unpin for JacobiIntersectionPoint<F>where
F: Unpin,
impl<F> UnsafeUnpin for JacobiIntersectionPoint<F>where
F: UnsafeUnpin,
impl<F> UnwindSafe for JacobiIntersectionPoint<F>where
F: UnwindSafe,
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more