Trait snarkvm_wasm::bits::ToBytesGadget [−][src]
pub trait ToBytesGadget<F> where
F: Field, { fn to_bytes<CS>(&self, cs: CS) -> Result<Vec<UInt8, Global>, SynthesisError>
where
CS: ConstraintSystem<F>; fn to_bytes_strict<CS>(
&self,
cs: CS
) -> Result<Vec<UInt8, Global>, SynthesisError>
where
CS: ConstraintSystem<F>; }
Required methods
fn to_bytes<CS>(&self, cs: CS) -> Result<Vec<UInt8, Global>, SynthesisError> where
CS: ConstraintSystem<F>, fn to_bytes_strict<CS>(
&self,
cs: CS
) -> Result<Vec<UInt8, Global>, SynthesisError> where
CS: ConstraintSystem<F>,
fn to_bytes_strict<CS>(
&self,
cs: CS
) -> Result<Vec<UInt8, Global>, SynthesisError> where
CS: ConstraintSystem<F>, Additionally checks if the produced list of booleans is ‘valid’.
Implementations on Foreign Types
pub fn to_bytes<CS>(
&self,
_cs: CS
) -> Result<Vec<UInt8, Global>, SynthesisError> where
CS: ConstraintSystem<F>, pub fn to_bytes_strict<CS>(
&self,
cs: CS
) -> Result<Vec<UInt8, Global>, SynthesisError> where
CS: ConstraintSystem<F>, pub fn to_bytes<CS>(
&self,
_cs: CS
) -> Result<Vec<UInt8, Global>, SynthesisError> where
CS: ConstraintSystem<F>, pub fn to_bytes_strict<CS>(
&self,
cs: CS
) -> Result<Vec<UInt8, Global>, SynthesisError> where
CS: ConstraintSystem<F>, pub fn to_bytes<CS>(&self, cs: CS) -> Result<Vec<UInt8, Global>, SynthesisError> where
CS: ConstraintSystem<F>, pub fn to_bytes_strict<CS>(
&self,
cs: CS
) -> Result<Vec<UInt8, Global>, SynthesisError> where
CS: ConstraintSystem<F>, pub fn to_bytes<CS>(
&self,
_cs: CS
) -> Result<Vec<UInt8, Global>, SynthesisError> where
CS: ConstraintSystem<F>, pub fn to_bytes_strict<CS>(
&self,
cs: CS
) -> Result<Vec<UInt8, Global>, SynthesisError> where
CS: ConstraintSystem<F>, Implementors
impl<G, F> ToBytesGadget<F> for GroupEncryptionPrivateKeyGadget<G> where
G: Group,
F: PrimeField, impl<G, F, GG> ToBytesGadget<F> for GroupEncryptionCiphertextGadget<G, F, GG> where
G: Group + ProjectiveCurve,
F: Field,
GG: CompressedGroupGadget<G, F>, impl<G, F, GG> ToBytesGadget<F> for GroupEncryptionPublicKeyGadget<G, F, GG> where
G: Group + ProjectiveCurve,
F: Field,
GG: CompressedGroupGadget<G, F>, impl<G, F, GG> ToBytesGadget<F> for SchnorrPublicKeyGadget<G, F, GG> where
G: Group,
F: Field,
GG: GroupGadget<G, F>, impl<P> ToBytesGadget<<P as Bls12Parameters>::Fp> for G1PreparedGadget<P> where
P: Bls12Parameters, impl<P> ToBytesGadget<<P as Bls12Parameters>::Fp> for G2PreparedGadget<P> where
P: Bls12Parameters, impl<P, F> ToBytesGadget<F> for Elligator2FieldGadget<P, F> where
P: MontgomeryModelParameters,
F: PrimeField, 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, 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, impl<P, F, FG> ToBytesGadget<F> for snarkvm_wasm::curves::templates::bls12::AffineGadget<P, F, FG> where
P: SWModelParameters,
F: Field,
FG: FieldGadget<<P as ModelParameters>::BaseField, F>, impl<P, F, FG> ToBytesGadget<F> for snarkvm_wasm::curves::templates::twisted_edwards::AffineGadget<P, F, FG> where
P: TEModelParameters,
F: Field,
FG: FieldGadget<<P as ModelParameters>::BaseField, F>, impl<Pairing, F, P> ToBytesGadget<F> for GM17VerifyingKeyGadget<Pairing, F, P> where
P: PairingGadget<Pairing, F>,
F: Field,
Pairing: PairingEngine, impl<PairingE, ConstraintF, P> ToBytesGadget<ConstraintF> for VerifyingKeyGadget<PairingE, ConstraintF, P> where
P: PairingGadget<PairingE, ConstraintF>,
PairingE: PairingEngine,
ConstraintF: Field, impl<TargetCurve, BaseCurve, PG> ToBytesGadget<<BaseCurve as PairingEngine>::Fr> for CommitmentVar<TargetCurve, BaseCurve, PG> where
TargetCurve: PairingEngine,
BaseCurve: PairingEngine,
PG: PairingGadget<TargetCurve, <BaseCurve as PairingEngine>::Fr>,
<TargetCurve as PairingEngine>::G1Affine: ToConstraintField<<BaseCurve as PairingEngine>::Fr>,
<TargetCurve as PairingEngine>::G2Affine: ToConstraintField<<BaseCurve as PairingEngine>::Fr>, impl<TargetCurve, BaseCurve, PG> ToBytesGadget<<BaseCurve as PairingEngine>::Fr> for VerifierKeyVar<TargetCurve, BaseCurve, PG> where
TargetCurve: PairingEngine,
BaseCurve: PairingEngine,
PG: PairingGadget<TargetCurve, <BaseCurve as PairingEngine>::Fr>, impl<TargetField, BaseField> ToBytesGadget<BaseField> for NonNativeFieldVar<TargetField, BaseField> where
BaseField: PrimeField,
TargetField: PrimeField, impl<TargetField, BaseField> ToBytesGadget<BaseField> for AllocatedNonNativeFieldVar<TargetField, BaseField> where
BaseField: PrimeField,
TargetField: PrimeField,