The major points in the database are given as: Message Authentication Code, Definition, Mac Security, Code, Tampering, Fixed Size Key, Arbitrary Size Message, Denoted, Mapping, Fixed Domain
Download Message Authentication Code - Introduction to Cryptography - Lecture Slides and more Slides Network security in PDF only on Docsity!
1
Message Authentication Code
2
MAC
Definition
MAC Security
CBC-MAC
Hash-MAC
Using MAC
4
MAC Security
MAC security depends on the number of bits of key K that the attacker does not know
Security level k means that the attacker does not know k bits of the key K
k = 0 means the attacker knows the key K
MAC security level can be lower than the output size of MAC
A security level of k means the attacker has to perform 2k^ steps to find the key
5
MAC Security
MAC is also known as cryptographic checksum
MAC function is similar to encryption
MAC function need not be reversible as a decryption function would require
E.g., block size for message = 100 bits MAC size 10 bits Number of messages = 2 100 Number of MACs = 2 10 Each MAC value thus collides 2^100 /2 10 = 2 90 times
7
CBC-MAC
This method converts a block cipher into a MAC
H 0 = IV
H (^) i = E (^) K(P (^) i โ Hi-1 )
MAC = H (^) k
IV is commonly taken as 0
Authentication and encryption keys should be different for security reasons
8
CBC-MAC
Potential vulnerability
If MAC(a) = MAC(b) then MAC(a||c) = MAC(b||c)
Attacker watches messages to look for a collision of MAC (which will certainly occur)
Attacker knows messages โaโ and โbโ that collided for the MAC value
Using the above concatenation property, attacker feeds a||c and gets it authenticated
Then attacker can feed b||c for any message โbโ since it will be authenticated too automatically
10
HMAC
Hash-MAC or HMAC uses a hash function to build the MAC value
Hash functions provide n/2 bits of security for n- bit hash function
MAC function is expected to produce n-bit security for n-bit MAC
MAC(K,m) could be defined as h(K||m) or h(m||K) or h(K||m||K)
HMAC is used widely with MD-5 and SHA-
11
HMAC
Encrypted data is decrypted and stored usually
If stored data is also encrypted, then an attack could be online or offline