[][src]Crate miscreant

Miscreant: Misuse resistant symmetric encryption library providing the AES-SIV (RFC 5297), AES-PMAC-SIV, and STREAM constructions

Build Notes

miscreant.rs works on stable rust since 1.27. By default it is built with aesni support which requires an x86 instruction set. You can disable this with the aes-soft feature flag which enables usage on other architectures.

The default configuration uses the core::arch API for stable access to CPU intrinsics, namely the [Intel AES-NI] instructions which provide a hardware implementation of AES.

To access these features, you will need both a relatively recent Rust nightly and to pass the following as RUSTFLAGS:

RUSTFLAGS=-Ctarget-feature=+aes,+ssse3

You can configure your ~/.cargo/config to always pass these flags:

[build]
rustflags = ["-Ctarget-feature=+aes,+ssse3"]

Re-exports

pub use crate::aead::Aead;
pub use crate::aead::Aes128PmacSivAead;
pub use crate::aead::Aes128SivAead;
pub use crate::aead::Aes256PmacSivAead;
pub use crate::aead::Aes256SivAead;
pub use crate::siv::s2v;
pub use crate::siv::Aes128PmacSiv;
pub use crate::siv::Aes128Siv;
pub use crate::siv::Aes256PmacSiv;
pub use crate::siv::Aes256Siv;

Modules

aead

aead.rs: Authenticated Encryption with Associated Data (AEAD): Symmetric encryption which ensures message confidentiality, integrity, and authenticity.

ffi

ffi.rs: Foreign Function Interface providing C ABI

siv

The Synthetic Initialization Vector (SIV) misuse-resistant block cipher mode of operation.

stream

stream.rs: The STREAM online authenticated encryption construction. See https://eprint.iacr.org/2015/189.pdf for definition.

Structs

Error

An opaque error type, used for all errors in Miscreant

Constants

IV_SIZE

Size of the (synthetic) initialization vector in bytes