anemoi

Trait Jive

Source
pub trait Jive<F: Field> {
    // Required methods
    fn compress(elems: &[F]) -> Vec<F>;
    fn compress_k(elems: &[F], k: usize) -> Vec<F>;
}
Expand description

Trait for implementing a Jive compression function instantiation.

Required Methods§

Source

fn compress(elems: &[F]) -> Vec<F>

Compresses the provided field element slice as input by 2.

The slice must be of the same length than the underlying hash state.

Source

fn compress_k(elems: &[F], k: usize) -> Vec<F>

Compresses the provided field element slice as input by a factor k.

The slice must be of the same length than the underlying hash state.

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§