pub trait AlgebraicSpongeVar<CF, S, const RATE: usize, const CAPACITY: usize>: Clone where
    CF: PrimeField,
    S: AlgebraicSponge<CF, RATE, CAPACITY>, 
{ type Parameters; fn with_parameters<CS>(
        cs: CS,
        params: &<S as AlgebraicSponge<CF, RATE, CAPACITY>>::Parameters
    ) -> Self
    where
        CS: ConstraintSystem<CF>
;
fn constant<CS>(cs: CS, sponge: &S) -> Self
    where
        CS: ConstraintSystem<CF>
;
fn absorb<'a, CS, I>(
        &mut self,
        cs: CS,
        input: I
    ) -> Result<(), SynthesisError>
    where
        CS: ConstraintSystem<CF>,
        I: Iterator<Item = &'a FpGadget<CF>>
;
fn squeeze_field_elements<CS>(
        &mut self,
        cs: CS,
        num_elements: usize
    ) -> Result<Vec<FpGadget<CF>, Global>, SynthesisError>
    where
        CS: ConstraintSystem<CF>
; }
Expand description

The interface for a cryptographic sponge constraints on field CF. A sponge can absorb or take in inputs and later squeeze or output bytes or field elements. The outputs are dependent on previous absorb and squeeze calls.

Associated Types

Parameters used by the sponge.

Required methods

Initialize a new instance of the sponge.

Absorb an input into the sponge.

Squeeze num_elements field elements from the sponge.

Implementors