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 crypto_common;
pub use crypto_common::generic_array;
pub use crypto_common::typenum;

Modules§

consts
Type aliases for many constants.

Structs§

Error
Error type used by the UniversalHash::verify method to indicate that UHF output is not equal the expected value.

Traits§

KeyInit
Types which can be initialized from key.
Reset
Resettable types.
UhfBackend
Trait implemented by UHF backends.
UhfClosure
Trait for UhfBackend users.
UniversalHash
The UniversalHash trait defines a generic interface for universal hash functions.

Type Aliases§

Block
Block on which BlockSizeUser implementors operate.
Key
Key used by KeySizeUser implementors.
ParBlocks
Parallel blocks on which ParBlocksSizeUser implementors operate.