Message authentication code
From CRYPTUTOR
A message authentication code (MAC) is a scheme for two parties who share a private key to achieve an unforgeable communication channel.
Definition
A MAC scheme consists of the following 3 algorithms:
- Key generation (KeyGen): a probabilistic algorithm that takes the implicit security parameter of the scheme as input, and outputs a key.
- MAC: an algorithm that takes a key and a message as input, and outputs a tag. We generally write
as
.
- Verification (Ver): An algorithm that takes a key, a message, and a tag as input, and outputs a bit. As above, we generally write
as
.
These algorithms must satisfy the following properties:
- Efficiency: All three algorithms run in polynomial time in the security parameter.
- Correctness: For all
, and all messages m,
- Unforgeability: For all non-uniform PPT (polynomial in the security parameter) adversaries A, the probability that A succeeds in the following experiment is negligible (in the security parameter):
MAC Unforgeability Experiment:
We say that A succeeds if
- We choose a key
.
- A is allowed to query oracles that compute
and
.
- A outputs a message/tag pair (m,τ), with the restriction that the
oracle was never queried on input m.
.
Repudiation
MACs are natural to use for authenticated communcation. However, MAC schemes have an undesirable property called repudiation, which means that it is impossible to prove (to an outside party) that a particular person generated a MAC. Consider the following example:
Suppose Alice and Bob are using a MAC scheme, with a common private key. Alice sends Bob a message and "signs" it by giving a MAC of the message. If the MAC verifies, Bob can be convinced that the message came from Alice. But suppose that later, he needed to convince someone else that Alice sent this message.
Bob publishes the message, Alice's MAC, and their private key, as "proof" (which anyone can now easily verify) that Alice generated the MAC. However, since Bob was in posession of the same private key, he could have been the one who generated the MAC! Alice can legimitely deny (repudiate) the fact that she generated the MAC.
When non-repudiation is needed, it is necessary to use a digital signature scheme, which uses public keys.
and
.
.

