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 PseudoCompressionFunction<GenericArray<u8, <CoreWrapper<CtVariableCoreWrapper<GroestlShortVarCore, UInt<UInt<UInt<UInt<UInt<UInt<UTerm, B1>, B0>, B0>, B0>, B0>, B0>>> as OutputSizeUser>::OutputSize>, 2> for Groestl256ByteCompression

Source§

impl PseudoCompressionFunction<GenericArray<u8, <CoreWrapper<CtVariableCoreWrapper<Sha256VarCore, UInt<UInt<UInt<UInt<UInt<UInt<UTerm, B1>, B0>, B0>, B0>, B0>, B0>, OidSha256>> as OutputSizeUser>::OutputSize>, 2> for Sha256Compression

Source§

impl<F> PseudoCompressionFunction<<ScaledUnderlier<M128, 2> as PackScalar<F>>::Packed, 2> for GroestlDigestCompression<F>