p3_symmetric

Trait PseudoCompressionFunction

Source
pub trait PseudoCompressionFunction<T, const N: usize>: Clone {
    // Required method
    fn compress(&self, input: [T; N]) -> T;
}
Expand description

An N-to-1 compression function collision-resistant in a hash tree setting.

Unlike CompressionFunction, it may not be collision-resistant in general. Instead it is only collision-resistant in hash-tree like settings where the preimage of a non-leaf node must consist of compression outputs.

Required Methods§

Source

fn compress(&self, input: [T; N]) -> T

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§

Source§

impl<T, H, const N: usize, const CHUNK: usize> PseudoCompressionFunction<[T; CHUNK], N> for CompressionFunctionFromHasher<H, N, CHUNK>

Source§

impl<T, InnerP, const N: usize, const CHUNK: usize, const WIDTH: usize> PseudoCompressionFunction<[T; CHUNK], N> for TruncatedPermutation<InnerP, N, CHUNK, WIDTH>