#authenticated-encryption #message-authentication #aes-gcm #universal-hashing

no-std ghash

Universal hash over GF(2^128) useful for constructing a Message Authentication Code (MAC), as in the AES-GCM authenticated encryption cipher

20 releases

0.6.0-rc.0 Jul 26, 2024
0.6.0-pre.0 Mar 8, 2024
0.5.1 Mar 3, 2024
0.5.0 Jul 31, 2022
0.0.0 Oct 6, 2016

#2446 in Cryptography

Download history 364314/week @ 2024-08-06 370191/week @ 2024-08-13 361342/week @ 2024-08-20 376352/week @ 2024-08-27 385143/week @ 2024-09-03 361796/week @ 2024-09-10 346715/week @ 2024-09-17 380803/week @ 2024-09-24 393241/week @ 2024-10-01 383246/week @ 2024-10-08 411159/week @ 2024-10-15 410755/week @ 2024-10-22 370101/week @ 2024-10-29 375146/week @ 2024-11-05 404253/week @ 2024-11-12 337978/week @ 2024-11-19

1,560,354 downloads per month
Used in 1,369 crates (8 directly)

Apache-2.0 OR MIT

58KB
997 lines

RustCrypto: GHASH

crate Docs Apache2/MIT licensed Rust Version Build Status HAZMAT

GHASH is a universal hash function which operates over GF(2^128) and can be used for constructing a Message Authentication Code (MAC).

Its primary intended use is for implementing AES-GCM.

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.

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

~280–460KB
~10K SLoC