Trait pairing_ce::Field[][src]

pub trait Field: 'static + Eq + Copy + Clone + Send + Sync + Debug + Display + Rand + Hash {
    pub fn zero() -> Self;
pub fn one() -> Self;
pub fn is_zero(&self) -> bool;
pub fn square(&mut self);
pub fn double(&mut self);
pub fn negate(&mut self);
pub fn add_assign(&mut self, other: &Self);
pub fn sub_assign(&mut self, other: &Self);
pub fn mul_assign(&mut self, other: &Self);
pub fn inverse(&self) -> Option<Self>;
pub fn frobenius_map(&mut self, power: usize); pub fn pow<S>(&self, exp: S) -> Self
    where
        S: AsRef<[u64]>
, { ... } }

This trait represents an element of a field.

Required methods

pub fn zero() -> Self[src]

Returns the zero element of the field, the additive identity.

pub fn one() -> Self[src]

Returns the one element of the field, the multiplicative identity.

pub fn is_zero(&self) -> bool[src]

Returns true iff this element is zero.

pub fn square(&mut self)[src]

Squares this element.

pub fn double(&mut self)[src]

Doubles this element.

pub fn negate(&mut self)[src]

Negates this element.

pub fn add_assign(&mut self, other: &Self)[src]

Adds another element to this element.

pub fn sub_assign(&mut self, other: &Self)[src]

Subtracts another element from this element.

pub fn mul_assign(&mut self, other: &Self)[src]

Multiplies another element by this element.

pub fn inverse(&self) -> Option<Self>[src]

Computes the multiplicative inverse of this element, if nonzero.

pub fn frobenius_map(&mut self, power: usize)[src]

Exponentiates this element by a power of the base prime modulus via the Frobenius automorphism.

Loading content...

Provided methods

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

Exponentiates this element by a number represented with u64 limbs, least significant digit first.

Loading content...

Implementors

impl Field for pairing_ce::bls12_381::Fq2[src]

impl Field for pairing_ce::bls12_381::Fq6[src]

impl Field for pairing_ce::bls12_381::Fq12[src]

impl Field for pairing_ce::bls12_381::Fq[src]

impl Field for pairing_ce::bls12_381::Fr[src]

impl Field for pairing_ce::bn256::Fq2[src]

impl Field for pairing_ce::bn256::Fq6[src]

impl Field for pairing_ce::bn256::Fq12[src]

impl Field for pairing_ce::bn256::Fq[src]

impl Field for pairing_ce::bn256::Fr[src]

impl Field for pairing_ce::compact_bn256::Fq2[src]

impl Field for pairing_ce::compact_bn256::Fq6[src]

impl Field for pairing_ce::compact_bn256::Fq12[src]

impl Field for pairing_ce::compact_bn256::Fq[src]

impl Field for pairing_ce::compact_bn256::Fr[src]

Loading content...