Terminology Index
Glossary
2953 terms
HMAC
Hash-based Message Authentication Code: a construction that combines a secret key with a hash function to produce a code verifying both a message's integrity and its authenticity, that it was not altered and came from someone holding the key.
HMAC keys a hash function so that only parties sharing the secret can produce or verify the resulting code. Attaching an HMAC to a message lets the recipient confirm the message is unchanged and originated from a holder of the key, providing integrity and authentication together. It is widely used in protocols and APIs (for request signing and token verification) and is more robust than naively hashing a message with a key appended.
Introduced in: Cryptography Essentials
Examples
- Verifying an API request's HMAC to confirm it is authentic and unaltered.
- Signing a token with HMAC so tampering is detectable.
- Two parties sharing a secret key to validate messages with HMAC.
