TranscriptSponge

Trait TranscriptSponge 

Source
pub trait TranscriptSponge<F>:
    Clone
    + Send
    + Sync
    + Default
    + Debug {
    // Required methods
    fn absorb_initialization_label(&mut self, label: &str);
    fn absorb(&mut self, elem: F);
    fn absorb_elements(&mut self, elements: &[F]);
    fn squeeze(&mut self) -> F;
    fn squeeze_elements(&mut self, num_elements: usize) -> Vec<F>;
}
Expand description

A TranscriptSponge provides the basic interface for a cryptographic sponge operating on field elements. It is typically used for representing the transcript of an interactive protocol turned non-interactive view Fiat-Shamir.

Required Methods§

Source

fn absorb_initialization_label(&mut self, label: &str)

Absorb the initialization label.

Source

fn absorb(&mut self, elem: F)

Absorb a single field element elem.

Source

fn absorb_elements(&mut self, elements: &[F])

Absorb a list of field elements sequentially.

Source

fn squeeze(&mut self) -> F

Generate a field element by squeezing the sponge. Internal state is modified.

Source

fn squeeze_elements(&mut self, num_elements: usize) -> Vec<F>

Generate a sequence of field elements by squeezing the sponge num_elements times. Internal state is modified.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§