pub struct Bucket<P: SWCurveConfig> {
pub x: P::BaseField,
pub y: P::BaseField,
pub zz: P::BaseField,
pub zzz: P::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::BaseFieldX / ZZ projection of the affine X
y: P::BaseFieldY / ZZZ projection of the affine Y
zz: P::BaseFieldBucket multiplicative inverse. Will be 0 only at infinity.
zzz: P::BaseFieldBucket multiplicative inverse. Will be 0 only at infinity.
Implementations§
Source§impl<P: SWCurveConfig> Bucket<P>
impl<P: SWCurveConfig> Bucket<P>
pub const ZERO: Self
Sourcepub const fn new_unchecked(
x: P::BaseField,
y: P::BaseField,
zz: P::BaseField,
zzz: P::BaseField,
) -> Self
pub const fn new_unchecked( x: P::BaseField, y: P::BaseField, zz: P::BaseField, zzz: P::BaseField, ) -> Self
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: SWCurveConfig> AddAssign<&'a Bucket<P>> for Bucket<P>
impl<'a, P: SWCurveConfig> AddAssign<&'a Bucket<P>> for Bucket<P>
Source§fn add_assign(&mut self, other: &'a Self)
fn add_assign(&mut self, other: &'a Self)
Performs the
+= operation. Read moreSource§impl<'a, P: SWCurveConfig> AddAssign<&'a Bucket<P>> for Projective<P>
impl<'a, P: SWCurveConfig> AddAssign<&'a Bucket<P>> for Projective<P>
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<P: SWCurveConfig, T: Borrow<Affine<P>>> AddAssign<T> for Bucket<P>
impl<P: SWCurveConfig, T: Borrow<Affine<P>>> AddAssign<T> for Bucket<P>
Source§fn add_assign(&mut self, other: T)
fn add_assign(&mut self, other: T)
Source§impl<P: SWCurveConfig> Clone for Bucket<P>
impl<P: SWCurveConfig> Clone for Bucket<P>
Source§impl<P: SWCurveConfig> Debug for Bucket<P>
impl<P: SWCurveConfig> Debug for Bucket<P>
Source§impl<P: SWCurveConfig> Default for Bucket<P>
impl<P: SWCurveConfig> Default for Bucket<P>
Source§impl<P: SWCurveConfig> From<Bucket<P>> for Projective<P>
impl<P: SWCurveConfig> From<Bucket<P>> for Projective<P>
Source§impl<P: SWCurveConfig> Hash for Bucket<P>
impl<P: SWCurveConfig> Hash for Bucket<P>
Source§impl<P: SWCurveConfig> Neg for Bucket<P>
impl<P: SWCurveConfig> Neg for Bucket<P>
Source§impl<P: SWCurveConfig> PartialEq for Bucket<P>
impl<P: SWCurveConfig> PartialEq for Bucket<P>
Source§impl<'a, P: SWCurveConfig> SubAssign<&'a Bucket<P>> for Bucket<P>
impl<'a, P: SWCurveConfig> SubAssign<&'a Bucket<P>> for Bucket<P>
Source§fn sub_assign(&mut self, other: &'a Self)
fn sub_assign(&mut self, other: &'a Self)
Performs the
-= operation. Read moreSource§impl<P: SWCurveConfig, T: Borrow<Affine<P>>> SubAssign<T> for Bucket<P>
impl<P: SWCurveConfig, T: Borrow<Affine<P>>> SubAssign<T> for Bucket<P>
Source§fn sub_assign(&mut self, other: T)
fn sub_assign(&mut self, other: T)
Performs the
-= operation. Read moreSource§impl<P: SWCurveConfig> Zeroize for Bucket<P>
impl<P: SWCurveConfig> Zeroize for Bucket<P>
impl<P: SWCurveConfig> Copy for Bucket<P>
impl<P: SWCurveConfig> Eq for Bucket<P>
Auto 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
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