Struct gost_modes::GostOfb[][src]

pub struct GostOfb<C, Z = U1, S = <C as BlockCipher>::BlockSize> where
    C: BlockCipher + BlockEncrypt + NewBlockCipher,
    C::BlockSize: IsLessOrEqual<U255>,
    S: Unsigned + IsGreater<U0> + IsLessOrEqual<C::BlockSize>,
    Z: ArrayLength<Block<C>> + Unsigned + Mul<C::BlockSize> + IsGreater<U0> + IsLessOrEqual<U255>,
    Prod<Z, C::BlockSize>: ArrayLength<u8>, 
{ /* fields omitted */ }

Output feedback (OFB) mode of operation as defined in GOST R 34.13-2015

Type parameters:

  • C: block cipher.
  • Z: nonce length in block sizes. Default: 1.
  • S: number of block bytes used for message encryption. Default: block size.

With default parameters this mode is fully equivalent to the Ofb mode defined in the block-modes crate.

Trait Implementations

impl<C: Clone, Z: Clone, S: Clone> Clone for GostOfb<C, Z, S> where
    C: BlockCipher + BlockEncrypt + NewBlockCipher,
    C::BlockSize: IsLessOrEqual<U255>,
    S: Unsigned + IsGreater<U0> + IsLessOrEqual<C::BlockSize>,
    Z: ArrayLength<Block<C>> + Unsigned + Mul<C::BlockSize> + IsGreater<U0> + IsLessOrEqual<U255>,
    Prod<Z, C::BlockSize>: ArrayLength<u8>, 
[src]

impl<C, Z, S> FromBlockCipher for GostOfb<C, Z, S> where
    C: BlockCipher + BlockEncrypt + NewBlockCipher,
    C::BlockSize: IsLessOrEqual<U255>,
    S: Unsigned + IsGreater<U0> + IsLessOrEqual<C::BlockSize>,
    Z: ArrayLength<Block<C>> + Unsigned + Mul<C::BlockSize> + IsGreater<U0> + IsLessOrEqual<U255>,
    Prod<Z, C::BlockSize>: ArrayLength<u8>, 
[src]

type BlockCipher = C

Block cipher

type NonceSize = Prod<Z, C::BlockSize>

Nonce size in bytes

impl<C, Z, S> StreamCipher for GostOfb<C, Z, S> where
    C: BlockCipher + BlockEncrypt + NewBlockCipher,
    C::BlockSize: IsLessOrEqual<U255>,
    S: Unsigned + IsGreater<U0> + IsLessOrEqual<C::BlockSize>,
    Z: ArrayLength<Block<C>> + Unsigned + Mul<C::BlockSize> + IsGreater<U0> + IsLessOrEqual<U255>,
    Prod<Z, C::BlockSize>: ArrayLength<u8>, 
[src]

Auto Trait Implementations

impl<C, Z, S> RefUnwindSafe for GostOfb<C, Z, S> where
    C: RefUnwindSafe,
    S: RefUnwindSafe,
    <Z as ArrayLength<GenericArray<u8, <C as BlockCipher>::BlockSize>>>::ArrayType: RefUnwindSafe

impl<C, Z, S> Send for GostOfb<C, Z, S> where
    C: Send,
    S: Send

impl<C, Z, S> Sync for GostOfb<C, Z, S> where
    C: Sync,
    S: Sync

impl<C, Z, S> Unpin for GostOfb<C, Z, S> where
    C: Unpin,
    S: Unpin,
    <Z as ArrayLength<GenericArray<u8, <C as BlockCipher>::BlockSize>>>::ArrayType: Unpin

impl<C, Z, S> UnwindSafe for GostOfb<C, Z, S> where
    C: UnwindSafe,
    S: UnwindSafe,
    <Z as ArrayLength<GenericArray<u8, <C as BlockCipher>::BlockSize>>>::ArrayType: UnwindSafe

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Same<T> for T

type Output = T

Should always be Self

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.