pub struct G2 { /* private fields */ }
Trait Implementations§
Source§impl CurveProjective for G2
impl CurveProjective for G2
type Engine = Bls12
type Scalar = Fr
type Base = Fq2
type Affine = G2Affine
Source§fn is_normalized(&self) -> bool
fn is_normalized(&self) -> bool
Checks if the point is already “normalized” so that
cheap affine conversion is possible.
Source§fn batch_normalization(v: &mut [Self])
fn batch_normalization(v: &mut [Self])
Normalizes a slice of projective elements so that
conversion to affine is cheap.
Source§fn add_assign(&mut self, other: &Self)
fn add_assign(&mut self, other: &Self)
Adds another element to this element.
Source§fn add_assign_mixed(&mut self, other: &Self::Affine)
fn add_assign_mixed(&mut self, other: &Self::Affine)
Adds an affine element to this element.
Source§fn mul_assign<S: Into<<Self::Scalar as PrimeField>::Repr>>(&mut self, other: S)
fn mul_assign<S: Into<<Self::Scalar as PrimeField>::Repr>>(&mut self, other: S)
Performs scalar multiplication of this element.
Source§fn into_affine(&self) -> G2Affine
fn into_affine(&self) -> G2Affine
Converts this element into its affine representation.
Source§fn recommended_wnaf_for_scalar(
scalar: <Self::Scalar as PrimeField>::Repr,
) -> usize
fn recommended_wnaf_for_scalar( scalar: <Self::Scalar as PrimeField>::Repr, ) -> usize
Recommends a wNAF window table size given a scalar. Always returns a number
between 2 and 22, inclusive.
Source§fn recommended_wnaf_for_num_scalars(num_scalars: usize) -> usize
fn recommended_wnaf_for_num_scalars(num_scalars: usize) -> usize
Recommends a wNAF window size given the number of scalars you intend to multiply
a base by. Always returns a number between 2 and 22, inclusive.
Source§fn as_tuple(&self) -> (&Fq2, &Fq2, &Fq2)
fn as_tuple(&self) -> (&Fq2, &Fq2, &Fq2)
Borrow references to the X, Y, and Z coordinates of this point.
Source§unsafe fn as_tuple_mut(&mut self) -> (&mut Fq2, &mut Fq2, &mut Fq2)
unsafe fn as_tuple_mut(&mut self) -> (&mut Fq2, &mut Fq2, &mut Fq2)
Borrow mutable references to the X, Y, and Z coordinates of this point.
Unsafe, because incorrectly modifying the coordinates violates the guarantee
that the point must be on the curve and in the correct subgroup.
Source§fn sub_assign(&mut self, other: &Self)
fn sub_assign(&mut self, other: &Self)
Subtracts another element from this element.
Source§fn sub_assign_mixed(&mut self, other: &Self::Affine)
fn sub_assign_mixed(&mut self, other: &Self::Affine)
Subtracts an affine element from this element
impl Copy for G2
impl Eq for G2
Auto Trait Implementations§
impl Freeze for G2
impl RefUnwindSafe for G2
impl Send for G2
impl Sync for G2
impl Unpin for G2
impl UnwindSafe for G2
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§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)