pub type Fp2 = Bls12_381Fp2;
Aliased Type§
struct Fp2 {
pub c0: Bls12_381Fp,
pub c1: Bls12_381Fp,
}
Fields§
§c0: Bls12_381Fp
Real coordinate
c1: Bls12_381Fp
Imaginary coordinate
Implementations
Source§impl Bls12_381Fp2
impl Bls12_381Fp2
Trait Implementations§
Source§impl FieldExtension<Bls12_381Fp> for Fp2
impl FieldExtension<Bls12_381Fp> for Fp2
Source§type Coeffs = [Bls12_381Fp; 2]
type Coeffs = [Bls12_381Fp; 2]
This should be [BaseField; D]. It is an associated type due to rust const generic limitations.
Source§fn from_coeffs([c0, c1]: Self::Coeffs) -> Self
fn from_coeffs([c0, c1]: Self::Coeffs) -> Self
Create an extension field element from its base field coefficients.
Source§fn from_bytes(bytes: &[u8]) -> Self
fn from_bytes(bytes: &[u8]) -> Self
Create an extension field element from little-endian bytes.
Source§fn to_coeffs(self) -> Self::Coeffs
fn to_coeffs(self) -> Self::Coeffs
Convert an extension field element to its base field coefficients.
Source§fn frobenius_map(&self, power: usize) -> Self
fn frobenius_map(&self, power: usize) -> Self
Frobenius map: take
self
to the p^power
th power, where p
is the prime characteristic of the field.Source§impl<'a> Add<&'a Bls12_381Fp2> for Bls12_381Fp2
impl<'a> Add<&'a Bls12_381Fp2> for Bls12_381Fp2
Source§type Output = Bls12_381Fp2
type Output = Bls12_381Fp2
The resulting type after applying the
+
operator.Source§impl Add for Bls12_381Fp2
impl Add for Bls12_381Fp2
Source§impl<'a> AddAssign<&'a Bls12_381Fp2> for Bls12_381Fp2
impl<'a> AddAssign<&'a Bls12_381Fp2> for Bls12_381Fp2
Source§fn add_assign(&mut self, other: &'a Bls12_381Fp2)
fn add_assign(&mut self, other: &'a Bls12_381Fp2)
Performs the
+=
operation. Read moreSource§impl AddAssign for Bls12_381Fp2
impl AddAssign for Bls12_381Fp2
Source§fn add_assign(&mut self, other: Self)
fn add_assign(&mut self, other: Self)
Performs the
+=
operation. Read moreSource§impl Clone for Bls12_381Fp2
impl Clone for Bls12_381Fp2
Source§fn clone(&self) -> Bls12_381Fp2
fn clone(&self) -> Bls12_381Fp2
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl ComplexConjugate for Bls12_381Fp2
impl ComplexConjugate for Bls12_381Fp2
Source§impl Debug for Bls12_381Fp2
impl Debug for Bls12_381Fp2
Source§impl<'de> Deserialize<'de> for Bls12_381Fp2
impl<'de> Deserialize<'de> for Bls12_381Fp2
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
Source§impl<'a> DivAssignUnsafe<&'a Bls12_381Fp2> for Bls12_381Fp2
impl<'a> DivAssignUnsafe<&'a Bls12_381Fp2> for Bls12_381Fp2
Source§fn div_assign_unsafe(&mut self, other: &'a Bls12_381Fp2)
fn div_assign_unsafe(&mut self, other: &'a Bls12_381Fp2)
Undefined behavior when denominator is not invertible.
Source§impl DivAssignUnsafe for Bls12_381Fp2
impl DivAssignUnsafe for Bls12_381Fp2
Source§fn div_assign_unsafe(&mut self, other: Self)
fn div_assign_unsafe(&mut self, other: Self)
Undefined behavior when denominator is not invertible.
Source§impl<'a> DivUnsafe<&'a Bls12_381Fp2> for Bls12_381Fp2
impl<'a> DivUnsafe<&'a Bls12_381Fp2> for Bls12_381Fp2
Source§type Output = Bls12_381Fp2
type Output = Bls12_381Fp2
Output type of
div_unsafe
.Source§fn div_unsafe(self, other: &'a Bls12_381Fp2) -> Self::Output
fn div_unsafe(self, other: &'a Bls12_381Fp2) -> Self::Output
Undefined behavior when denominator is not invertible.
Source§impl DivUnsafe for Bls12_381Fp2
impl DivUnsafe for Bls12_381Fp2
Source§type Output = Bls12_381Fp2
type Output = Bls12_381Fp2
Output type of
div_unsafe
.Source§fn div_unsafe(self, other: Self) -> Self::Output
fn div_unsafe(self, other: Self) -> Self::Output
Undefined behavior when denominator is not invertible.
Source§impl Field for Bls12_381Fp2
impl Field for Bls12_381Fp2
type SelfRef<'a> = &'a Bls12_381Fp2 where Self: 'a
Source§fn double_assign(&mut self)
fn double_assign(&mut self)
Doubles
self
in-place.Source§fn square_assign(&mut self)
fn square_assign(&mut self)
Square
self
in-placeSource§impl<'a> Mul<&'a Bls12_381Fp2> for Bls12_381Fp2
impl<'a> Mul<&'a Bls12_381Fp2> for Bls12_381Fp2
Source§type Output = Bls12_381Fp2
type Output = Bls12_381Fp2
The resulting type after applying the
*
operator.Source§impl Mul for Bls12_381Fp2
impl Mul for Bls12_381Fp2
Source§impl<'a> MulAssign<&'a Bls12_381Fp2> for Bls12_381Fp2
impl<'a> MulAssign<&'a Bls12_381Fp2> for Bls12_381Fp2
Source§fn mul_assign(&mut self, other: &'a Bls12_381Fp2)
fn mul_assign(&mut self, other: &'a Bls12_381Fp2)
Performs the
*=
operation. Read moreSource§impl MulAssign for Bls12_381Fp2
impl MulAssign for Bls12_381Fp2
Source§fn mul_assign(&mut self, other: Self)
fn mul_assign(&mut self, other: Self)
Performs the
*=
operation. Read moreSource§impl Neg for Bls12_381Fp2
impl Neg for Bls12_381Fp2
Source§impl PartialEq for Bls12_381Fp2
impl PartialEq for Bls12_381Fp2
Source§impl<'a> Product<&'a Bls12_381Fp2> for Bls12_381Fp2
impl<'a> Product<&'a Bls12_381Fp2> for Bls12_381Fp2
Source§fn product<I: Iterator<Item = &'a Bls12_381Fp2>>(iter: I) -> Self
fn product<I: Iterator<Item = &'a Bls12_381Fp2>>(iter: I) -> Self
Takes an iterator and generates
Self
from the elements by multiplying
the items.Source§impl Product for Bls12_381Fp2
impl Product for Bls12_381Fp2
Source§impl Serialize for Bls12_381Fp2
impl Serialize for Bls12_381Fp2
Source§impl<'a> Sub<&'a Bls12_381Fp2> for Bls12_381Fp2
impl<'a> Sub<&'a Bls12_381Fp2> for Bls12_381Fp2
Source§type Output = Bls12_381Fp2
type Output = Bls12_381Fp2
The resulting type after applying the
-
operator.Source§impl Sub for Bls12_381Fp2
impl Sub for Bls12_381Fp2
Source§impl<'a> SubAssign<&'a Bls12_381Fp2> for Bls12_381Fp2
impl<'a> SubAssign<&'a Bls12_381Fp2> for Bls12_381Fp2
Source§fn sub_assign(&mut self, other: &'a Bls12_381Fp2)
fn sub_assign(&mut self, other: &'a Bls12_381Fp2)
Performs the
-=
operation. Read moreSource§impl SubAssign for Bls12_381Fp2
impl SubAssign for Bls12_381Fp2
Source§fn sub_assign(&mut self, other: Self)
fn sub_assign(&mut self, other: Self)
Performs the
-=
operation. Read moreSource§impl<'a> Sum<&'a Bls12_381Fp2> for Bls12_381Fp2
impl<'a> Sum<&'a Bls12_381Fp2> for Bls12_381Fp2
Source§fn sum<I: Iterator<Item = &'a Bls12_381Fp2>>(iter: I) -> Self
fn sum<I: Iterator<Item = &'a Bls12_381Fp2>>(iter: I) -> Self
Takes an iterator and generates
Self
from the elements by “summing up”
the items.