Struct snarkvm_wasm::Fp2[][src]

pub struct Fp2<P> where
    P: Fp2Parameters
{ pub c0: <P as Fp2Parameters>::Fp, pub c1: <P as Fp2Parameters>::Fp, // some fields omitted }

Fields

c0: <P as Fp2Parameters>::Fpc1: <P as Fp2Parameters>::Fp

Implementations

impl<P> Fp2<P> where
    P: Fp2Parameters
[src]

pub fn new(c0: <P as Fp2Parameters>::Fp, c1: <P as Fp2Parameters>::Fp) -> Fp2<P>[src]

pub fn norm(&self) -> <P as Fp2Parameters>::Fp[src]

Norm of Fp2 over Fp: Norm(a) = a.x^2 - beta * a.y^2

pub fn mul_by_fp(&mut self, element: &<P as Fp2Parameters>::Fp)[src]

Trait Implementations

impl<'a, P> Add<&'a Fp2<P>> for Fp2<P> where
    P: Fp2Parameters
[src]

type Output = Fp2<P>

The resulting type after applying the + operator.

impl<'a, P> AddAssign<&'a Fp2<P>> for Fp2<P> where
    P: Fp2Parameters
[src]

impl<P, F> AllocGadget<Fp2<P>, F> for Fp2Gadget<P, F> where
    P: Fp2Parameters<Fp = F>,
    F: PrimeField
[src]

impl<P> CanonicalDeserialize for Fp2<P> where
    P: Fp2Parameters
[src]

impl<P> CanonicalDeserializeWithFlags for Fp2<P> where
    P: Fp2Parameters
[src]

impl<P> CanonicalSerialize for Fp2<P> where
    P: Fp2Parameters
[src]

impl<P> CanonicalSerializeWithFlags for Fp2<P> where
    P: Fp2Parameters
[src]

impl<P> Clone for Fp2<P> where
    P: Fp2Parameters
[src]

impl<P> ConstantSerializedSize for Fp2<P> where
    P: Fp2Parameters
[src]

impl<P> Copy for Fp2<P> where
    P: Fp2Parameters
[src]

impl<P> Debug for Fp2<P> where
    P: Fp2Parameters
[src]

impl<P> Default for Fp2<P> where
    P: Fp2Parameters
[src]

impl<'de, P> Deserialize<'de> for Fp2<P> where
    P: Fp2Parameters,
    <P as Fp2Parameters>::Fp: Deserialize<'de>, 
[src]

impl<P> Display for Fp2<P> where
    P: Fp2Parameters
[src]

impl<'a, P> Div<&'a Fp2<P>> for Fp2<P> where
    P: Fp2Parameters
[src]

type Output = Fp2<P>

The resulting type after applying the / operator.

impl<'a, P> DivAssign<&'a Fp2<P>> for Fp2<P> where
    P: Fp2Parameters
[src]

impl<P> Eq for Fp2<P> where
    P: Fp2Parameters
[src]

impl<P> Field for Fp2<P> where
    P: Fp2Parameters
[src]

impl<P, F> FieldGadget<Fp2<P>, F> for Fp2Gadget<P, F> where
    P: Fp2Parameters<Fp = F>,
    F: PrimeField
[src]

type Variable = (ConstraintVariable<F>, ConstraintVariable<F>)

impl<P> From<u128> for Fp2<P> where
    P: Fp2Parameters
[src]

impl<P> From<u16> for Fp2<P> where
    P: Fp2Parameters
[src]

impl<P> From<u32> for Fp2<P> where
    P: Fp2Parameters
[src]

impl<P> From<u64> for Fp2<P> where
    P: Fp2Parameters
[src]

impl<P> From<u8> for Fp2<P> where
    P: Fp2Parameters
[src]

impl<P> FromBytes for Fp2<P> where
    P: Fp2Parameters
[src]

impl<P> Hash for Fp2<P> where
    P: Fp2Parameters
[src]

impl<'a, P> Mul<&'a Fp2<P>> for Fp2<P> where
    P: Fp2Parameters
[src]

type Output = Fp2<P>

The resulting type after applying the * operator.

impl<'a, P> MulAssign<&'a Fp2<P>> for Fp2<P> where
    P: Fp2Parameters
[src]

impl<P> Neg for Fp2<P> where
    P: Fp2Parameters
[src]

type Output = Fp2<P>

The resulting type after applying the - operator.

impl<P> One for Fp2<P> where
    P: Fp2Parameters
[src]

impl<P> Ord for Fp2<P> where
    P: Fp2Parameters
[src]

Fp2 elements are ordered lexicographically.

impl<P> PartialEq<Fp2<P>> for Fp2<P> where
    P: Fp2Parameters
[src]

impl<P> PartialOrd<Fp2<P>> for Fp2<P> where
    P: Fp2Parameters
[src]

impl<P> Serialize for Fp2<P> where
    P: Fp2Parameters,
    <P as Fp2Parameters>::Fp: Serialize
[src]

impl<'a, P> SquareRootField for Fp2<P> where
    P: Fp2Parameters,
    <P as Fp2Parameters>::Fp: SquareRootField
[src]

impl<'a, P> Sub<&'a Fp2<P>> for Fp2<P> where
    P: Fp2Parameters
[src]

type Output = Fp2<P>

The resulting type after applying the - operator.

impl<'a, P> SubAssign<&'a Fp2<P>> for Fp2<P> where
    P: Fp2Parameters
[src]

impl<P> ToBytes for Fp2<P> where
    P: Fp2Parameters
[src]

impl<P> ToConstraintField<<P as Fp2Parameters>::Fp> for Fp2<P> where
    P: Fp2Parameters
[src]

impl<P> Zero for Fp2<P> where
    P: Fp2Parameters
[src]

Auto Trait Implementations

impl<P> RefUnwindSafe for Fp2<P> where
    P: RefUnwindSafe,
    <P as Fp2Parameters>::Fp: RefUnwindSafe

impl<P> Send for Fp2<P>

impl<P> Sync for Fp2<P>

impl<P> Unpin for Fp2<P> where
    P: Unpin,
    <P as Fp2Parameters>::Fp: Unpin

impl<P> UnwindSafe for Fp2<P> where
    P: UnwindSafe,
    <P as Fp2Parameters>::Fp: UnwindSafe

Blanket Implementations

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

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

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

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

impl<Q, K> Equivalent<K> for Q where
    K: Borrow<Q> + ?Sized,
    Q: Eq + ?Sized
[src]

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

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

impl<T> Pointable for T

type Init = T

The type for initializers.

impl<T> Same<T> for T

type Output = T

Should always be Self

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

type Owned = T

The resulting type after obtaining ownership.

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

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.

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.

impl<T> UniformRand for T where
    Standard: Distribution<T>, 
[src]

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