Trait snarkvm_marlin::fiat_shamir::traits::FiatShamirRngVar[][src]

pub trait FiatShamirRngVar<TargetField: PrimeField, BaseField: PrimeField, PFS: FiatShamirRng<TargetField, BaseField>>: Clone {
    fn new<CS: ConstraintSystem<BaseField>>(cs: CS) -> Self;
fn constant<CS: ConstraintSystem<BaseField>>(cs: CS, pfs: &PFS) -> Self;
fn absorb_nonnative_field_elements<CS: ConstraintSystem<BaseField>>(
        &mut self,
        cs: CS,
        elems: &[NonNativeFieldVar<TargetField, BaseField>],
        ty: OptimizationType
    ) -> Result<(), SynthesisError>;
fn absorb_native_field_elements<CS: ConstraintSystem<BaseField>>(
        &mut self,
        cs: CS,
        elems: &[FpGadget<BaseField>]
    ) -> Result<(), SynthesisError>;
fn absorb_bytes<CS: ConstraintSystem<BaseField>>(
        &mut self,
        cs: CS,
        elems: &[UInt8]
    ) -> Result<(), SynthesisError>;
fn squeeze_native_field_elements<CS: ConstraintSystem<BaseField>>(
        &mut self,
        cs: CS,
        num: usize
    ) -> Result<Vec<FpGadget<BaseField>>, SynthesisError>;
fn squeeze_field_elements<CS: ConstraintSystem<BaseField>>(
        &mut self,
        cs: CS,
        num: usize
    ) -> Result<Vec<NonNativeFieldVar<TargetField, BaseField>>, SynthesisError>;
fn squeeze_field_elements_and_bits<CS: ConstraintSystem<BaseField>>(
        &mut self,
        cs: CS,
        num: usize
    ) -> Result<(Vec<NonNativeFieldVar<TargetField, BaseField>>, Vec<Vec<Boolean>>), SynthesisError>;
fn squeeze_128_bits_field_elements<CS: ConstraintSystem<BaseField>>(
        &mut self,
        cs: CS,
        num: usize
    ) -> Result<Vec<NonNativeFieldVar<TargetField, BaseField>>, SynthesisError>;
fn squeeze_128_bits_field_elements_and_bits<CS: ConstraintSystem<BaseField>>(
        &mut self,
        cs: CS,
        num: usize
    ) -> Result<(Vec<NonNativeFieldVar<TargetField, BaseField>>, Vec<Vec<Boolean>>), SynthesisError>; }
Expand description

Constraints for a RNG for use in a Fiat-Shamir transform.

Required methods

Create a new RNG.

Instantiate from a plaintext fs_rng.

Take in field elements.

Take in field elements.

Take in bytes.

Output field elements.

Output field elements.

Output field elements and the corresponding bits (this can reduce repeated computation).

Output field elements with only 128 bits.

Output field elements with only 128 bits, and the corresponding bits (this can reduce repeated computation).

Implementors