Struct pairing_ce::bn256::G2Affine
source · pub struct G2Affine { /* private fields */ }
Trait Implementations§
source§impl 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
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) -> G2
fn mul<S: Into<<Self::Scalar as PrimeField>::Repr>>(&self, by: S) -> G2
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) -> G2
fn into_projective(&self) -> G2
Converts this element into its affine representation.
source§fn 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
source§fn 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
source§fn 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
source§fn 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
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<'de> Deserialize<'de> for G2Affine
impl<'de> Deserialize<'de> for G2Affine
source§fn 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