microZEUS
The whole stack, hand-drawn.

◄ 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.

See also

  • HKDFHKDF is a standard method for turning one shared secret into several strong, purpose-specific keys.
  • handshakeA handshake is the opening negotiation of a secure connection where both sides agree on keys before any data flows.

Referenced by

handshake · HKDF · initialisation vector (IV)