20 releases

0.9.0-pre Mar 8, 2024
0.8.0 Jul 31, 2022
0.7.2 Aug 27, 2021
0.7.1 Jul 20, 2021
0.0.0 Oct 6, 2016

#1699 in Cryptography

Download history 153481/week @ 2023-12-19 71895/week @ 2023-12-26 163457/week @ 2024-01-02 178534/week @ 2024-01-09 207373/week @ 2024-01-16 210105/week @ 2024-01-23 221190/week @ 2024-01-30 213831/week @ 2024-02-06 240278/week @ 2024-02-13 249603/week @ 2024-02-20 233515/week @ 2024-02-27 236079/week @ 2024-03-05 226853/week @ 2024-03-12 243561/week @ 2024-03-19 219214/week @ 2024-03-26 215148/week @ 2024-04-02

950,308 downloads per month
Used in 938 crates (17 directly)

Apache-2.0 OR MIT

125KB
1.5K SLoC

RustCrypto: Poly1305

crate Docs Apache2/MIT licensed Rust Version Build Status HAZMAT

Poly1305 is a universal hash function which, when combined with a cipher, can be used as a Message Authentication Code (MAC).

In practice, Poly1305 is primarily combined with ciphers from the Salsa20 Family such as in ChaCha20Poly1305 and XSalsa20Poly1305 (a.k.a. NaCl crypto_secretbox).

Documentation

Security

⚠️ Warning: Hazmat!

Universal hash functions have subtle security properties and using them correctly is difficult. See the toplevel README.md for more information.

USE AT YOUR OWN RISK!

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.

NOTE: the audit predates the AVX2 backend, which has not yet been audited.

All implementations contained in the crate are designed to execute in constant time, either by relying on hardware intrinsics (e.g. 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

~275–445KB