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

pub trait AlgebraicSpongeVar<BaseField: PrimeField, PS: AlgebraicSponge<BaseField>>: Clone {
    fn new<CS: ConstraintSystem<BaseField>>(cs: CS) -> Self;
fn constant<CS: ConstraintSystem<BaseField>>(cs: CS, ps: &PS) -> Self;
fn absorb<CS: ConstraintSystem<BaseField>>(
        &mut self,
        cs: CS,
        elems: &[FpGadget<BaseField>]
    ) -> Result<(), SynthesisError>;
fn squeeze<CS: ConstraintSystem<BaseField>>(
        &mut self,
        cs: CS,
        num: usize
    ) -> Result<Vec<FpGadget<BaseField>>, SynthesisError>; }
Expand description

Trait for an algebraic sponge such as Poseidon.

Required methods

Create the new sponge.

Instantiate from a plaintext sponge.

Take in field elements.

Output field elements.

Implementors