The Poly1305 universal hash function and message authentication code.
Poly1305 is a universal hash function suitable for use as a one-time authenticator and, when combined with a cipher, a message authentication code (MAC).
It takes a 32-byte one-time key and a message and produces a 16-byte tag, which can be used to authenticate the message.
Rust 1.49 or higher.
Minimum supported Rust version may be changed in the future, but such changes will be accompanied with a minor version bump.
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).
pub use universal_hash;
The Poly1305 universal hash function.