Message authentication (Message Authentication Code, MAC)

Lecture



Imitation protection (message authentication) is a method or mechanism for ensuring data security and integrity by creating a digital signature or a Message Authentication Code (MAC) to verify and confirm the authenticity of data. This process involves generating a unique hash code or signature based on the content of the data and a key. The resulting signature is then appended to the data as a checksum or hash.

When verifying the integrity and authenticity of data, the mechanism again computes a hash or signature based on the received data and the key. The resulting value is then compared with the stored signature to determine whether the data has been altered or forged.

Message authentication (Message Authentication Code, MAC)

Imitation protection is widely used in cryptography and information security tools to ensure the trustworthiness and continuity of data transmission, as well as to detect attempts to alter or forge data.

Imitation protection — protection of an encrypted communication system or other cryptosystem against the injection of false data. Protection of data against unauthorized modification — in other words, protection of message integrity.

It is implemented by appending an additional code to the message — an authentication tag, or MAC — that depends on the content of the message and a secret element known only to the sender and the recipient (the key). Building in redundancy makes it possible to detect unauthorized changes introduced into the message.

Message authentication (Message Authentication Code, MAC), where Message authentication (Message Authentication Code, MAC)

The recipient checks whether the condition Message authentication (Message Authentication Code, MAC) holds, where Message authentication (Message Authentication Code, MAC) — is a cryptographic key known only to the sender and the recipient. The message is considered authentic if the condition holds. Otherwise, the message is rejected. An example of a MAC is a checksum of the message blocks modulo some number (the key).

Imitation protection (in its classic, «symmetric» form) is applied wherever transmission speed matters but full secrecy is not required. A real-life analogy: a scout reports the size of enemy forces. Under fire, encrypting the entire message with a strong cipher takes too long, and the partisans on the receiving end would not be able to decrypt it either. And even if the enemy does decrypt the message, they gain little from it. So the message can be protected with a weak cipher, or not encrypted at all. To prevent the enemy from planting a false message, check symbols are added, and these are the ones protected with a strong cipher.

Message authentication (Message Authentication Code, MAC)Threats to data integrity and authenticity

  1. An attacker modifies the message but does not modify the check combination (a threat to data integrity).
  2. An attacker modifies the message and supplies it with a correctly computed check combination, passing it off as genuine (a threat to data authenticity).

A checksum that does not use a key (computed with a known modulus) does not protect against the second threat.

Resistance to the first threat is provided by an imitation-protection scheme based on a one-way function Message authentication (Message Authentication Code, MAC) (that is, a function for which computing the inverse is infeasible in acceptable time — for example, if the value T can only be recovered from Y by brute force). Such a check combination is called a manipulation detection code (MDC). Typically a hash function of the message is used — in Russia, for example, the GOST R 34.11-2012 algorithm (previously GOST R 34.11-94).

Resistance to the second threat is achieved by computing the MAC using a cryptographic key known only to the sender and the recipient. Because the key used to compute the MAC is known only to the sender and the recipient, an impersonator cannot compute the correct MAC value for a fabricated message, nor can they choose message content that would deliberately match a given MAC. Such a check combination is called a message authentication code, or simply a MAC. In Russia, the MAC computation algorithm defined by GOST 28147-89 is adopted.

Formally, digital signature (electronic digital signature, EDS) algorithms can also perform imitation-protection functions, but their use requires far greater resources — both in terms of the size of the authentication tag (64 bytes for an EDS under GOST R 34.10-2001, versus 4 or 8 bytes for a MAC under GOST 28147-89) and in terms of computation time (generating and verifying an EDS is typically hundreds of times slower than generating a MAC).

See also

  • [[b12051]]
  • Authentication
  • Deniable authentication

See also

Comments

To leave a comment

If you have any suggestion, idea, thanks or comment, feel free to write. We really value feedback and are glad to hear your opinion.
To reply

Lectures and tutorial on "information security - Cryptography and Cryptanalysis. Steganography. Information protection"

Terms: information security - Cryptography and Cryptanalysis. Steganography. Information protection