Struct pairing_ce::bls12_381::fq2::Fq2

source ·
pub struct Fq2 {
    pub c0: Fq,
    pub c1: Fq,
}
Expand description

An element of Fq2, represented by c0 + c1 * u.

Fields§

§c0: Fq§c1: Fq

Implementations§

Multiply this element by the cubic and quadratic nonresidue 1 + u.

Norm of Fq2 as extension field in i over Fq

Trait Implementations§

Returns a copy of the value. Read more
Performs copy-assignment from source. Read more
Formats the value using the given formatter. Read more
Returns the “default value” for a type. Read more
Deserialize this value from the given Serde deserializer. Read more
Formats the value using the given formatter. Read more
Returns the zero element of the field, the additive identity.
Returns the one element of the field, the multiplicative identity.
Returns true iff this element is zero.
Squares this element.
Doubles this element.
Negates this element.
Adds another element to this element.
Subtracts another element from this element.
Multiplies another element by this element.
Computes the multiplicative inverse of this element, if nonzero.
Exponentiates this element by a power of the base prime modulus via the Frobenius automorphism.
Exponentiates this element by a number represented with u64 limbs, least significant digit first.
Feeds this value into the given Hasher. Read more
Feeds a slice of this type into the given Hasher. Read more

Fq2 elements are ordered lexicographically.

This method returns an Ordering between self and other. Read more
Compares and returns the maximum of two values. Read more
Compares and returns the minimum of two values. Read more
Restrict a value to a certain interval. Read more
This method tests for self and other values to be equal, and is used by ==.
This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
This method returns an ordering between self and other values if one exists. Read more
This method tests less than (for self and other) and is used by the < operator. Read more
This method tests less than or equal to (for self and other) and is used by the <= operator. Read more
This method tests greater than (for self and other) and is used by the > operator. Read more
This method tests greater than or equal to (for self and other) and is used by the >= operator. Read more
Generates a random instance of this type using the specified source of randomness.
Serialize this value into the given Serde serializer. Read more
Returns the Legendre symbol of the field element.
Returns the square root of the field element, if it is quadratic residue.

Auto Trait Implementations§

Blanket Implementations§

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The resulting type after obtaining ownership.
Creates owned data from borrowed data, usually by cloning. Read more
Uses borrowed data to replace owned data, usually by cloning. Read more
Converts the given value to a String. Read more
The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.