pub struct G1 { /* private fields */ }
Trait Implementations
sourceimpl CurveProjective for G1
impl CurveProjective for G1
type Engine = Bls12
type Scalar = Fr
type Base = Fq
type Affine = G1Affine
sourcepub fn random<R>(rng: &mut R) -> G1 where
R: RngCore + ?Sized,
pub fn random<R>(rng: &mut R) -> G1 where
R: RngCore + ?Sized,
Returns an element chosen uniformly at random using a user-provided RNG.
sourcepub fn is_normalized(&self) -> bool
pub fn is_normalized(&self) -> bool
Checks if the point is already “normalized” so that cheap affine conversion is possible. Read more
sourcepub fn batch_normalization(v: &mut [G1])
pub fn batch_normalization(v: &mut [G1])
Normalizes a slice of projective elements so that conversion to affine is cheap. Read more
sourcepub fn add_assign(&mut self, other: &G1)
pub fn add_assign(&mut self, other: &G1)
Adds another element to this element.
sourcepub fn add_assign_mixed(&mut self, other: &<G1 as CurveProjective>::Affine)
pub fn add_assign_mixed(&mut self, other: &<G1 as CurveProjective>::Affine)
Adds an affine element to this element.
sourcepub fn mul_assign<S>(&mut self, other: S) where
S: Into<<<G1 as CurveProjective>::Scalar as PrimeField>::Repr>,
pub fn mul_assign<S>(&mut self, other: S) where
S: Into<<<G1 as CurveProjective>::Scalar as PrimeField>::Repr>,
Performs scalar multiplication of this element.
sourcepub fn into_affine(&self) -> G1Affine
pub fn into_affine(&self) -> G1Affine
Converts this element into its affine representation.
sourcepub fn recommended_wnaf_for_scalar(
scalar: <<G1 as CurveProjective>::Scalar as PrimeField>::Repr
) -> usize
pub fn recommended_wnaf_for_scalar(
scalar: <<G1 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
sourcepub fn recommended_wnaf_for_num_scalars(num_scalars: usize) -> usize
pub 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
sourcefn sub_assign(&mut self, other: &Self)
fn sub_assign(&mut self, other: &Self)
Subtracts another element from this element.
impl Copy for G1
impl Eq for G1
impl StructuralEq for G1
Auto Trait Implementations
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcepub fn borrow_mut(&mut self) -> &mut T
pub fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcepub fn to_owned(&self) -> T
pub fn to_owned(&self) -> T
Creates owned data from borrowed data, usually by cloning. Read more
sourcepub fn clone_into(&self, target: &mut T)
pub fn clone_into(&self, target: &mut T)
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more