Go Back

Message Authentication Code

Topics

Security of MAC

Def. Message Authentication Code

A MAC scheme is an efficiently computable function

M: {0,1}l x {0,1}*→{0,1}n

written

M(k,m)=t

where k is the key, m is the message and t is the tag.
Remark. MAC schemes are used for porivding (symmetric-key) data integrity and data origin authentication.

Applications of MAC

Def. MAC Security

Assume the adveersary knows everything about the MAC scheme except the key k. A MAC scheme is secure if
(interaction) given some number of MAC tags M(k,mi) for messages mi chosen adaptively by the adversary,
(computational resources) it is computationally infeasible
(goal) to compute (with non-negligible probability of success) the value of M(k,m) for any m≠mi.

In other words, a MAC scheme is secure if it is existentially unforgeable against chosen-message attack.

Remarks. Secure MACs as of 2024:

Generic Attacks

Constructing MACs

MACs based on Block Ciphers

1. CBC-MAC

Security of CBC-MAC
Informal statement of the theorem [Bellare, Kilian & Rogaway 1994]:
Suppose that E is an "ideal" encryption scheme. (that is, for each k∈{0,1}l, Ek:{0,1}n→{0,1}n is a random permuation). Then CBC-MAC with fixed-length inputs is a secure MAC algorithm.

CBC-MAC is not secure if variable length messages are allowed.

Chosen message attack on CBC-MAC
  1. Let m1 be an n-bit block.
  2. Let (m1,t1) be a known message/MAC pair.
  3. Request the MAC t2 of the message t1. Then t2 is also the MAC of the 2-block message (m1,0) since t2=Ek(Ek(m1))

2. Encrypted CBC-MAC (EMAC)

Security of EMAC
Informal statement of the theorem [Petrank & Rackoff 2000]:
Suppose that E is an "ideal" encryption scheme. Then EMAC is a secure MAC algorithm for inputs of any length.

3. Hash-based MAC (HMAC)

Hash function