Struct pairing_ce::bn256::G2Affine
source · pub struct G2Affine { /* private fields */ }
Trait Implementations
sourceimpl CurveAffine for G2Affine
impl CurveAffine for G2Affine
type Engine = Bn256
type Scalar = Fr
type Base = Fq2
type Prepared = G2Prepared
type Projective = G2
type Uncompressed = G2Uncompressed
type Compressed = G2Compressed
type Pair = G1Affine
type PairingResult = Fq12
sourcefn is_zero(&self) -> bool
fn is_zero(&self) -> bool
Determines if this point represents the point at infinity; the
additive identity. Read more
sourcefn mul<S: Into<<Self::Scalar as PrimeField>::Repr>>(&self, by: S) -> G2
fn mul<S: Into<<Self::Scalar as PrimeField>::Repr>>(&self, by: S) -> G2
Performs scalar multiplication of this element with mixed addition.
sourcefn pairing_with(&self, other: &Self::Pair) -> Self::PairingResult
fn pairing_with(&self, other: &Self::Pair) -> Self::PairingResult
Perform a pairing
sourcefn into_projective(&self) -> G2
fn into_projective(&self) -> G2
Converts this element into its affine representation.
sourcefn as_xy(&self) -> (&Self::Base, &Self::Base)
fn as_xy(&self) -> (&Self::Base, &Self::Base)
Returns references to underlying X and Y coordinates. Users should check for infinity
outside of this call Read more
sourcefn into_xy_unchecked(self) -> (Self::Base, Self::Base)
fn into_xy_unchecked(self) -> (Self::Base, Self::Base)
Returns underlying X and Y coordinates. Users should check for infinity
outside of this call Read more
sourcefn from_xy_unchecked(x: Self::Base, y: Self::Base) -> Self
fn from_xy_unchecked(x: Self::Base, y: Self::Base) -> Self
Creates a point from raw X and Y coordinates. Point of infinity is encoded as (0,0) by default.
On-curve check is NOT performed Read more
sourcefn from_xy_checked(
x: Self::Base,
y: Self::Base
) -> Result<Self, GroupDecodingError>
fn from_xy_checked(
x: Self::Base,
y: Self::Base
) -> Result<Self, GroupDecodingError>
Creates a point from raw X and Y coordinates. Point of infinity is encoded as (0,0) by default.
On-curve check is performed Read more
sourcefn 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. Read more
sourcefn 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. Read more
sourceimpl<'de> Deserialize<'de> for G2Affine
impl<'de> Deserialize<'de> for G2Affine
sourcefn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl Copy for G2Affine
impl Eq for G2Affine
impl StructuralEq for G2Affine
impl StructuralPartialEq for G2Affine
Auto Trait Implementations
impl RefUnwindSafe for G2Affine
impl Send for G2Affine
impl Sync for G2Affine
impl Unpin for G2Affine
impl UnwindSafe for G2Affine
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more