You are on page 1of 8

Message Authentication

Codes
By Jatin Rajeshbhai Patel  (191200116035) 
Definition
• In cryptography, a message authentication code (MAC), sometimes known
as a tag, is a short piece of information used for authenticating a message. In
other words, to confirm that the message came from the stated sender (its
authenticity) and has not been changed. The MAC value protects a message's 
data integrity, as well as its authenticity, by allowing verifiers (who also
possess the secret key) to detect any changes to the message content.
• The term message integrity code (MIC) is frequently substituted for the
term MAC, especially in communications [1] to distinguish it from the use of the
latter as media access control address (MAC address).
M
es Informally, a message authentication code system
A consists of three algorithms:
sa u • A key generation algorithm selects a key from
g t the key space uniformly at random.
e C
h
o • A signing algorithm efficiently returns a tag
e given the key and the message.
d
n
e • A verifying algorithm efficiently verifies the
ti authenticity of the message given the key and
  the tag. That is, return accepted when the
c
S message and tag are not tampered with or
a forged, and otherwise return rejected.
y
ti
s
o
t
n
e
m
MAC working    
• Cryptographic checksum: A MAC generates a
cryptographically secure authentication tag for
a given message.
• Symmetric: MACs are based on
secret symmetric keys. The signing and
verifying parties must share a secret key.
• Arbitrary message size:
       Properties 
MACs accept messages of arbitrary length.               of 
• Fixed output length: MACs generate
fixed size authentication tags.
           MAC
• Message Integrity: MACs provide message
integrity as receiver will detect any
manipulations.
• Message Authentication: The receiving party is
assured of the origin of the message.
• No non-repudiation: Since MACs are based on
         Properties
symmetric principles, they do not provide non-
repudiation.
                of 
• In Practice MACs are either based
              MAC
on either block ciphers or hash functions.         (continued)
Types of MACs
HMAC CMAC
The working of HMAC starts with taking CMAC on a message is constructed by
a message M containing blocks of splitting it into blocks of size equal to the
length b bits. An input signature is block size of the underlying cipher, for
padded to the left of the message and the instance, 128 bits in the case of AES,
whole is given as input to a hash function Cipher Block Chaining(CBC)-encrypting
which gives us a temporary message- the message and retaining the results of
digest MD’. MD’ again is appended to an the last block encryption as the computed
output signature and the whole is applied MAC value.
a hash function again, the result is our
final message digest MD. 
Applications of MACs
• Application in which the same message is broadcast to a number of
destinations.
• Authentication of a computer program in plaintext is an attractive service.
• Another scenario is an exchange in which one side has a heavy load and cannot
afford the time to decrypt the incoming messages.

You might also like