[−][src]Struct blstrs::G2Affine
This is an element of $\mathbb{G}_2$ represented in the affine coordinate space. It is ideal to keep elements in this representation to reduce memory usage and improve performance through the use of mixed curve model arithmetic.
Implementations
impl G2Affine
[src]
pub fn zero() -> Self
[src]
Returns the additive identity.
pub fn one() -> Self
[src]
Returns a fixed generator of unknown exponent.
pub fn is_zero(&self) -> bool
[src]
Determines if this point represents the point at infinity; the additive identity.
pub fn to_compressed(&self) -> [u8; 96]
[src]
Serializes this element into compressed form.
pub fn to_uncompressed(&self) -> [u8; 192]
[src]
Serializes this element into uncompressed form.
pub fn from_uncompressed(bytes: &[u8; 192]) -> Option<Self>
[src]
Attempts to deserialize an uncompressed element.
pub fn from_uncompressed_unchecked(bytes: &[u8; 192]) -> Option<Self>
[src]
Attempts to deserialize an uncompressed element, not checking if the element is on the curve and not checking if it is in the correct subgroup.
This is dangerous to call unless you trust the bytes you are reading; otherwise,
API invariants may be broken. Please consider using from_uncompressed()
instead.
pub fn from_compressed(bytes: &[u8; 96]) -> Option<Self>
[src]
Attempts to deserialize a compressed element.
pub fn from_compressed_unchecked(bytes: &[u8; 96]) -> Option<Self>
[src]
Attempts to deserialize an uncompressed element, not checking if the element is in the correct subgroup.
This is dangerous to call unless you trust the bytes you are reading; otherwise,
API invariants may be broken. Please consider using from_compressed()
instead.
pub fn is_torsion_free(&self) -> bool
[src]
Returns true if this point is free of an $h$-torsion component, and so it exists within the $q$-order subgroup $\mathbb{G}_2$. This should always return true unless an "unchecked" API was used.
pub fn is_on_curve(&self) -> bool
[src]
Returns true if this point is on the curve. This should always return true unless an "unchecked" API was used.
pub fn from_raw_unchecked(x: Fp2, y: Fp2, _infinity: bool) -> Self
[src]
pub fn x(&self) -> Fp2
[src]
Returns the x coordinate.
pub fn y(&self) -> Fp2
[src]
Returns the y coordinate.
pub const fn uncompressed_size() -> usize
[src]
pub const fn compressed_size() -> usize
[src]
Trait Implementations
impl<'a, 'b> Add<&'b G2Affine> for &'a G2Projective
[src]
type Output = G2Projective
The resulting type after applying the +
operator.
fn add(self, rhs: &'b G2Affine) -> G2Projective
[src]
impl<'b> Add<&'b G2Affine> for G2Projective
[src]
type Output = G2Projective
The resulting type after applying the +
operator.
fn add(self, rhs: &'b G2Affine) -> G2Projective
[src]
impl<'a, 'b> Add<&'b G2Projective> for &'a G2Affine
[src]
type Output = G2Projective
The resulting type after applying the +
operator.
fn add(self, rhs: &'b G2Projective) -> G2Projective
[src]
impl<'b> Add<&'b G2Projective> for G2Affine
[src]
type Output = G2Projective
The resulting type after applying the +
operator.
fn add(self, rhs: &'b G2Projective) -> G2Projective
[src]
impl<'a> Add<G2Affine> for &'a G2Projective
[src]
type Output = G2Projective
The resulting type after applying the +
operator.
fn add(self, rhs: G2Affine) -> G2Projective
[src]
impl Add<G2Affine> for G2Projective
[src]
type Output = G2Projective
The resulting type after applying the +
operator.
fn add(self, rhs: G2Affine) -> G2Projective
[src]
impl<'a> Add<G2Projective> for &'a G2Affine
[src]
type Output = G2Projective
The resulting type after applying the +
operator.
fn add(self, rhs: G2Projective) -> G2Projective
[src]
impl Add<G2Projective> for G2Affine
[src]
type Output = G2Projective
The resulting type after applying the +
operator.
fn add(self, rhs: G2Projective) -> G2Projective
[src]
impl<'b> AddAssign<&'b G2Affine> for G2Projective
[src]
fn add_assign(&mut self, rhs: &'b G2Affine)
[src]
impl AddAssign<G2Affine> for G2Projective
[src]
fn add_assign(&mut self, rhs: G2Affine)
[src]
impl Clone for G2Affine
[src]
impl Copy for G2Affine
[src]
impl CurveAffine for G2Affine
[src]
type Engine = Bls12
type Scalar = Scalar
type Base = Fp2
type Projective = G2Projective
type Uncompressed = G2Uncompressed
type Compressed = G2Compressed
fn zero() -> Self
[src]
fn one() -> Self
[src]
fn is_zero(&self) -> bool
[src]
fn mul<S: Into<<Self::Scalar as PrimeField>::Repr>>(
&self,
by: S
) -> Self::Projective
[src]
&self,
by: S
) -> Self::Projective
fn negate(&mut self)
[src]
fn into_projective(&self) -> Self::Projective
[src]
fn into_compressed(&self) -> Self::Compressed
[src]
fn into_uncompressed(&self) -> Self::Uncompressed
[src]
impl Debug for G2Affine
[src]
impl Default for G2Affine
[src]
impl Display for G2Affine
[src]
impl Eq for G2Affine
[src]
impl<'_> From<&'_ G2Affine> for G2Projective
[src]
fn from(p: &G2Affine) -> G2Projective
[src]
impl<'_> From<&'_ G2Projective> for G2Affine
[src]
fn from(p: &G2Projective) -> G2Affine
[src]
impl From<G2Affine> for G2Projective
[src]
fn from(p: G2Affine) -> G2Projective
[src]
impl From<G2Projective> for G2Affine
[src]
fn from(p: G2Projective) -> G2Affine
[src]
impl<'a, 'b> Mul<&'b Scalar> for &'a G2Affine
[src]
type Output = G2Projective
The resulting type after applying the *
operator.
fn mul(self, other: &'b Scalar) -> Self::Output
[src]
impl<'b> Mul<&'b Scalar> for G2Affine
[src]
type Output = G2Projective
The resulting type after applying the *
operator.
fn mul(self, rhs: &'b Scalar) -> G2Projective
[src]
impl<'a> Mul<Scalar> for &'a G2Affine
[src]
type Output = G2Projective
The resulting type after applying the *
operator.
fn mul(self, rhs: Scalar) -> G2Projective
[src]
impl Mul<Scalar> for G2Affine
[src]
type Output = G2Projective
The resulting type after applying the *
operator.
fn mul(self, rhs: Scalar) -> G2Projective
[src]
impl<'_> Neg for &'_ G2Affine
[src]
type Output = G2Affine
The resulting type after applying the -
operator.
fn neg(self) -> G2Affine
[src]
impl Neg for G2Affine
[src]
type Output = G2Affine
The resulting type after applying the -
operator.
fn neg(self) -> G2Affine
[src]
impl PairingCurveAffine for G2Affine
[src]
type Prepared = G2Prepared
type Pair = G1Affine
type PairingResult = Fp12
fn prepare(&self) -> Self::Prepared
[src]
fn pairing_with(&self, other: &Self::Pair) -> Self::PairingResult
[src]
impl PartialEq<G2Affine> for G2Affine
[src]
impl<'a, 'b> Sub<&'b G2Affine> for &'a G2Projective
[src]
type Output = G2Projective
The resulting type after applying the -
operator.
fn sub(self, rhs: &'b G2Affine) -> G2Projective
[src]
impl<'b> Sub<&'b G2Affine> for G2Projective
[src]
type Output = G2Projective
The resulting type after applying the -
operator.
fn sub(self, rhs: &'b G2Affine) -> G2Projective
[src]
impl<'a, 'b> Sub<&'b G2Projective> for &'a G2Affine
[src]
type Output = G2Projective
The resulting type after applying the -
operator.
fn sub(self, rhs: &'b G2Projective) -> G2Projective
[src]
impl<'b> Sub<&'b G2Projective> for G2Affine
[src]
type Output = G2Projective
The resulting type after applying the -
operator.
fn sub(self, rhs: &'b G2Projective) -> G2Projective
[src]
impl<'a> Sub<G2Affine> for &'a G2Projective
[src]
type Output = G2Projective
The resulting type after applying the -
operator.
fn sub(self, rhs: G2Affine) -> G2Projective
[src]
impl Sub<G2Affine> for G2Projective
[src]
type Output = G2Projective
The resulting type after applying the -
operator.
fn sub(self, rhs: G2Affine) -> G2Projective
[src]
impl<'a> Sub<G2Projective> for &'a G2Affine
[src]
type Output = G2Projective
The resulting type after applying the -
operator.
fn sub(self, rhs: G2Projective) -> G2Projective
[src]
impl Sub<G2Projective> for G2Affine
[src]
type Output = G2Projective
The resulting type after applying the -
operator.
fn sub(self, rhs: G2Projective) -> G2Projective
[src]
impl<'b> SubAssign<&'b G2Affine> for G2Projective
[src]
fn sub_assign(&mut self, rhs: &'b G2Affine)
[src]
impl SubAssign<G2Affine> for G2Projective
[src]
fn sub_assign(&mut self, rhs: G2Affine)
[src]
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
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T> ToString for T where
T: Display + ?Sized,
[src]
T: Display + ?Sized,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,