pub struct Bucket<P>where
P: SWCurveConfig,{
pub x: <P as CurveConfig>::BaseField,
pub y: <P as CurveConfig>::BaseField,
pub zz: <P as CurveConfig>::BaseField,
pub zzz: <P as CurveConfig>::BaseField,
}Expand description
Extended Jacobian coordinates for a point on an elliptic curve in short Weierstrass
form, over the base field P::BaseField.
This struct implements arithmetic via the extended Jacobian arithmetic outlined here:
https://www.hyperelliptic.org/EFD/g1p/auto-shortw-xyzz.html
Fields§
§x: <P as CurveConfig>::BaseFieldX / ZZ projection of the affine X
y: <P as CurveConfig>::BaseFieldY / ZZZ projection of the affine Y
zz: <P as CurveConfig>::BaseFieldBucket multiplicative inverse. Will be 0 only at infinity.
zzz: <P as CurveConfig>::BaseFieldBucket multiplicative inverse. Will be 0 only at infinity.
Implementations§
Source§impl<P> Bucket<P>where
P: SWCurveConfig,
impl<P> Bucket<P>where
P: SWCurveConfig,
pub const ZERO: Bucket<P>
Sourcepub const fn new_unchecked(
x: <P as CurveConfig>::BaseField,
y: <P as CurveConfig>::BaseField,
zz: <P as CurveConfig>::BaseField,
zzz: <P as CurveConfig>::BaseField,
) -> Bucket<P>
pub const fn new_unchecked( x: <P as CurveConfig>::BaseField, y: <P as CurveConfig>::BaseField, zz: <P as CurveConfig>::BaseField, zzz: <P as CurveConfig>::BaseField, ) -> Bucket<P>
Constructs a new group element without checking whether the coordinates specify a point in the subgroup.
pub fn double_in_place(&mut self)
Trait Implementations§
Source§impl<'a, P> AddAssign<&'a Bucket<P>> for Bucket<P>where
P: SWCurveConfig,
impl<'a, P> AddAssign<&'a Bucket<P>> for Bucket<P>where
P: SWCurveConfig,
Source§fn add_assign(&mut self, other: &'a Bucket<P>)
fn add_assign(&mut self, other: &'a Bucket<P>)
Performs the
+= operation. Read moreSource§impl<'a, P> AddAssign<&'a Bucket<P>> for Projective<P>where
P: SWCurveConfig,
impl<'a, P> AddAssign<&'a Bucket<P>> for Projective<P>where
P: SWCurveConfig,
Source§fn add_assign(&mut self, other: &'a Bucket<P>)
fn add_assign(&mut self, other: &'a Bucket<P>)
Performs the
+= operation. Read moreimpl<P> Copy for Bucket<P>
Source§impl<P> Debug for Bucket<P>where
P: SWCurveConfig,
impl<P> Debug for Bucket<P>where
P: SWCurveConfig,
Source§impl<P> Default for Bucket<P>where
P: SWCurveConfig,
impl<P> Default for Bucket<P>where
P: SWCurveConfig,
impl<P> Eq for Bucket<P>where
P: SWCurveConfig,
Source§impl<P> From<Bucket<P>> for Projective<P>where
P: SWCurveConfig,
impl<P> From<Bucket<P>> for Projective<P>where
P: SWCurveConfig,
Source§fn from(p: Bucket<P>) -> Projective<P>
fn from(p: Bucket<P>) -> Projective<P>
Converts to this type from the input type.
Source§impl<P> Hash for Bucket<P>where
P: SWCurveConfig,
impl<P> Hash for Bucket<P>where
P: SWCurveConfig,
Source§impl<P> Neg for Bucket<P>where
P: SWCurveConfig,
impl<P> Neg for Bucket<P>where
P: SWCurveConfig,
Source§impl<P> PartialEq for Bucket<P>where
P: SWCurveConfig,
impl<P> PartialEq for Bucket<P>where
P: SWCurveConfig,
Source§impl<'a, P> SubAssign<&'a Bucket<P>> for Bucket<P>where
P: SWCurveConfig,
impl<'a, P> SubAssign<&'a Bucket<P>> for Bucket<P>where
P: SWCurveConfig,
Source§fn sub_assign(&mut self, other: &'a Bucket<P>)
fn sub_assign(&mut self, other: &'a Bucket<P>)
Performs the
-= operation. Read moreAuto Trait Implementations§
impl<P> Freeze for Bucket<P>
impl<P> RefUnwindSafe for Bucket<P>
impl<P> Send for Bucket<P>
impl<P> Sync for Bucket<P>
impl<P> Unpin for Bucket<P>
impl<P> UnsafeUnpin for Bucket<P>
impl<P> UnwindSafe for Bucket<P>
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more