Unit 5
Unit 5
Unit – 6
Chapter 12 – Message
Authentication Codes
1. The receiver is assured that the message has not been altered. If
an attacker alters the message but does not alter the MAC, then
the receiver’s calculation of the MAC will differ from the received
MAC. Because the attacker is assumed not to know the secret
key, the attacker cannot alter the MAC to correspond to the
alterations in the message.
Message Authentication Codes
• If we assume that only the receiver and the sender know the
identity of the secret key, and if the received MAC matches
the calculated MAC, then
L = no. of blocks in M
K = secret key, if key length greater than b, the key is input to the
hash function to produce n-bit key; recommend length is >= n
• The appeal of HMAC is that its designers have been able to prove
an exact relationship between the strength of the embedded hash
function and the strength of HMAC.
2. The attacker finds collisions in the hash function even when the IV
is random and secret.
Security of HMAC