pub struct G1Affine { /* private fields */ }
Trait Implementations§
Source§impl CurveAffine for G1Affine
impl CurveAffine for G1Affine
type Engine = Bls12
type Scalar = Fr
type Base = Fq
type Prepared = G1Prepared
type Projective = G1
type Uncompressed = G1Uncompressed
type Compressed = G1Compressed
type Pair = G2Affine
type PairingResult = Fq12
Source§fn is_zero(&self) -> bool
fn is_zero(&self) -> bool
Determines if this point represents the point at infinity; the
additive identity.
Source§fn mul<S: Into<<Self::Scalar as PrimeField>::Repr>>(&self, by: S) -> G1
fn mul<S: Into<<Self::Scalar as PrimeField>::Repr>>(&self, by: S) -> G1
Performs scalar multiplication of this element with mixed addition.
Source§fn pairing_with(&self, other: &Self::Pair) -> Self::PairingResult
fn pairing_with(&self, other: &Self::Pair) -> Self::PairingResult
Perform a pairing
Source§fn into_projective(&self) -> G1
fn into_projective(&self) -> G1
Converts this element into its affine representation.
Source§unsafe fn as_tuple_mut(&mut self) -> (&mut Fq, &mut Fq)
unsafe fn as_tuple_mut(&mut self) -> (&mut Fq, &mut Fq)
Borrow mutable references to the X and Y 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 precomp_3(&self, pre: &mut [Self])
fn precomp_3(&self, pre: &mut [Self])
pre[0] becomes (2^64) * self, pre[1] becomes (2^128) * self, and pre[2] (becomes 2^196) * self
Source§fn mul_precomp_3<S: Into<<Self::Scalar as PrimeField>::Repr>>(
&self,
other: S,
pre: &[Self],
) -> G1
fn mul_precomp_3<S: Into<<Self::Scalar as PrimeField>::Repr>>( &self, other: S, pre: &[Self], ) -> G1
Performs scalar multiplication of this element,
assuming pre = [(2^64)*self, (2^128)*self, (2^192)*self]
Source§fn precomp_256(&self, pre: &mut [Self])
fn precomp_256(&self, pre: &mut [Self])
pre[i] becomes (\sum_{b such that bth bit of i is 1} 2^{32i}) * self for i in 0..25
Source§fn mul_precomp_256<S: Into<<Self::Scalar as PrimeField>::Repr>>(
&self,
other: S,
pre: &[Self],
) -> G1
fn mul_precomp_256<S: Into<<Self::Scalar as PrimeField>::Repr>>( &self, other: S, pre: &[Self], ) -> G1
Performs scalar multiplication of this element,
assuming pre[i] = (\sum_{b such that bth bit of i is 1} 2^{32i}) * self for i in 0..256
Source§fn sum_of_products(points: &[Self], scalars: &[&[u64; 4]]) -> G1
fn sum_of_products(points: &[Self], scalars: &[&[u64; 4]]) -> G1
given x, compute x^3+b
multiplication of many points
compute s1 * p1 + … + sn * pn simultaneously
Source§fn find_pippinger_window(num_components: usize) -> usize
fn find_pippinger_window(num_components: usize) -> usize
Find the optimal window for running Pippinger’s algorithm; preprogrammed values
Source§fn find_pippinger_window_via_estimate(num_components: usize) -> usize
fn find_pippinger_window_via_estimate(num_components: usize) -> usize
Find the optimal window for running Pippinger’s algorithm; computed values via an estimate of running time
Source§fn sum_of_products_pippinger(
points: &[Self],
scalars: &[&[u64; 4]],
window: usize,
) -> G1
fn sum_of_products_pippinger( points: &[Self], scalars: &[&[u64; 4]], window: usize, ) -> G1
multiplication of many points with Pippinger’s algorithm of window size w
compute s1 * p1 + … + sn * pn simultaneously
Source§fn sum_of_products_precomp_256(
points: &[Self],
scalars: &[&[u64; 4]],
pre: &[Self],
) -> G1
fn sum_of_products_precomp_256( points: &[Self], scalars: &[&[u64; 4]], pre: &[Self], ) -> G1
multiplication of many points with precompuation
compute s1 * p1 + … + sn * pn simultaneously
assuming pre[j*256+i] = (\sum_{b such that bth bit of i is 1} 2^{32i}) * bases[j] for each j and i in 0..256
Source§fn into_compressed(&self) -> Self::Compressed
fn into_compressed(&self) -> Self::Compressed
Converts this element into its compressed encoding, so long as it’s not
the point at infinity.
Source§fn into_uncompressed(&self) -> Self::Uncompressed
fn into_uncompressed(&self) -> Self::Uncompressed
Converts this element into its uncompressed encoding, so long as it’s not
the point at infinity.
Source§impl SubgroupCheck for G1Affine
impl SubgroupCheck for G1Affine
Source§fn in_subgroup(&self) -> bool
fn in_subgroup(&self) -> bool
subgroup membership check using classical method:
i.e., raise to the power of group order
impl Copy for G1Affine
impl Eq for G1Affine
impl StructuralPartialEq for G1Affine
Auto Trait Implementations§
impl Freeze for G1Affine
impl RefUnwindSafe for G1Affine
impl Send for G1Affine
impl Sync for G1Affine
impl Unpin for G1Affine
impl UnwindSafe for G1Affine
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
)