What is HMAC?
A message authentication code built from a hash function and a shared key. Using two values derived from the key, K ⊕ ipad and K ⊕ opad, it applies the hash function twice: HMAC(K, m) = H((K ⊕ opad) ‖ H((K ⊕ ipad) ‖ m)). Unlike simply hashing the key concatenated with the message, it is not vulnerable to length extension attacks even with a Merkle–Damgård hash function such as SHA-256. It is specified in RFC 2104 and widely used in TLS, IPsec, JWT and the key derivation function HKDF.
Japanese name: HMAC
HMAC appears in 4 practice questions across 2 topics, including Applied Cryptography, Information Security Basics.
Field: Applied Cryptography