PRP

Trait PRP 

Source
pub trait PRP: BlockSizeUser {
    // Required methods
    fn forward(&self, data: &mut GenericArray<u8, Self::BlockSize>);
    fn inverse(&self, data: &mut GenericArray<u8, Self::BlockSize>);
}
Expand description

Pseudo-random permutation (PRP)

Required Methods§

Source

fn forward(&self, data: &mut GenericArray<u8, Self::BlockSize>)

Forward permutation

Source

fn inverse(&self, data: &mut GenericArray<u8, Self::BlockSize>)

Inverse permutation

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<H, S, B> PRP for Lioness<H, S, B>
where H: Digest + KeyInit, S: StreamCipher + KeyIvInit, B: ArrayLength<u8> + IsGreater<<S as KeySizeUser>::KeySize, Output = B1> + Sub<<S as KeySizeUser>::KeySize>, <H as OutputSizeUser>::OutputSize: IsEqual<<S as KeySizeUser>::KeySize, Output = B1> + Mul<UInt<UInt<UInt<UTerm, B1>, B0>, B0>>, <H as KeySizeUser>::KeySize: IsEqual<<S as KeySizeUser>::KeySize, Output = B1>, <B as Sub<<S as KeySizeUser>::KeySize>>::Output: ArrayLength<u8>, <S as IvSizeUser>::IvSize: Mul<UInt<UInt<UTerm, B1>, B0>>, <<H as OutputSizeUser>::OutputSize as Mul<UInt<UInt<UInt<UTerm, B1>, B0>, B0>>>::Output: ArrayLength<u8>, <<S as IvSizeUser>::IvSize as Mul<UInt<UInt<UTerm, B1>, B0>>>::Output: ArrayLength<u8>,