block_modes

Trait IvState

Source
pub trait IvState<C, P>: BlockMode<C, P>
where C: BlockCipher, P: Padding,
{ // Required method fn iv_state(&self) -> GenericArray<u8, Self::IvSize>; }
Expand description

Trait for a BlockMode, used to obtain the current state in the form of an IV that can initialize a BlockMode later and resume the original operation.

The IV value SHOULD be used for resuming operations only and MUST NOT be exposed to attackers. Failing to comply with this requirement breaks unpredictability and opens attack venues (see e.g. 1, sec. 3.6.2).

Required Methods§

Source

fn iv_state(&self) -> GenericArray<u8, Self::IvSize>

Returns the IV needed to process the following block. This value MUST NOT be exposed to attackers.

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<C, P> IvState<C, P> for Cbc<C, P>

Source§

impl<C, P> IvState<C, P> for Cfb8<C, P>

Source§

impl<C, P> IvState<C, P> for Cfb<C, P>

Source§

impl<C, P> IvState<C, P> for Ige<C, P>
where C: BlockCipher + BlockEncrypt + BlockDecrypt, P: Padding, C::BlockSize: Add, Sum<<C as BlockCipher>::BlockSize, <C as BlockCipher>::BlockSize>: ArrayLength<u8>,

Source§

impl<C, P> IvState<C, P> for Ofb<C, P>

Source§

impl<C, P> IvState<C, P> for Pcbc<C, P>