◄ Wiki / Crypto
HMAC
HMAC is a way to attach a secret-keyed tag to a message so the receiver can verify it was not altered or forged.
HMAC (Hash-based Message Authentication Code) combines a cryptographic hash with a secret key to produce a short authentication tag; only someone with the key can generate a valid tag for a given message. The receiver recomputes the tag and rejects the message if it does not match, catching tampering. It is also the building block underneath key-derivation functions like HKDF.