Struct blstrs::Fp6[][src]

pub struct Fp6(_);
Expand description

This represents an element $c_0 + c_1 v + c_2 v^2$ of $\mathbb{F}{p^6} = \mathbb{F}{p^2} / v^3 - u - 1$.

Implementations

impl Fp6[src]

pub const fn new(c0: Fp2, c1: Fp2, c2: Fp2) -> Fp6[src]

Constructs an element of Fp6.

pub fn add(&self, rhs: &Fp6) -> Fp6[src]

pub fn neg(&self) -> Fp6[src]

pub fn sub(&self, rhs: &Fp6) -> Fp6[src]

pub fn mul(&self, rhs: &Fp6) -> Fp6[src]

pub fn c0(&self) -> Fp2[src]

pub fn c1(&self) -> Fp2[src]

pub fn c2(&self) -> Fp2[src]

pub fn mul_by_nonresidue(&mut self)[src]

Multiply by quadratic nonresidue v.

Trait Implementations

impl<'a, 'b> Add<&'b Fp6> for &'a Fp6[src]

type Output = Fp6

The resulting type after applying the + operator.

fn add(self, rhs: &'b Fp6) -> Fp6[src]

Performs the + operation. Read more

impl<'b> Add<&'b Fp6> for Fp6[src]

type Output = Fp6

The resulting type after applying the + operator.

fn add(self, rhs: &'b Fp6) -> Fp6[src]

Performs the + operation. Read more

impl<'a> Add<Fp6> for &'a Fp6[src]

type Output = Fp6

The resulting type after applying the + operator.

fn add(self, rhs: Fp6) -> Fp6[src]

Performs the + operation. Read more

impl Add<Fp6> for Fp6[src]

type Output = Fp6

The resulting type after applying the + operator.

fn add(self, rhs: Fp6) -> Fp6[src]

Performs the + operation. Read more

impl<'b> AddAssign<&'b Fp6> for Fp6[src]

fn add_assign(&mut self, rhs: &'b Fp6)[src]

Performs the += operation. Read more

impl AddAssign<Fp6> for Fp6[src]

fn add_assign(&mut self, rhs: Fp6)[src]

Performs the += operation. Read more

impl Clone for Fp6[src]

fn clone(&self) -> Fp6[src]

Returns a copy of the value. Read more

fn clone_from(&mut self, source: &Self)1.0.0[src]

Performs copy-assignment from source. Read more

impl Debug for Fp6[src]

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

Formats the value using the given formatter. Read more

impl Default for Fp6[src]

fn default() -> Self[src]

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

impl<'de> Deserialize<'de> for Fp6[src]

fn deserialize<D: Deserializer<'de>>(d: D) -> Result<Self, D::Error>[src]

Deserialize this value from the given Serde deserializer. Read more

impl Display for Fp6[src]

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

Formats the value using the given formatter. Read more

impl Field for Fp6[src]

fn random<R: RngCore>(rng: &mut R) -> Self[src]

Returns an element chosen uniformly at random using a user-provided RNG.

fn zero() -> Self[src]

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

fn one() -> Self[src]

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

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

Returns true iff this element is zero.

fn double(&mut self)[src]

Doubles this element.

fn negate(&mut self)[src]

Negates this element.

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

Adds another element to this element.

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

Subtracts another element from this element.

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

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

fn square(&mut self)[src]

Squares this element.

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

Multiplies another element by this element.

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

Computes the multiplicative inverse of this element, if nonzero.

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. Read more

impl From<Fp> for Fp6[src]

fn from(f: Fp) -> Fp6[src]

Performs the conversion.

impl From<Fp2> for Fp6[src]

fn from(f: Fp2) -> Fp6[src]

Performs the conversion.

impl From<Fp6> for Fp12[src]

fn from(f: Fp6) -> Fp12[src]

Performs the conversion.

impl From<blst_fp6> for Fp6[src]

fn from(val: blst_fp6) -> Fp6[src]

Performs the conversion.

impl From<u64> for Fp6[src]

fn from(val: u64) -> Fp6[src]

Performs the conversion.

impl<'a, 'b> Mul<&'b Fp6> for &'a Fp6[src]

type Output = Fp6

The resulting type after applying the * operator.

fn mul(self, rhs: &'b Fp6) -> Fp6[src]

Performs the * operation. Read more

impl<'b> Mul<&'b Fp6> for Fp6[src]

type Output = Fp6

The resulting type after applying the * operator.

fn mul(self, rhs: &'b Fp6) -> Fp6[src]

Performs the * operation. Read more

impl<'a> Mul<Fp6> for &'a Fp6[src]

type Output = Fp6

The resulting type after applying the * operator.

fn mul(self, rhs: Fp6) -> Fp6[src]

Performs the * operation. Read more

impl Mul<Fp6> for Fp6[src]

type Output = Fp6

The resulting type after applying the * operator.

fn mul(self, rhs: Fp6) -> Fp6[src]

Performs the * operation. Read more

impl<'b> MulAssign<&'b Fp6> for Fp6[src]

fn mul_assign(&mut self, rhs: &'b Fp6)[src]

Performs the *= operation. Read more

impl MulAssign<Fp6> for Fp6[src]

fn mul_assign(&mut self, rhs: Fp6)[src]

Performs the *= operation. Read more

impl<'a> Neg for &'a Fp6[src]

type Output = Fp6

The resulting type after applying the - operator.

fn neg(self) -> Fp6[src]

Performs the unary - operation. Read more

impl Neg for Fp6[src]

type Output = Fp6

The resulting type after applying the - operator.

fn neg(self) -> Fp6[src]

Performs the unary - operation. Read more

impl PartialEq<Fp6> for Fp6[src]

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

This method tests for self and other values to be equal, and is used by ==. Read more

#[must_use]
fn ne(&self, other: &Rhs) -> bool
1.0.0[src]

This method tests for !=.

impl Serialize for Fp6[src]

fn serialize<S: Serializer>(&self, s: S) -> Result<S::Ok, S::Error>[src]

Serialize this value into the given Serde serializer. Read more

impl<'a, 'b> Sub<&'b Fp6> for &'a Fp6[src]

type Output = Fp6

The resulting type after applying the - operator.

fn sub(self, rhs: &'b Fp6) -> Fp6[src]

Performs the - operation. Read more

impl<'b> Sub<&'b Fp6> for Fp6[src]

type Output = Fp6

The resulting type after applying the - operator.

fn sub(self, rhs: &'b Fp6) -> Fp6[src]

Performs the - operation. Read more

impl<'a> Sub<Fp6> for &'a Fp6[src]

type Output = Fp6

The resulting type after applying the - operator.

fn sub(self, rhs: Fp6) -> Fp6[src]

Performs the - operation. Read more

impl Sub<Fp6> for Fp6[src]

type Output = Fp6

The resulting type after applying the - operator.

fn sub(self, rhs: Fp6) -> Fp6[src]

Performs the - operation. Read more

impl<'b> SubAssign<&'b Fp6> for Fp6[src]

fn sub_assign(&mut self, rhs: &'b Fp6)[src]

Performs the -= operation. Read more

impl SubAssign<Fp6> for Fp6[src]

fn sub_assign(&mut self, rhs: Fp6)[src]

Performs the -= operation. Read more

impl Copy for Fp6[src]

impl Eq for Fp6[src]

Auto Trait Implementations

impl RefUnwindSafe for Fp6

impl Send for Fp6

impl Sync for Fp6

impl Unpin for Fp6

impl UnwindSafe for Fp6

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

pub fn type_id(&self) -> TypeId[src]

Gets the TypeId of self. Read more

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

pub fn borrow(&self) -> &T[src]

Immutably borrows from an owned value. Read more

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

pub fn borrow_mut(&mut self) -> &mut T[src]

Mutably borrows from an owned value. Read more

impl<T> From<T> for T[src]

pub fn from(t: T) -> T[src]

Performs the conversion.

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

pub fn into(self) -> U[src]

Performs the conversion.

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

pub fn to_owned(&self) -> T[src]

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

pub fn clone_into(&self, target: &mut T)[src]

🔬 This is a nightly-only experimental API. (toowned_clone_into)

recently added

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

impl<T> ToString for T where
    T: Display + ?Sized
[src]

pub default fn to_string(&self) -> String[src]

Converts the given value to a String. Read more

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

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

Performs the conversion.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

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

The type returned in the event of a conversion error.

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

Performs the conversion.

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

pub fn vzip(self) -> V

impl<T> DeserializeOwned for T where
    T: for<'de> Deserialize<'de>, 
[src]