Message authentication codes
A message authentication code uses a secret key to produce a tag that lets the receiver verify a message has not been altered and came from someone holding the key. MACs provide integrity and authenticity, not confidentiality.
MACs are built in three main ways: from hash functions (HMAC, KMAC, keyed BLAKE2 and BLAKE3), from block ciphers (CMAC, PMAC, CBC-MAC), or from universal hashing masked with a one-time value (Poly1305, GHASH and GMAC). Hash-based and cipher-based MACs can usually authenticate many messages under one key; universal-hash MACs require a fresh mask or nonce per message.
Short-input PRFs such as SipHash and Chaskey occupy a niche between MACs and hash-table hashing, trading output length for speed on small inputs. In all cases tags should be compared in constant time to avoid leaking information through timing.
Families
15The standard way to build a MAC from a cryptographic hash (RFC 2104, FIPS 198-1)
The authentication-only mode of AES-GCM: a nonce-based MAC from GHASH and AES
NIST's lightweight standard: one 320-bit permutation for hashing, XOFs, MACs and AEAD
A fast, secure successor to BLAKE with built-in keying, salting and tree hashing
A Merkle-tree hash over BLAKE2s rounds, designed for parallel speed and unlimited output
The block-cipher MAC standardised by NIST in SP 800-38B, usually instantiated with AES
A lightweight ARX permutation-based MAC for 32-bit microcontrollers (ISO/IEC 29192-6)
NIST's Keccak-based MAC from SP 800-185, with optional arbitrary-length output
Bernstein's fast one-time authenticator, paired with ChaCha20 in RFC 8439
A short-input keyed PRF designed to protect hash tables from flooding attacks
The original block-cipher MAC: secure only for fixed-length messages
The GF(2^128) polynomial hash at the core of AES-GCM and GMAC
Rogaway's fully parallelisable block-cipher MAC
Pelican MAC: an AES-based message authentication code with a 16-byte tag, unverified in NextSSL
Two-Track-MAC: a NESSIE-era MAC with 20-byte keys and tags, archived as unverified