The best crypto you've never heard of, brought to you by [Phil Rogaway]
Rust implementation of Miscreant: Advanced symmetric encryption library which provides the [AES-SIV] ([RFC 5297]), [AES-PMAC-SIV], and [STREAM] constructions. These algorithms are easy-to-use (or rather, hard-to-misuse) and support encryption of individual messages or message streams.
AES-SIV provides [nonce-reuse misuse-resistance] (NRMR): accidentally reusing a nonce with this construction is not a security catastrophe, unlike it is with more popular AES encryption modes like [AES-GCM]. With AES-SIV, the worst outcome of reusing a nonce is an attacker can see you've sent the same plaintext twice, as opposed to almost all other AES modes where it can facilitate [chosen ciphertext attacks] and/or full plaintext recovery.
For more information, see the [toplevel README.md].
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 to pass the following as RUSTFLAGS:
RUSTFLAGS=-Ctarget-feature=+aes
You can configure your ~/.cargo/config
to always pass these flags:
toml
[build]
rustflags = ["-Ctarget-feature=+aes"]
Have questions? Want to suggest a feature or change?
Please see the Rustdocs on docs.rs for API documentation.
Though this library is written by cryptographic professionals, it has not undergone a thorough security audit, and cryptographic professionals are still humans that make mistakes.
This library makes an effort to use constant time operations throughout its implementation, however actual constant time behavior has not been verified.
Use this library at your own risk.
We abide by the Contributor Covenant and ask that you do as well.
For more information, please see [CODEOFCONDUCT.md].
Bug reports and pull requests are welcome on GitHub at https://github.com/miscreant/miscreant
Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as noted below, without any additional terms or conditions.
Copyright (c) 2017-2018 The Miscreant Developers.
The Rust implementation of Miscrenant specifically is licensed under either of:
at your option.