Message authentication code (MAC)
A message authentication code (MAC) is a keyed cryptographic tag used to check the integrity and authenticity of covered data.
The verifier checks a received tag using the required key and algorithm. MAC also names the mechanism that produces the tag; HMAC is one hash-based construction. Unlike an unkeyed checksum, verification depends on a secret shared with authorized tag producers. [1] [2]
Authentication applies to the selected input bytes, not every claim surrounding them. A storage protocol must bind the relevant record identity and decide which version it accepts. Hesela's examples distinguish altered bytes, unbound fields, old records and ambiguous field boundaries. They are synthetic demonstrations, not storage-device measurements. [3]
Relations
- related
- HMAC, Checksum, Cryptographic hash function, Authenticated encryption, Hash domain separation, Replay attack
Limitations
- A MAC does not encrypt data, recover damaged bytes or by itself prove that a returned record is the latest committed version. [2, 3]
- Shared-key authentication does not distinguish which holder of the key generated a valid tag and does not provide non-repudiation. [1]
Citations
- NIST CSRC glossary: message authentication code, tag/mechanism definitions and non-repudiation boundary
- RFC 2104: shared-key message authentication and HMAC construction, sections 1-2
- Hesela: HMAC context, freshness and field-encoding examples
Sources & caveats
- MAC is used in the cryptographic sense, not Media Access Control or mandatory access control. No algorithm approval or key-management claim is made.