Struct threshold_crypto::G2
source · 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. Read more
source§fn batch_normalization(v: &mut [G2])
fn batch_normalization(v: &mut [G2])
Normalizes a slice of projective elements so that
conversion to affine is cheap. Read more
source§fn add_assign(&mut self, other: &G2)
fn add_assign(&mut self, other: &G2)
Adds another element to this element.
source§fn add_assign_mixed(&mut self, other: &<G2 as CurveProjective>::Affine)
fn add_assign_mixed(&mut self, other: &<G2 as CurveProjective>::Affine)
Adds an affine element to this element.
source§fn mul_assign<S>(&mut self, other: S)where
S: Into<<<G2 as CurveProjective>::Scalar as PrimeField>::Repr>,
fn mul_assign<S>(&mut self, other: S)where
S: Into<<<G2 as CurveProjective>::Scalar as PrimeField>::Repr>,
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: <<G2 as CurveProjective>::Scalar as PrimeField>::Repr
) -> usize
fn recommended_wnaf_for_scalar(
scalar: <<G2 as CurveProjective>::Scalar as PrimeField>::Repr
) -> usize
Recommends a wNAF window table size given a scalar. Always returns a number
between 2 and 22, inclusive. Read more
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. Read more
source§fn sub_assign(&mut self, other: &Self)
fn sub_assign(&mut self, other: &Self)
Subtracts another element from this element.