Crate universal_hash

Source
Expand description

Traits for Universal Hash Functions.

§About universal hashes

Universal hash functions provide a “universal family” of possible hash functions where a given member of a family is selected by a key.

They are well suited to the purpose of “one time authenticators” for a sequence of bytestring inputs, as their construction has a number of desirable properties such as pairwise independence as well as amenability to efficient implementations, particularly when implemented using SIMD instructions.

When combined with a cipher, such as in Galois/Counter Mode (GCM) or the Salsa20 family AEAD constructions, they can provide the core functionality for a Message Authentication Code (MAC).

Re-exports§

pub use generic_array;

Modules§

consts

Structs§

Error
Error type for when the Output of a UniversalHash is not equal to the expected value.
Output
Outputs of universal hash functions which are a thin wrapper around a byte array. Provides a safe Eq implementation that runs in constant time, which is useful for implementing Message Authentication Codes (MACs) based on universal hashing.

Traits§

NewUniversalHash
Instantiate a UniversalHash algorithm.
UniversalHash
The UniversalHash trait defines a generic interface for universal hash functions.

Type Aliases§

Block
Blocks are inputs to a UniversalHash.
Key
Keys to a UniversalHash.