Expand description

This crate defines a set of traits which describe the functionality of block ciphers, block modes, and stream ciphers.


pub use crypto_common;
pub use inout;
pub use crypto_common::rand_core;
pub use inout::block_padding;
pub use zeroize;
pub use blobby;
pub use crypto_common::generic_array;
pub use crypto_common::typenum;


Type aliases for many constants.


Define block cipher test

Define block decryptor benchmark

Define block encryptor benchmark

Define block mode decryption test

Define block mode encryption test

Implement simple block backend

Define IvState test

Create stream cipher benchmarks

Test stream synchronous stream cipher seeking capabilities

Test core functionality of synchronous stream cipher


The error type returned when key and/or IV used in the KeyInit, KeyIvInit, and InnerIvInit slice-based methods had an invalid length.

The error type returned when a cipher position can not be represented by the requested type.

Wrapper around StreamCipherCore implementations.

This error is returned by the StreamCipher trait methods.


Trait which stores algorithm name constant, used in Debug implementations.

Trait making GenericArray work, marking types to be used as length of an array

Marker trait for block-level asynchronous stream ciphers

Trait implemented by block cipher encryption and decryption backends.

Marker trait for block ciphers.

Trait for BlockBackend users.

Decrypt-only functionality for block ciphers.

Decrypt-only functionality for block ciphers and modes with mutable access to self.

Encrypt-only functionality for block ciphers.

Encrypt-only functionality for block ciphers and modes with mutable access to self.

Types which process data in blocks.

Counter type usable with StreamCipherCore.

Types which can be initialized from another type and additional initialization vector/nonce.

Types which use initialization vector (nonce) for initialization.

Trait for loading current IV state.

Types which can be initialized from key.

Types which can be initialized from key and initialization vector (nonce).

Types which use key for initialization.

Types which process blocks in parallel.

Trait implemented for numeric types which can be used with the StreamCipherSeek trait.

Trait implemented by stream cipher backends.

Synchronous stream cipher core trait.

Block-level synchronous stream ciphers.

Trait for seekable stream ciphers.

Block-level seeking trait for stream ciphers.

Trait for StreamBackend users.

The marker trait for compile time unsigned integers.

Type Definitions

Block on which BlockSizeUser implementors operate.

Initialization vector (nonce) used by IvSizeUser implementors.

Key used by KeySizeUser implementors.

Parallel blocks on which ParBlocksSizeUser implementors operate.