Struct snarkvm_wasm::fields::Fp6Gadget[][src]

#[must_use]pub struct Fp6Gadget<P, F> where
    P: Fp6Parameters,
    F: PrimeField,
    <P as Fp6Parameters>::Fp2Params: Fp2Parameters,
    <<P as Fp6Parameters>::Fp2Params as Fp2Parameters>::Fp == F, 
{ pub c0: Fp2Gadget<<P as Fp6Parameters>::Fp2Params, F>, pub c1: Fp2Gadget<<P as Fp6Parameters>::Fp2Params, F>, pub c2: Fp2Gadget<<P as Fp6Parameters>::Fp2Params, F>, // some fields omitted }

Fields

c0: Fp2Gadget<<P as Fp6Parameters>::Fp2Params, F>c1: Fp2Gadget<<P as Fp6Parameters>::Fp2Params, F>c2: Fp2Gadget<<P as Fp6Parameters>::Fp2Params, F>

Implementations

impl<P, F> Fp6Gadget<P, F> where
    P: Fp6Parameters,
    F: PrimeField,
    <P as Fp6Parameters>::Fp2Params: Fp2Parameters,
    <<P as Fp6Parameters>::Fp2Params as Fp2Parameters>::Fp == F, 
[src]

pub fn new(
    c0: Fp2Gadget<<P as Fp6Parameters>::Fp2Params, F>,
    c1: Fp2Gadget<<P as Fp6Parameters>::Fp2Params, F>,
    c2: Fp2Gadget<<P as Fp6Parameters>::Fp2Params, F>
) -> Fp6Gadget<P, F>
[src]

pub fn mul_fp2_gadget_by_nonresidue<CS>(
    cs: CS,
    fe: &Fp2Gadget<<P as Fp6Parameters>::Fp2Params, F>
) -> Result<Fp2Gadget<<P as Fp6Parameters>::Fp2Params, F>, SynthesisError> where
    CS: ConstraintSystem<F>, 
[src]

Multiply a Fp2Gadget by cubic nonresidue P::NONRESIDUE.

pub fn mul_by_0_c1_0<CS>(
    &self,
    cs: CS,
    c1: &Fp2Gadget<<P as Fp6Parameters>::Fp2Params, F>
) -> Result<Fp6Gadget<P, F>, SynthesisError> where
    CS: ConstraintSystem<F>, 
[src]

pub fn mul_by_c0_c1_0<CS>(
    &self,
    cs: CS,
    c0: &Fp2Gadget<<P as Fp6Parameters>::Fp2Params, F>,
    c1: &Fp2Gadget<<P as Fp6Parameters>::Fp2Params, F>
) -> Result<Fp6Gadget<P, F>, SynthesisError> where
    CS: ConstraintSystem<F>, 
[src]

Trait Implementations

impl<P, F> AllocGadget<Fp6<P>, F> for Fp6Gadget<P, F> where
    P: Fp6Parameters,
    F: PrimeField,
    <P as Fp6Parameters>::Fp2Params: Fp2Parameters,
    <<P as Fp6Parameters>::Fp2Params as Fp2Parameters>::Fp == F, 
[src]

impl<P, F> Clone for Fp6Gadget<P, F> where
    P: Fp6Parameters,
    F: PrimeField,
    <P as Fp6Parameters>::Fp2Params: Fp2Parameters,
    <<P as Fp6Parameters>::Fp2Params as Fp2Parameters>::Fp == F, 
[src]

impl<P, F> CondSelectGadget<F> for Fp6Gadget<P, F> where
    P: Fp6Parameters,
    F: PrimeField,
    <P as Fp6Parameters>::Fp2Params: Fp2Parameters,
    <<P as Fp6Parameters>::Fp2Params as Fp2Parameters>::Fp == F, 
[src]

impl<P, F> ConditionalEqGadget<F> for Fp6Gadget<P, F> where
    P: Fp6Parameters,
    F: PrimeField,
    <P as Fp6Parameters>::Fp2Params: Fp2Parameters,
    <<P as Fp6Parameters>::Fp2Params as Fp2Parameters>::Fp == F, 
[src]

impl<P, F> Debug for Fp6Gadget<P, F> where
    P: Fp6Parameters,
    F: PrimeField,
    <P as Fp6Parameters>::Fp2Params: Fp2Parameters,
    <<P as Fp6Parameters>::Fp2Params as Fp2Parameters>::Fp == F, 
[src]

impl<P, F> Eq for Fp6Gadget<P, F> where
    P: Fp6Parameters,
    F: PrimeField,
    <P as Fp6Parameters>::Fp2Params: Fp2Parameters,
    <<P as Fp6Parameters>::Fp2Params as Fp2Parameters>::Fp == F, 
[src]

impl<P, F> EqGadget<F> for Fp6Gadget<P, F> where
    P: Fp6Parameters,
    F: PrimeField,
    <P as Fp6Parameters>::Fp2Params: Fp2Parameters,
    <<P as Fp6Parameters>::Fp2Params as Fp2Parameters>::Fp == F, 
[src]

impl<P, F> FieldGadget<Fp6<P>, F> for Fp6Gadget<P, F> where
    P: Fp6Parameters,
    F: PrimeField,
    <P as Fp6Parameters>::Fp2Params: Fp2Parameters,
    <<P as Fp6Parameters>::Fp2Params as Fp2Parameters>::Fp == F, 
[src]

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

pub fn mul<CS>(
    &self,
    cs: CS,
    other: &Fp6Gadget<P, F>
) -> Result<Fp6Gadget<P, F>, SynthesisError> where
    CS: ConstraintSystem<F>, 
[src]

Use the Toom-Cook-3x method to compute multiplication.

pub fn square<CS>(&self, cs: CS) -> Result<Fp6Gadget<P, F>, SynthesisError> where
    CS: ConstraintSystem<F>, 
[src]

Use the Toom-Cook-3x method to compute multiplication.

pub fn mul_by_constant<CS>(
    &self,
    cs: CS,
    other: &Fp6<P>
) -> Result<Fp6Gadget<P, F>, SynthesisError> where
    CS: ConstraintSystem<F>, 
[src]

Use the Toom-Cook-3x method to compute multiplication.

impl<P, F> NEqGadget<F> for Fp6Gadget<P, F> where
    P: Fp6Parameters,
    F: PrimeField,
    <P as Fp6Parameters>::Fp2Params: Fp2Parameters,
    <<P as Fp6Parameters>::Fp2Params as Fp2Parameters>::Fp == F, 
[src]

impl<P, F> PartialEq<Fp6Gadget<P, F>> for Fp6Gadget<P, F> where
    P: Fp6Parameters,
    F: PrimeField,
    <P as Fp6Parameters>::Fp2Params: Fp2Parameters,
    <<P as Fp6Parameters>::Fp2Params as Fp2Parameters>::Fp == F, 
[src]

impl<P, F> ThreeBitCondNegLookupGadget<F> for Fp6Gadget<P, F> where
    P: Fp6Parameters,
    F: PrimeField,
    <P as Fp6Parameters>::Fp2Params: Fp2Parameters,
    <<P as Fp6Parameters>::Fp2Params as Fp2Parameters>::Fp == F, 
[src]

type TableConstant = Fp6<P>

impl<P, F> ToBitsGadget<F> for Fp6Gadget<P, F> where
    P: Fp6Parameters,
    F: PrimeField,
    <P as Fp6Parameters>::Fp2Params: Fp2Parameters,
    <<P as Fp6Parameters>::Fp2Params as Fp2Parameters>::Fp == F, 
[src]

impl<P, F> ToBytesGadget<F> for Fp6Gadget<P, F> where
    P: Fp6Parameters,
    F: PrimeField,
    <P as Fp6Parameters>::Fp2Params: Fp2Parameters,
    <<P as Fp6Parameters>::Fp2Params as Fp2Parameters>::Fp == F, 
[src]

impl<P, F> TwoBitLookupGadget<F> for Fp6Gadget<P, F> where
    P: Fp6Parameters,
    F: PrimeField,
    <P as Fp6Parameters>::Fp2Params: Fp2Parameters,
    <<P as Fp6Parameters>::Fp2Params as Fp2Parameters>::Fp == F, 
[src]

type TableConstant = Fp6<P>

Auto Trait Implementations

impl<P, F> RefUnwindSafe for Fp6Gadget<P, F> where
    F: RefUnwindSafe,
    P: RefUnwindSafe,
    <P as Fp6Parameters>::Fp2Params: RefUnwindSafe

impl<P, F> Send for Fp6Gadget<P, F>

impl<P, F> Sync for Fp6Gadget<P, F>

impl<P, F> Unpin for Fp6Gadget<P, F> where
    F: Unpin,
    P: Unpin,
    <P as Fp6Parameters>::Fp2Params: Unpin

impl<P, F> UnwindSafe for Fp6Gadget<P, F> where
    F: UnwindSafe,
    P: UnwindSafe,
    <P as Fp6Parameters>::Fp2Params: 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<F, T> ConditionalOrEqualsGadget<F> for T where
    T: ConditionalEqGadget<F> + CondSelectGadget<F>,
    F: Field
[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<F, T> OrEqualsGadget<F> for T where
    T: ConditionalOrEqualsGadget<F>,
    F: Field
[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, 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<V, T> VZip<V> for T where
    V: MultiLane<T>,