Module mac

Source
Expand description

This module defines an information theoretic MAC for authenticating bits.

Constants§

MAC_LENGTH
The length in bytes of an information theoretic MAC, and of the MAC key.

Functions§

generate_mac_key
Generate a fresh MAC key.
hash_to_mac_width
Hash the given input to the width of a MAC.
mac
Authenticate a bit using the global MAC key.
verify_mac
Verify a MAC on a given bit.
xor_mac_width
XOR of two MAC-width byte arrays.

Type Aliases§

Mac
A MAC on a bit.
MacKey
A MAC key for authenticating a bit to another party.