pub type Fp2 = Bn254Fp2;
Aliased Type§
struct Fp2 {
pub c0: Bn254Fp,
pub c1: Bn254Fp,
}
Fields§
§c0: Bn254Fp
Real coordinate
c1: Bn254Fp
Imaginary coordinate
Implementations
Trait Implementations§
Source§impl FieldExtension<Bn254Fp> for Fp2
impl FieldExtension<Bn254Fp> for Fp2
Source§type Coeffs = [Bn254Fp; 2]
type Coeffs = [Bn254Fp; 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> AddAssign<&'a Bn254Fp2> for Bn254Fp2
impl<'a> AddAssign<&'a Bn254Fp2> for Bn254Fp2
Source§fn add_assign(&mut self, other: &'a Bn254Fp2)
fn add_assign(&mut self, other: &'a Bn254Fp2)
Performs the
+=
operation. Read moreSource§impl AddAssign for Bn254Fp2
impl AddAssign for Bn254Fp2
Source§fn add_assign(&mut self, other: Self)
fn add_assign(&mut self, other: Self)
Performs the
+=
operation. Read moreSource§impl ComplexConjugate for Bn254Fp2
impl ComplexConjugate for Bn254Fp2
Source§impl<'de> Deserialize<'de> for Bn254Fp2
impl<'de> Deserialize<'de> for Bn254Fp2
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 Bn254Fp2> for Bn254Fp2
impl<'a> DivAssignUnsafe<&'a Bn254Fp2> for Bn254Fp2
Source§fn div_assign_unsafe(&mut self, other: &'a Bn254Fp2)
fn div_assign_unsafe(&mut self, other: &'a Bn254Fp2)
Undefined behavior when denominator is not invertible.
Source§impl DivAssignUnsafe for Bn254Fp2
impl DivAssignUnsafe for Bn254Fp2
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 Field for Bn254Fp2
impl Field for Bn254Fp2
type SelfRef<'a> = &'a Bn254Fp2 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> MulAssign<&'a Bn254Fp2> for Bn254Fp2
impl<'a> MulAssign<&'a Bn254Fp2> for Bn254Fp2
Source§fn mul_assign(&mut self, other: &'a Bn254Fp2)
fn mul_assign(&mut self, other: &'a Bn254Fp2)
Performs the
*=
operation. Read moreSource§impl MulAssign for Bn254Fp2
impl MulAssign for Bn254Fp2
Source§fn mul_assign(&mut self, other: Self)
fn mul_assign(&mut self, other: Self)
Performs the
*=
operation. Read moreSource§impl<'a> SubAssign<&'a Bn254Fp2> for Bn254Fp2
impl<'a> SubAssign<&'a Bn254Fp2> for Bn254Fp2
Source§fn sub_assign(&mut self, other: &'a Bn254Fp2)
fn sub_assign(&mut self, other: &'a Bn254Fp2)
Performs the
-=
operation. Read moreSource§impl SubAssign for Bn254Fp2
impl SubAssign for Bn254Fp2
Source§fn sub_assign(&mut self, other: Self)
fn sub_assign(&mut self, other: Self)
Performs the
-=
operation. Read more