#aead #chacha20 #poly1305 #xchacha20 #xchacha20poly1305

no-std chacha20poly1305

Pure Rust implementation of the ChaCha20Poly1305 Authenticated Encryption with Additional Data Cipher (RFC 8439) with optional architecture-specific hardware acceleration. Also contains implementations of the XChaCha20Poly1305 extended nonce variant of ChaCha20Poly1305, and the reduced-round ChaCha8Poly1305 and ChaCha12Poly1305 lightweight variants.

16 releases (7 breaking)

new 0.7.0 Oct 16, 2020
0.5.1 Jun 11, 2020
0.4.1 Mar 9, 2020
0.3.0 Nov 27, 2019
0.0.0 Oct 6, 2016

#148 in Cryptography

Download history 6841/week @ 2020-06-30 8573/week @ 2020-07-07 8875/week @ 2020-07-14 9059/week @ 2020-07-21 9092/week @ 2020-07-28 9299/week @ 2020-08-04 9680/week @ 2020-08-11 9627/week @ 2020-08-18 9110/week @ 2020-08-25 7471/week @ 2020-09-01 9871/week @ 2020-09-08 10851/week @ 2020-09-15 10429/week @ 2020-09-22 9426/week @ 2020-09-29 9426/week @ 2020-10-06 10727/week @ 2020-10-13

41,111 downloads per month
Used in 62 crates (22 directly)

Apache-2.0 OR MIT

22KB
231 lines

RustCrypto: ChaCha20Poly1305

crate Docs Apache2/MIT licensed Rust Version CodeCov Status Project Chat Build Status

Pure Rust implementation of ChaCha20Poly1305 (RFC 8439): an Authenticated Encryption with Associated Data (AEAD) cipher amenable to fast, constant-time implementations in software, based on the ChaCha20 stream cipher and Poly1305 universal hash function.

This crate also contains an implementation of XChaCha20Poly1305: a variant of ChaCha20Poly1305 with an extended 192-bit (24-byte) nonce.

Documentation

Security Notes

This crate has received one security audit by NCC Group, with no significant findings. We would like to thank MobileCoin for funding the audit.

All implementations contained in the crate are designed to execute in constant time, either by relying on hardware intrinsics (i.e. AVX2 on x86/x86_64), or using a portable implementation which is only constant time on processors which implement constant-time multiplication.

It is not suitable for use on processors with a variable-time multiplication operation (e.g. short circuit on multiply-by-zero / multiply-by-one, such as certain 32-bit PowerPC CPUs and some non-ARM microcontrollers).

License

Licensed under either of:

at your option.

Contribution

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 above, without any additional terms or conditions.

Dependencies

~555KB
~11K SLoC