pub struct QuadExtField<P: QuadExtConfig> {
    pub c0: P::BaseField,
    pub c1: P::BaseField,
}
Expand description

An element of a quadratic extension field F_p[X]/(X^2 - P::NONRESIDUE) is represented as c0 + c1 * X, for c0, c1 in P::BaseField.

Fields§

§c0: P::BaseField

Coefficient c0 in the representation of the field element c = c0 + c1 * X

§c1: P::BaseField

Coefficient c1 in the representation of the field element c = c0 + c1 * X

Implementations§

source§

impl<P: Fp2Config> QuadExtField<Fp2ConfigWrapper<P>>

source

pub fn mul_assign_by_fp(&mut self, other: &P::Fp)

In-place multiply both coefficients c0 and c1 of self by an element from Fp.

Examples
let c0: Fp = Fp::rand(&mut test_rng());
let c1: Fp = Fp::rand(&mut test_rng());
let mut ext_element: Fp2 = Fp2::new(c0, c1);

let base_field_element: Fp = Fp::rand(&mut test_rng());
ext_element.mul_assign_by_fp(&base_field_element);

assert_eq!(ext_element.c0, c0 * base_field_element);
assert_eq!(ext_element.c1, c1 * base_field_element);
source§

impl<P: Fp4Config> QuadExtField<Fp4ConfigWrapper<P>>

source

pub fn mul_by_fp(&mut self, element: &<P::Fp2Config as Fp2Config>::Fp)

source

pub fn mul_by_fp2(&mut self, element: &Fp2<P::Fp2Config>)

source§

impl<P: Fp6Config> QuadExtField<Fp6ConfigWrapper<P>>

source

pub fn mul_by_034( &mut self, c0: &<P::Fp3Config as Fp3Config>::Fp, c3: &<P::Fp3Config as Fp3Config>::Fp, c4: &<P::Fp3Config as Fp3Config>::Fp )

source

pub fn mul_by_014( &mut self, c0: &<P::Fp3Config as Fp3Config>::Fp, c1: &<P::Fp3Config as Fp3Config>::Fp, c4: &<P::Fp3Config as Fp3Config>::Fp )

source§

impl<P: Fp12Config> QuadExtField<Fp12ConfigWrapper<P>>

source

pub fn mul_by_fp(&mut self, element: &<Self as Field>::BasePrimeField)

source

pub fn mul_by_034( &mut self, c0: &Fp2<<<P as Fp12Config>::Fp6Config as Fp6Config>::Fp2Config>, c3: &Fp2<<<P as Fp12Config>::Fp6Config as Fp6Config>::Fp2Config>, c4: &Fp2<<<P as Fp12Config>::Fp6Config as Fp6Config>::Fp2Config> )

source

pub fn mul_by_014( &mut self, c0: &Fp2<<<P as Fp12Config>::Fp6Config as Fp6Config>::Fp2Config>, c1: &Fp2<<<P as Fp12Config>::Fp6Config as Fp6Config>::Fp2Config>, c4: &Fp2<<<P as Fp12Config>::Fp6Config as Fp6Config>::Fp2Config> )

source§

impl<P: QuadExtConfig> QuadExtField<P>

source

pub const fn new(c0: P::BaseField, c1: P::BaseField) -> Self

Create a new field element from coefficients c0 and c1, so that the result is of the form c0 + c1 * X.

Examples
let c0: Fp = Fp::rand(&mut test_rng());
let c1: Fp = Fp::rand(&mut test_rng());
// `Fp2` a degree-2 extension over `Fp`.
let c: Fp2 = Fp2::new(c0, c1);
source

pub fn conjugate_in_place(&mut self) -> &mut Self

This is only to be used when the element is known to be in the cyclotomic subgroup.

source

pub fn norm(&self) -> P::BaseField

Norm of QuadExtField over P::BaseField:Norm(a) = a * a.conjugate(). This simplifies to: Norm(a) = a.x^2 - P::NON_RESIDUE * a.y^2. This is alternatively expressed as Norm(a) = a^(1 + p).

Examples
let c: Fp2 = Fp2::rand(&mut test_rng());
let norm = c.norm();
// We now compute the norm using the `a * a.conjugate()` approach.
// A Frobenius map sends an element of `Fp2` to one of its p_th powers:
// `a.frobenius_map_in_place(1) -> a^p` and `a^p` is also `a`'s Galois conjugate.
let mut c_conjugate = c;
c_conjugate.frobenius_map_in_place(1);
let norm2 = c * c_conjugate;
// Computing the norm of an `Fp2` element should result in an element
// in BaseField `Fp`, i.e. `c1 == 0`
assert!(norm2.c1.is_zero());
assert_eq!(norm, norm2.c0);
source

pub fn mul_assign_by_basefield(&mut self, element: &P::BaseField)

In-place multiply both coefficients c0 & c1 of the quadratic extension field by an element from the base field.

Trait Implementations§

source§

impl<'a, 'b, P: QuadExtConfig> Add<&'a QuadExtField<P>> for &'b QuadExtField<P>

§

type Output = QuadExtField<P>

The resulting type after applying the + operator.
source§

fn add(self, other: &'a QuadExtField<P>) -> QuadExtField<P>

Performs the + operation. Read more
source§

impl<'a, P: QuadExtConfig> Add<&'a QuadExtField<P>> for QuadExtField<P>

§

type Output = QuadExtField<P>

The resulting type after applying the + operator.
source§

fn add(self, other: &Self) -> Self

Performs the + operation. Read more
source§

impl<'a, 'b, P: QuadExtConfig> Add<&'a mut QuadExtField<P>> for &'b QuadExtField<P>

§

type Output = QuadExtField<P>

The resulting type after applying the + operator.
source§

fn add(self, other: &'a mut QuadExtField<P>) -> QuadExtField<P>

Performs the + operation. Read more
source§

impl<'a, P: QuadExtConfig> Add<&'a mut QuadExtField<P>> for QuadExtField<P>

§

type Output = QuadExtField<P>

The resulting type after applying the + operator.
source§

fn add(self, other: &'a mut Self) -> Self

Performs the + operation. Read more
source§

impl<'b, P: QuadExtConfig> Add<QuadExtField<P>> for &'b QuadExtField<P>

§

type Output = QuadExtField<P>

The resulting type after applying the + operator.
source§

fn add(self, other: QuadExtField<P>) -> QuadExtField<P>

Performs the + operation. Read more
source§

impl<P: QuadExtConfig> Add<QuadExtField<P>> for QuadExtField<P>

§

type Output = QuadExtField<P>

The resulting type after applying the + operator.
source§

fn add(self, other: Self) -> Self

Performs the + operation. Read more
source§

impl<'a, P: QuadExtConfig> AddAssign<&'a QuadExtField<P>> for QuadExtField<P>

source§

fn add_assign(&mut self, other: &Self)

Performs the += operation. Read more
source§

impl<'a, P: QuadExtConfig> AddAssign<&'a mut QuadExtField<P>> for QuadExtField<P>

source§

fn add_assign(&mut self, other: &'a mut Self)

Performs the += operation. Read more
source§

impl<P: QuadExtConfig> AddAssign<QuadExtField<P>> for QuadExtField<P>

source§

fn add_assign(&mut self, other: Self)

Performs the += operation. Read more
source§

impl<P: QuadExtConfig> CanonicalDeserialize for QuadExtField<P>

source§

fn deserialize_with_mode<R: Read>( reader: R, compress: Compress, validate: Validate ) -> Result<Self, SerializationError>

The general deserialize method that takes in customization flags.
source§

fn deserialize_compressed<R>(reader: R) -> Result<Self, SerializationError>where R: Read,

source§

fn deserialize_compressed_unchecked<R>( reader: R ) -> Result<Self, SerializationError>where R: Read,

source§

fn deserialize_uncompressed<R>(reader: R) -> Result<Self, SerializationError>where R: Read,

source§

fn deserialize_uncompressed_unchecked<R>( reader: R ) -> Result<Self, SerializationError>where R: Read,

source§

impl<P: QuadExtConfig> CanonicalDeserializeWithFlags for QuadExtField<P>

source§

fn deserialize_with_flags<R: Read, F: Flags>( reader: R ) -> Result<(Self, F), SerializationError>

Reads Self and Flags from reader. Returns empty flags by default.
source§

impl<P: QuadExtConfig> CanonicalSerialize for QuadExtField<P>

source§

fn serialize_with_mode<W: Write>( &self, writer: W, _compress: Compress ) -> Result<(), SerializationError>

The general serialize method that takes in customization flags.
source§

fn serialized_size(&self, _compress: Compress) -> usize

source§

fn serialize_compressed<W>(&self, writer: W) -> Result<(), SerializationError>where W: Write,

source§

fn compressed_size(&self) -> usize

source§

fn serialize_uncompressed<W>(&self, writer: W) -> Result<(), SerializationError>where W: Write,

source§

fn uncompressed_size(&self) -> usize

source§

impl<P: QuadExtConfig> CanonicalSerializeWithFlags for QuadExtField<P>

source§

fn serialize_with_flags<W: Write, F: Flags>( &self, writer: W, flags: F ) -> Result<(), SerializationError>

Serializes self and flags into writer.
source§

fn serialized_size_with_flags<F: Flags>(&self) -> usize

Serializes self and flags into writer.
source§

impl<P> Clone for QuadExtField<P>where P: QuadExtConfig,

source§

fn clone(&self) -> Self

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl<P> Debug for QuadExtField<P>where P: QuadExtConfig,

source§

fn fmt(&self, __f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl<P> Default for QuadExtField<P>where P: QuadExtConfig,

source§

fn default() -> Self

Returns the “default value” for a type. Read more
source§

impl<P: QuadExtConfig> Display for QuadExtField<P>

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl<P: QuadExtConfig> Distribution<QuadExtField<P>> for Standard

source§

fn sample<R: Rng + ?Sized>(&self, rng: &mut R) -> QuadExtField<P>

Generate a random value of T, using rng as the source of randomness.
source§

fn sample_iter<R>(self, rng: R) -> DistIter<Self, R, T>where R: Rng, Self: Sized,

Create an iterator that generates random values of T, using rng as the source of randomness. Read more
source§

fn map<F, S>(self, func: F) -> DistMap<Self, F, T, S>where F: Fn(T) -> S, Self: Sized,

Create a distribution of values of ‘S’ by mapping the output of Self through the closure F Read more
source§

impl<'a, 'b, P: QuadExtConfig> Div<&'a QuadExtField<P>> for &'b QuadExtField<P>

§

type Output = QuadExtField<P>

The resulting type after applying the / operator.
source§

fn div(self, other: &'a QuadExtField<P>) -> QuadExtField<P>

Performs the / operation. Read more
source§

impl<'a, P: QuadExtConfig> Div<&'a QuadExtField<P>> for QuadExtField<P>

§

type Output = QuadExtField<P>

The resulting type after applying the / operator.
source§

fn div(self, other: &Self) -> Self

Performs the / operation. Read more
source§

impl<'a, 'b, P: QuadExtConfig> Div<&'a mut QuadExtField<P>> for &'b QuadExtField<P>

§

type Output = QuadExtField<P>

The resulting type after applying the / operator.
source§

fn div(self, other: &'a mut QuadExtField<P>) -> QuadExtField<P>

Performs the / operation. Read more
source§

impl<'a, P: QuadExtConfig> Div<&'a mut QuadExtField<P>> for QuadExtField<P>

§

type Output = QuadExtField<P>

The resulting type after applying the / operator.
source§

fn div(self, other: &'a mut Self) -> Self

Performs the / operation. Read more
source§

impl<'b, P: QuadExtConfig> Div<QuadExtField<P>> for &'b QuadExtField<P>

§

type Output = QuadExtField<P>

The resulting type after applying the / operator.
source§

fn div(self, other: QuadExtField<P>) -> QuadExtField<P>

Performs the / operation. Read more
source§

impl<P: QuadExtConfig> Div<QuadExtField<P>> for QuadExtField<P>

§

type Output = QuadExtField<P>

The resulting type after applying the / operator.
source§

fn div(self, other: Self) -> Self

Performs the / operation. Read more
source§

impl<'a, P: QuadExtConfig> DivAssign<&'a QuadExtField<P>> for QuadExtField<P>

source§

fn div_assign(&mut self, other: &Self)

Performs the /= operation. Read more
source§

impl<'a, P: QuadExtConfig> DivAssign<&'a mut QuadExtField<P>> for QuadExtField<P>

source§

fn div_assign(&mut self, other: &'a mut Self)

Performs the /= operation. Read more
source§

impl<P: QuadExtConfig> DivAssign<QuadExtField<P>> for QuadExtField<P>

source§

fn div_assign(&mut self, other: Self)

Performs the /= operation. Read more
source§

impl<P: QuadExtConfig> Field for QuadExtField<P>

§

type BasePrimeField = <P as QuadExtConfig>::BasePrimeField

§

type BasePrimeFieldIter = Chain<<<P as QuadExtConfig>::BaseField as Field>::BasePrimeFieldIter, <<P as QuadExtConfig>::BaseField as Field>::BasePrimeFieldIter>

source§

const SQRT_PRECOMP: Option<SqrtPrecomputation<Self>> = None

Determines the algorithm for computing square roots.
source§

const ZERO: Self = _

The additive identity of the field.
source§

const ONE: Self = _

The multiplicative identity of the field.
source§

fn extension_degree() -> u64

Returns the extension degree of this field with respect to Self::BasePrimeField.
source§

fn from_base_prime_field(elem: Self::BasePrimeField) -> Self

Constructs a field element from a single base prime field elements. Read more
source§

fn to_base_prime_field_elements(&self) -> Self::BasePrimeFieldIter

source§

fn from_base_prime_field_elems(elems: &[Self::BasePrimeField]) -> Option<Self>

Convert a slice of base prime field elements into a field element. If the slice length != Self::extension_degree(), must return None.
source§

fn double(&self) -> Self

Returns self + self.
source§

fn double_in_place(&mut self) -> &mut Self

Doubles self in place.
source§

fn neg_in_place(&mut self) -> &mut Self

Negates self in place.
source§

fn square(&self) -> Self

Returns self * self.
source§

fn from_random_bytes_with_flags<F: Flags>(bytes: &[u8]) -> Option<(Self, F)>

Attempt to deserialize a field element, splitting the bitflags metadata according to F specification. Returns None if the deserialization fails. Read more
source§

fn from_random_bytes(bytes: &[u8]) -> Option<Self>

Attempt to deserialize a field element. Returns None if the deserialization fails. Read more
source§

fn square_in_place(&mut self) -> &mut Self

Squares self in place.
source§

fn inverse(&self) -> Option<Self>

Computes the multiplicative inverse of self if self is nonzero.
source§

fn inverse_in_place(&mut self) -> Option<&mut Self>

If self.inverse().is_none(), this just returns None. Otherwise, it sets self to self.inverse().unwrap().
source§

fn frobenius_map_in_place(&mut self, power: usize)

Sets self to self^s, where s = Self::BasePrimeField::MODULUS^power. This is also called the Frobenius automorphism.
source§

fn legendre(&self) -> LegendreSymbol

Returns a LegendreSymbol, which indicates whether this field element is 1 : a quadratic residue 0 : equal to 0 -1 : a quadratic non-residue
source§

fn sqrt(&self) -> Option<Self>

Returns the square root of self, if it exists.
source§

fn sqrt_in_place(&mut self) -> Option<&mut Self>

Sets self to be the square root of self, if it exists.
source§

fn characteristic() -> &'static [u64]

Returns the characteristic of the field, in little-endian representation.
source§

fn sum_of_products<const T: usize>(a: &[Self; T], b: &[Self; T]) -> Self

Returns sum([a_i * b_i]).
source§

fn frobenius_map(&self, power: usize) -> Self

Returns self^s, where s = Self::BasePrimeField::MODULUS^power. This is also called the Frobenius automorphism.
source§

fn pow<S: AsRef<[u64]>>(&self, exp: S) -> Self

Returns self^exp, where exp is an integer represented with u64 limbs, least significant limb first.
source§

fn pow_with_table<S: AsRef<[u64]>>(powers_of_2: &[Self], exp: S) -> Option<Self>

Exponentiates a field element f by a number represented with u64 limbs, using a precomputed table containing as many powers of 2 of f as the 1 + the floor of log2 of the exponent exp, starting from the 1st power. That is, powers_of_2 should equal &[p, p^2, p^4, ..., p^(2^n)] when exp has at most n bits. Read more
source§

impl<P: QuadExtConfig> From<bool> for QuadExtField<P>

source§

fn from(other: bool) -> Self

Converts to this type from the input type.
source§

impl<P: QuadExtConfig> From<i128> for QuadExtField<P>

source§

fn from(val: i128) -> Self

Converts to this type from the input type.
source§

impl<P: QuadExtConfig> From<i16> for QuadExtField<P>

source§

fn from(val: i16) -> Self

Converts to this type from the input type.
source§

impl<P: QuadExtConfig> From<i32> for QuadExtField<P>

source§

fn from(val: i32) -> Self

Converts to this type from the input type.
source§

impl<P: QuadExtConfig> From<i64> for QuadExtField<P>

source§

fn from(val: i64) -> Self

Converts to this type from the input type.
source§

impl<P: QuadExtConfig> From<i8> for QuadExtField<P>

source§

fn from(val: i8) -> Self

Converts to this type from the input type.
source§

impl<P: QuadExtConfig> From<u128> for QuadExtField<P>

source§

fn from(other: u128) -> Self

Converts to this type from the input type.
source§

impl<P: QuadExtConfig> From<u16> for QuadExtField<P>

source§

fn from(other: u16) -> Self

Converts to this type from the input type.
source§

impl<P: QuadExtConfig> From<u32> for QuadExtField<P>

source§

fn from(other: u32) -> Self

Converts to this type from the input type.
source§

impl<P: QuadExtConfig> From<u64> for QuadExtField<P>

source§

fn from(other: u64) -> Self

Converts to this type from the input type.
source§

impl<P: QuadExtConfig> From<u8> for QuadExtField<P>

source§

fn from(other: u8) -> Self

Converts to this type from the input type.
source§

impl<P> Hash for QuadExtField<P>where P: QuadExtConfig,

source§

fn hash<__HP>(&self, __state: &mut __HP)where __HP: Hasher,

Feeds this value into the given Hasher. Read more
1.3.0 · source§

fn hash_slice<H>(data: &[Self], state: &mut H)where H: Hasher, Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
source§

impl<'a, 'b, P: QuadExtConfig> Mul<&'a QuadExtField<P>> for &'b QuadExtField<P>

§

type Output = QuadExtField<P>

The resulting type after applying the * operator.
source§

fn mul(self, other: &'a QuadExtField<P>) -> QuadExtField<P>

Performs the * operation. Read more
source§

impl<'a, P: QuadExtConfig> Mul<&'a QuadExtField<P>> for QuadExtField<P>

§

type Output = QuadExtField<P>

The resulting type after applying the * operator.
source§

fn mul(self, other: &Self) -> Self

Performs the * operation. Read more
source§

impl<'a, 'b, P: QuadExtConfig> Mul<&'a mut QuadExtField<P>> for &'b QuadExtField<P>

§

type Output = QuadExtField<P>

The resulting type after applying the * operator.
source§

fn mul(self, other: &'a mut QuadExtField<P>) -> QuadExtField<P>

Performs the * operation. Read more
source§

impl<'a, P: QuadExtConfig> Mul<&'a mut QuadExtField<P>> for QuadExtField<P>

§

type Output = QuadExtField<P>

The resulting type after applying the * operator.
source§

fn mul(self, other: &'a mut Self) -> Self

Performs the * operation. Read more
source§

impl<'b, P: QuadExtConfig> Mul<QuadExtField<P>> for &'b QuadExtField<P>

§

type Output = QuadExtField<P>

The resulting type after applying the * operator.
source§

fn mul(self, other: QuadExtField<P>) -> QuadExtField<P>

Performs the * operation. Read more
source§

impl<P: QuadExtConfig> Mul<QuadExtField<P>> for QuadExtField<P>

§

type Output = QuadExtField<P>

The resulting type after applying the * operator.
source§

fn mul(self, other: Self) -> Self

Performs the * operation. Read more
source§

impl<'a, P: QuadExtConfig> MulAssign<&'a QuadExtField<P>> for QuadExtField<P>

source§

fn mul_assign(&mut self, other: &Self)

Performs the *= operation. Read more
source§

impl<'a, P: QuadExtConfig> MulAssign<&'a mut QuadExtField<P>> for QuadExtField<P>

source§

fn mul_assign(&mut self, other: &'a mut Self)

Performs the *= operation. Read more
source§

impl<P: QuadExtConfig> MulAssign<QuadExtField<P>> for QuadExtField<P>

source§

fn mul_assign(&mut self, other: Self)

Performs the *= operation. Read more
source§

impl<P: QuadExtConfig> Neg for QuadExtField<P>

§

type Output = QuadExtField<P>

The resulting type after applying the - operator.
source§

fn neg(self) -> Self

Performs the unary - operation. Read more
source§

impl<P: QuadExtConfig> One for QuadExtField<P>

source§

fn one() -> Self

Returns the multiplicative identity element of Self, 1. Read more
source§

fn is_one(&self) -> bool

Returns true if self is equal to the multiplicative identity. Read more
source§

fn set_one(&mut self)

Sets self to the multiplicative identity element of Self, 1.
source§

impl<P: QuadExtConfig> Ord for QuadExtField<P>

QuadExtField elements are ordered lexicographically.

source§

fn cmp(&self, other: &Self) -> Ordering

This method returns an Ordering between self and other. Read more
1.21.0 · source§

fn max(self, other: Self) -> Selfwhere Self: Sized,

Compares and returns the maximum of two values. Read more
1.21.0 · source§

fn min(self, other: Self) -> Selfwhere Self: Sized,

Compares and returns the minimum of two values. Read more
1.50.0 · source§

fn clamp(self, min: Self, max: Self) -> Selfwhere Self: Sized + PartialOrd<Self>,

Restrict a value to a certain interval. Read more
source§

impl<P> PartialEq<QuadExtField<P>> for QuadExtField<P>where P: QuadExtConfig,

source§

fn eq(&self, other: &Self) -> bool

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl<P: QuadExtConfig> PartialOrd<QuadExtField<P>> for QuadExtField<P>

source§

fn partial_cmp(&self, other: &Self) -> Option<Ordering>

This method returns an ordering between self and other values if one exists. Read more
1.0.0 · source§

fn lt(&self, other: &Rhs) -> bool

This method tests less than (for self and other) and is used by the < operator. Read more
1.0.0 · source§

fn le(&self, other: &Rhs) -> bool

This method tests less than or equal to (for self and other) and is used by the <= operator. Read more
1.0.0 · source§

fn gt(&self, other: &Rhs) -> bool

This method tests greater than (for self and other) and is used by the > operator. Read more
1.0.0 · source§

fn ge(&self, other: &Rhs) -> bool

This method tests greater than or equal to (for self and other) and is used by the >= operator. Read more
source§

impl<'a, P: QuadExtConfig> Product<&'a QuadExtField<P>> for QuadExtField<P>

source§

fn product<I: Iterator<Item = &'a Self>>(iter: I) -> Self

Method which takes an iterator and generates Self from the elements by multiplying the items.
source§

impl<P: QuadExtConfig> Product<QuadExtField<P>> for QuadExtField<P>

source§

fn product<I: Iterator<Item = Self>>(iter: I) -> Self

Method which takes an iterator and generates Self from the elements by multiplying the items.
source§

impl<'a, 'b, P: QuadExtConfig> Sub<&'a QuadExtField<P>> for &'b QuadExtField<P>

§

type Output = QuadExtField<P>

The resulting type after applying the - operator.
source§

fn sub(self, other: &'a QuadExtField<P>) -> QuadExtField<P>

Performs the - operation. Read more
source§

impl<'a, P: QuadExtConfig> Sub<&'a QuadExtField<P>> for QuadExtField<P>

§

type Output = QuadExtField<P>

The resulting type after applying the - operator.
source§

fn sub(self, other: &Self) -> Self

Performs the - operation. Read more
source§

impl<'a, 'b, P: QuadExtConfig> Sub<&'a mut QuadExtField<P>> for &'b QuadExtField<P>

§

type Output = QuadExtField<P>

The resulting type after applying the - operator.
source§

fn sub(self, other: &'a mut QuadExtField<P>) -> QuadExtField<P>

Performs the - operation. Read more
source§

impl<'a, P: QuadExtConfig> Sub<&'a mut QuadExtField<P>> for QuadExtField<P>

§

type Output = QuadExtField<P>

The resulting type after applying the - operator.
source§

fn sub(self, other: &'a mut Self) -> Self

Performs the - operation. Read more
source§

impl<'b, P: QuadExtConfig> Sub<QuadExtField<P>> for &'b QuadExtField<P>

§

type Output = QuadExtField<P>

The resulting type after applying the - operator.
source§

fn sub(self, other: QuadExtField<P>) -> QuadExtField<P>

Performs the - operation. Read more
source§

impl<P: QuadExtConfig> Sub<QuadExtField<P>> for QuadExtField<P>

§

type Output = QuadExtField<P>

The resulting type after applying the - operator.
source§

fn sub(self, other: Self) -> Self

Performs the - operation. Read more
source§

impl<'a, P: QuadExtConfig> SubAssign<&'a QuadExtField<P>> for QuadExtField<P>

source§

fn sub_assign(&mut self, other: &Self)

Performs the -= operation. Read more
source§

impl<'a, P: QuadExtConfig> SubAssign<&'a mut QuadExtField<P>> for QuadExtField<P>

source§

fn sub_assign(&mut self, other: &'a mut Self)

Performs the -= operation. Read more
source§

impl<P: QuadExtConfig> SubAssign<QuadExtField<P>> for QuadExtField<P>

source§

fn sub_assign(&mut self, other: Self)

Performs the -= operation. Read more
source§

impl<'a, P: QuadExtConfig> Sum<&'a QuadExtField<P>> for QuadExtField<P>

source§

fn sum<I: Iterator<Item = &'a Self>>(iter: I) -> Self

Method which takes an iterator and generates Self from the elements by “summing up” the items.
source§

impl<P: QuadExtConfig> Sum<QuadExtField<P>> for QuadExtField<P>

source§

fn sum<I: Iterator<Item = Self>>(iter: I) -> Self

Method which takes an iterator and generates Self from the elements by “summing up” the items.
source§

impl<P: QuadExtConfig> ToConstraintField<<P as QuadExtConfig>::BasePrimeField> for QuadExtField<P>where P::BaseField: ToConstraintField<P::BasePrimeField>,

source§

impl<P: QuadExtConfig> Valid for QuadExtField<P>

source§

fn check(&self) -> Result<(), SerializationError>

source§

fn batch_check<'a>( batch: impl Iterator<Item = &'a Self> + Send ) -> Result<(), SerializationError>where Self: 'a,

source§

impl<P: QuadExtConfig> Zero for QuadExtField<P>

source§

fn zero() -> Self

Returns the additive identity element of Self, 0. Read more
source§

fn is_zero(&self) -> bool

Returns true if self is equal to the additive identity.
source§

fn set_zero(&mut self)

Sets self to the additive identity element of Self, 0.
source§

impl<P: QuadExtConfig> Zeroize for QuadExtField<P>

source§

fn zeroize(&mut self)

Zero out this object from memory using Rust intrinsics which ensure the zeroization operation is not “optimized away” by the compiler.
source§

impl<P> Copy for QuadExtField<P>where P: QuadExtConfig,

source§

impl<P> Eq for QuadExtField<P>where P: QuadExtConfig,

Auto Trait Implementations§

§

impl<P> RefUnwindSafe for QuadExtField<P>where <P as QuadExtConfig>::BaseField: RefUnwindSafe,

§

impl<P> Send for QuadExtField<P>

§

impl<P> Sync for QuadExtField<P>

§

impl<P> Unpin for QuadExtField<P>where <P as QuadExtConfig>::BaseField: Unpin,

§

impl<P> UnwindSafe for QuadExtField<P>where <P as QuadExtConfig>::BaseField: UnwindSafe,

Blanket Implementations§

source§

impl<T> Any for Twhere T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere T: ?Sized,

const: unstable · source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere T: ?Sized,

const: unstable · source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> CanonicalSerializeHashExt for Twhere T: CanonicalSerialize,

source§

fn hash<H>(&self) -> GenericArray<u8, <H as OutputSizeUser>::OutputSize>where H: Digest,

source§

fn hash_uncompressed<H>( &self ) -> GenericArray<u8, <H as OutputSizeUser>::OutputSize>where H: Digest,

source§

impl<T> From<T> for T

const: unstable · source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for Twhere U: From<T>,

const: unstable · source§

fn into(self) -> U

Calls U::from(self).

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

source§

impl<T> Same<T> for T

§

type Output = T

Should always be Self
source§

impl<T> ToOwned for Twhere T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T> ToString for Twhere T: Display + ?Sized,

source§

default fn to_string(&self) -> String

Converts the given value to a String. Read more
source§

impl<T, U> TryFrom<U> for Twhere U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
const: unstable · source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
const: unstable · source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
source§

impl<T> UniformRand for Twhere Standard: Distribution<T>,

source§

fn rand<R>(rng: &mut R) -> Twhere R: Rng + ?Sized,

§

impl<V, T> VZip<V> for Twhere V: MultiLane<T>,

§

fn vzip(self) -> V