Sunbeam Studios

Our open-source projects, here for you!

ghash (0.5.1)

Published 2026-03-26 10:58:31 +00:00 by siennathesane

Installation

[registry]
default = "gitea"

[registries.gitea]
index = "sparse+" # Sparse index
# index = "" # Git

[net]
git-fetch-with-cli = true
cargo add ghash@0.5.1

About this package

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

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

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

ID Version
opaque-debug ^0.3
polyval ^0.6.2
zeroize ^1
hex-literal ^0.3

Keywords

aes-gcm crypto universal-hashing
Details
Cargo
2026-03-26 10:58:31 +00:00
0
RustCrypto Developers
Apache-2.0 OR MIT
10 KiB
Assets (1)
Versions (1) View all
0.5.1 2026-03-26