Trait snarkvm_wasm::ConditionalEqGadget [−][src]
pub trait ConditionalEqGadget<F>: Eq where
F: Field, { fn conditional_enforce_equal<CS>(
&self,
cs: CS,
other: &Self,
condition: &Boolean
) -> Result<(), SynthesisError>
where
CS: ConstraintSystem<F>; fn cost() -> usize; }
Expand description
If condition == 1, then enforces that self and other are equal;
otherwise, it doesn’t enforce anything.
Required methods
fn conditional_enforce_equal<CS>(
&self,
cs: CS,
other: &Self,
condition: &Boolean
) -> Result<(), SynthesisError> where
CS: ConstraintSystem<F>, [src]Implementations on Foreign Types
pub fn conditional_enforce_equal<CS>(
&self,
cs: CS,
other: &[T],
condition: &Boolean
) -> Result<(), SynthesisError> where
CS: ConstraintSystem<F>, [src]Implementors
pub fn conditional_enforce_equal<CS>(
&self,
cs: CS,
other: &Boolean,
condition: &Boolean
) -> Result<(), SynthesisError> where
CS: ConstraintSystem<F>, [src]pub fn conditional_enforce_equal<CS>(
&self,
cs: CS,
other: &FpGadget<F>,
condition: &Boolean
) -> Result<(), SynthesisError> where
CS: ConstraintSystem<F>, [src]pub fn conditional_enforce_equal<CS>(
&self,
cs: CS,
other: &Blake2sOutputGadget,
condition: &Boolean
) -> Result<(), SynthesisError> where
CS: ConstraintSystem<F>, [src]pub fn conditional_enforce_equal<CS>(
&self,
cs: CS,
other: &AllocatedFp<F>,
condition: &Boolean
) -> Result<(), SynthesisError> where
CS: ConstraintSystem<F>, [src]pub fn conditional_enforce_equal<CS>(
&self,
cs: CS,
other: &Int8,
condition: &Boolean
) -> Result<(), SynthesisError> where
CS: ConstraintSystem<F>, [src]pub fn conditional_enforce_equal<CS>(
&self,
cs: CS,
other: &Int16,
condition: &Boolean
) -> Result<(), SynthesisError> where
CS: ConstraintSystem<F>, [src]pub fn conditional_enforce_equal<CS>(
&self,
cs: CS,
other: &Int32,
condition: &Boolean
) -> Result<(), SynthesisError> where
CS: ConstraintSystem<F>, [src]pub fn conditional_enforce_equal<CS>(
&self,
cs: CS,
other: &Int64,
condition: &Boolean
) -> Result<(), SynthesisError> where
CS: ConstraintSystem<F>, [src]pub fn conditional_enforce_equal<CS>(
&self,
cs: CS,
other: &Int128,
condition: &Boolean
) -> Result<(), SynthesisError> where
CS: ConstraintSystem<F>, [src]pub fn conditional_enforce_equal<CS>(
&self,
cs: CS,
other: &UInt8,
condition: &Boolean
) -> Result<(), SynthesisError> where
CS: ConstraintSystem<F>, [src]pub fn conditional_enforce_equal<CS>(
&self,
cs: CS,
other: &UInt16,
condition: &Boolean
) -> Result<(), SynthesisError> where
CS: ConstraintSystem<F>, [src]pub fn conditional_enforce_equal<CS>(
&self,
cs: CS,
other: &UInt32,
condition: &Boolean
) -> Result<(), SynthesisError> where
CS: ConstraintSystem<F>, [src]pub fn conditional_enforce_equal<CS>(
&self,
cs: CS,
other: &UInt64,
condition: &Boolean
) -> Result<(), SynthesisError> where
CS: ConstraintSystem<F>, [src]pub fn conditional_enforce_equal<CS>(
&self,
cs: CS,
other: &UInt128,
condition: &Boolean
) -> Result<(), SynthesisError> where
CS: ConstraintSystem<F>, [src]impl<G, F, GG> ConditionalEqGadget<F> for GroupEncryptionCiphertextGadget<G, F, GG> where
G: Group + ProjectiveCurve,
F: Field,
GG: CompressedGroupGadget<G, F>, [src]
impl<G, F, GG> ConditionalEqGadget<F> for GroupEncryptionCiphertextGadget<G, F, GG> where
G: Group + ProjectiveCurve,
F: Field,
GG: CompressedGroupGadget<G, F>, [src]pub fn conditional_enforce_equal<CS>(
&self,
cs: CS,
other: &GroupEncryptionCiphertextGadget<G, F, GG>,
condition: &Boolean
) -> Result<(), SynthesisError> where
CS: ConstraintSystem<F>, [src]impl<G, F, GG> ConditionalEqGadget<F> for GroupEncryptionPlaintextGadget<G, F, GG> where
G: Group,
F: Field,
GG: GroupGadget<G, F>, [src]
impl<G, F, GG> ConditionalEqGadget<F> for GroupEncryptionPlaintextGadget<G, F, GG> where
G: Group,
F: Field,
GG: GroupGadget<G, F>, [src]pub fn conditional_enforce_equal<CS>(
&self,
cs: CS,
other: &GroupEncryptionPlaintextGadget<G, F, GG>,
condition: &Boolean
) -> Result<(), SynthesisError> where
CS: ConstraintSystem<F>, [src]impl<G, F, GG> ConditionalEqGadget<F> for GroupEncryptionPublicKeyGadget<G, F, GG> where
G: Group,
F: Field,
GG: GroupGadget<G, F>, [src]
impl<G, F, GG> ConditionalEqGadget<F> for GroupEncryptionPublicKeyGadget<G, F, GG> where
G: Group,
F: Field,
GG: GroupGadget<G, F>, [src]pub fn conditional_enforce_equal<CS>(
&self,
cs: CS,
other: &GroupEncryptionPublicKeyGadget<G, F, GG>,
condition: &Boolean
) -> Result<(), SynthesisError> where
CS: ConstraintSystem<F>, [src]impl<G, F, GG> ConditionalEqGadget<F> for SchnorrPublicKeyGadget<G, F, GG> where
G: Group,
F: Field,
GG: GroupGadget<G, F>, [src]
impl<G, F, GG> ConditionalEqGadget<F> for SchnorrPublicKeyGadget<G, F, GG> where
G: Group,
F: Field,
GG: GroupGadget<G, F>, [src]pub fn conditional_enforce_equal<CS>(
&self,
cs: CS,
other: &SchnorrPublicKeyGadget<G, F, GG>,
condition: &Boolean
) -> Result<(), SynthesisError> where
CS: ConstraintSystem<F>, [src]impl<P> ConditionalEqGadget<<P as Bls12Parameters>::Fp> for G1PreparedGadget<P> where
P: Bls12Parameters, [src]
impl<P> ConditionalEqGadget<<P as Bls12Parameters>::Fp> for G1PreparedGadget<P> where
P: Bls12Parameters, [src]pub fn conditional_enforce_equal<CS>(
&self,
cs: CS,
other: &G1PreparedGadget<P>,
condition: &Boolean
) -> Result<(), SynthesisError> where
CS: ConstraintSystem<<P as Bls12Parameters>::Fp>, [src]impl<P> ConditionalEqGadget<<P as Bls12Parameters>::Fp> for G2PreparedGadget<P> where
P: Bls12Parameters, [src]
impl<P> ConditionalEqGadget<<P as Bls12Parameters>::Fp> for G2PreparedGadget<P> where
P: Bls12Parameters, [src]pub fn conditional_enforce_equal<CS>(
&self,
cs: CS,
other: &G2PreparedGadget<P>,
condition: &Boolean
) -> Result<(), SynthesisError> where
CS: ConstraintSystem<<P as Bls12Parameters>::Fp>, [src]impl<P, F> ConditionalEqGadget<F> for Fp2Gadget<P, F> where
P: Fp2Parameters<Fp = F>,
F: PrimeField, [src]
impl<P, F> ConditionalEqGadget<F> for Fp2Gadget<P, F> where
P: Fp2Parameters<Fp = F>,
F: PrimeField, [src]pub fn conditional_enforce_equal<CS>(
&self,
cs: CS,
other: &Fp2Gadget<P, F>,
condition: &Boolean
) -> Result<(), SynthesisError> where
CS: ConstraintSystem<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> 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]pub fn conditional_enforce_equal<CS>(
&self,
cs: CS,
other: &Fp6Gadget<P, F>,
condition: &Boolean
) -> Result<(), SynthesisError> where
CS: ConstraintSystem<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> 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]pub fn conditional_enforce_equal<CS>(
&self,
cs: CS,
other: &Fp12Gadget<P, F>,
condition: &Boolean
) -> Result<(), SynthesisError> where
CS: ConstraintSystem<F>, [src]impl<P, F, FG> ConditionalEqGadget<F> for snarkvm_wasm::curves::templates::bls12::AffineGadget<P, F, FG> where
P: SWModelParameters,
F: Field,
FG: FieldGadget<<P as ModelParameters>::BaseField, F>, [src]
impl<P, F, FG> ConditionalEqGadget<F> for snarkvm_wasm::curves::templates::bls12::AffineGadget<P, F, FG> where
P: SWModelParameters,
F: Field,
FG: FieldGadget<<P as ModelParameters>::BaseField, F>, [src]pub fn conditional_enforce_equal<CS>(
&self,
cs: CS,
other: &AffineGadget<P, F, FG>,
condition: &Boolean
) -> Result<(), SynthesisError> where
CS: ConstraintSystem<F>, [src]impl<P, F, FG> ConditionalEqGadget<F> for snarkvm_wasm::curves::templates::twisted_edwards::AffineGadget<P, F, FG> where
P: TEModelParameters,
F: Field,
FG: FieldGadget<<P as ModelParameters>::BaseField, F>, [src]
impl<P, F, FG> ConditionalEqGadget<F> for snarkvm_wasm::curves::templates::twisted_edwards::AffineGadget<P, F, FG> where
P: TEModelParameters,
F: Field,
FG: FieldGadget<<P as ModelParameters>::BaseField, F>, [src]pub fn conditional_enforce_equal<CS>(
&self,
cs: CS,
other: &AffineGadget<P, F, FG>,
condition: &Boolean
) -> Result<(), SynthesisError> where
CS: ConstraintSystem<F>, [src]impl<TargetField, BaseField> ConditionalEqGadget<BaseField> for NonNativeFieldVar<TargetField, BaseField> where
BaseField: PrimeField,
TargetField: PrimeField, [src]
impl<TargetField, BaseField> ConditionalEqGadget<BaseField> for NonNativeFieldVar<TargetField, BaseField> where
BaseField: PrimeField,
TargetField: PrimeField, [src]pub fn conditional_enforce_equal<CS>(
&self,
cs: CS,
other: &NonNativeFieldVar<TargetField, BaseField>,
condition: &Boolean
) -> Result<(), SynthesisError> where
CS: ConstraintSystem<BaseField>, [src]