Konubinix' opinionated web of thoughts

Message Authentication Code

Fleeting

  • External reference: @c9ca6fda8a3c39d1bf4bb2afd764cef37aaeed95

Message authentication code

In cryptography, a message authentication code (MAC), sometimes known as a tag, is a short piece of information used to authenticate a message—in other words, to confirm that the message came from the stated sender (its authenticity) and has not been changed. The MAC value protects a message’s data integrity, as well as its authenticity, by allowing verifiers (who also possess the secret key) to detect any changes to the message content.

MAC functions are similar to cryptographic hash functions

even if an attacker has access to an oracle which possesses the secret key and generates MACs for messages of the attacker’s choosing, the attacker cannot guess the MAC for other messages (which were not used to query the oracle) without performing infeasible amounts of computation.

The term message integrity code (MIC) is frequently substituted for the term MAC, especially in communications, to distinguish it from the use of MAC meaning MAC address.

Notes linking here