Struct snarkvm_wasm::fields::Fp12Gadget[][src]

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

Fields

c0: Fp6Gadget<<P as Fp12Parameters>::Fp6Params, F>c1: Fp6Gadget<<P as Fp12Parameters>::Fp6Params, F>

Implementations

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

pub fn new(
    c0: Fp6Gadget<<P as Fp12Parameters>::Fp6Params, F>,
    c1: Fp6Gadget<<P as Fp12Parameters>::Fp6Params, F>
) -> Fp12Gadget<P, F>
[src]

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

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

Multiplies by an element of the form (c0 = (c0, c1, 0), c1 = (0, d1, 0))

pub fn mul_by_034<CS>(
    &self,
    cs: CS,
    c0: &Fp2Gadget<<<P as Fp12Parameters>::Fp6Params as Fp6Parameters>::Fp2Params, F>,
    d0: &Fp2Gadget<<<P as Fp12Parameters>::Fp6Params as Fp6Parameters>::Fp2Params, F>,
    d1: &Fp2Gadget<<<P as Fp12Parameters>::Fp6Params as Fp6Parameters>::Fp2Params, F>
) -> Result<Fp12Gadget<P, F>, SynthesisError> where
    CS: ConstraintSystem<F>, 
[src]

Multiplies by an element of the form (c0 = (c0, 0, 0), c1 = (d0, d1, 0))

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

pub fn cyclotomic_exp<CS, S>(
    &self,
    cs: CS,
    exp: S
) -> Result<Fp12Gadget<P, F>, SynthesisError> where
    CS: ConstraintSystem<F>,
    S: AsRef<[u64]>, 
[src]

Trait Implementations

impl<P, F> AllocGadget<Fp12<P>, F> for Fp12Gadget<P, F> where
    P: Fp12Parameters,
    F: PrimeField,
    <<P as Fp12Parameters>::Fp6Params as Fp6Parameters>::Fp2Params: Fp2Parameters,
    <<<P as Fp12Parameters>::Fp6Params as Fp6Parameters>::Fp2Params as Fp2Parameters>::Fp == F, 
[src]

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

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

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

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

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

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

impl<P, F> FieldGadget<Fp12<P>, F> for Fp12Gadget<P, F> where
    P: Fp12Parameters,
    F: PrimeField,
    <<P as Fp12Parameters>::Fp6Params as Fp6Parameters>::Fp2Params: Fp2Parameters,
    <<<P as Fp12Parameters>::Fp6Params as Fp6Parameters>::Fp2Params as Fp2Parameters>::Fp == F, 
[src]

type Variable = (<Fp6Gadget<<P as Fp12Parameters>::Fp6Params, F> as FieldGadget<Fp6<<P as Fp12Parameters>::Fp6Params>, F>>::Variable, <Fp6Gadget<<P as Fp12Parameters>::Fp6Params, F> as FieldGadget<Fp6<<P as Fp12Parameters>::Fp6Params>, F>>::Variable)

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

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

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

type TableConstant = Fp12<P>

impl<P, F> ToBitsBEGadget<F> for Fp12Gadget<P, F> where
    P: Fp12Parameters,
    F: PrimeField,
    <<P as Fp12Parameters>::Fp6Params as Fp6Parameters>::Fp2Params: Fp2Parameters,
    <<<P as Fp12Parameters>::Fp6Params as Fp6Parameters>::Fp2Params as Fp2Parameters>::Fp == F, 
[src]

impl<P, F> ToBitsLEGadget<F> for Fp12Gadget<P, F> where
    P: Fp12Parameters,
    F: PrimeField,
    <<P as Fp12Parameters>::Fp6Params as Fp6Parameters>::Fp2Params: Fp2Parameters,
    <<<P as Fp12Parameters>::Fp6Params as Fp6Parameters>::Fp2Params as Fp2Parameters>::Fp == F, 
[src]

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

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

type TableConstant = Fp12<P>

Auto Trait Implementations

impl<P, F> RefUnwindSafe for Fp12Gadget<P, F> where
    F: RefUnwindSafe,
    P: RefUnwindSafe,
    <<P as Fp12Parameters>::Fp6Params as Fp6Parameters>::Fp2Params: RefUnwindSafe,
    <P as Fp12Parameters>::Fp6Params: RefUnwindSafe

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

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

impl<P, F> Unpin for Fp12Gadget<P, F> where
    F: Unpin,
    P: Unpin,
    <<P as Fp12Parameters>::Fp6Params as Fp6Parameters>::Fp2Params: Unpin,
    <P as Fp12Parameters>::Fp6Params: Unpin

impl<P, F> UnwindSafe for Fp12Gadget<P, F> where
    F: UnwindSafe,
    P: UnwindSafe,
    <<P as Fp12Parameters>::Fp6Params as Fp6Parameters>::Fp2Params: UnwindSafe,
    <P as Fp12Parameters>::Fp6Params: 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>,