0% found this document useful (0 votes)
2 views

33-Message Authentication Codes-04-03-2025

The document discusses message authentication and its functions, focusing on Message Authentication Code (MAC) as a method to ensure message integrity and origin authentication. It explains that MAC uses a secret key to produce a fixed-length value that verifies the message has not been altered and confirms its source. The MAC process involves the sender and receiver using the same secret key to generate and compare MAC values for validation.
Copyright
© © All Rights Reserved
Available Formats
Download as PPT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
2 views

33-Message Authentication Codes-04-03-2025

The document discusses message authentication and its functions, focusing on Message Authentication Code (MAC) as a method to ensure message integrity and origin authentication. It explains that MAC uses a secret key to produce a fixed-length value that verifies the message has not been altered and confirms its source. The MAC process involves the sender and receiver using the same secret key to generate and compare MAC values for validation.
Copyright
© © All Rights Reserved
Available Formats
Download as PPT, PDF, TXT or read online on Scribd
You are on page 1/ 10

Module 5

Topic
Message Authentication, Message Authentication Code (MAC)
Message Authentication Functions
• These may be grouped into three classes.
• Hash function: A function that maps a message of any length into a fixed-length
hash value, which serves as the authenticator
• Message encryption: The ciphertext of the entire message serves as its
authenticator
• Message authentication code (MAC): A function of the message and a secret
key that produces a fixed-length value that serves as the authenticator

2
Message Encryption

3
MESSAGE AUTHENTICATION CODE
• A message digest guarantees the integrity of a message.
• It guarantees that the message has not been changed.
• Message authentication is provided in two ways
• Modification Detection Code (MDC)
• Message Authentication Code (MAC)
• Modification Detection Code (MDC)
• It is a message digest that can prove the integrity of the message: that message has not been
changed.

4
Cont..
• To ensure the integrity of the message and the data origin authentication, we moved on
from modification detection code (MDC) to a message authentication code (MAC). No
Confidentiality!!!!!
• More commonly, message authentication is achieved using a message authentication code
(MAC) or cryptographic checksum, or keyed hash function
• Typically, MACs are used between two parties that share a secret key to authenticate
information exchanged between those parties.
• A MAC function takes as input a secret key and a data block and produces a hash value,
referred to as the MAC, which is associated with the protected message.
• If the integrity of the message needs to be checked, the MAC function can be applied to the
message and the result compared with the associated MAC value.
• An attacker who alters the message will be unable to alter the associated MAC value
without knowledge of the secret key.
• In practice, specific MAC algorithms are designed that are generally more efficient than an
encryption algorithm.
5
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.
2. The receiver is assured that the message is not from the attacker.
Because no one else knows the secret key, no one else could prepare a message
with a proper MAC.

6
• A MAC function is similar to encryption. One difference is that the MAC
algorithm need not be reversible, as it must be for decryption.

7
MAC structure / diagram

8
• MAC = C(K, M)
• where
• M = input message
• C = MAC function
• K = shared secret key
• MAC = message authentication code
• The message plus MAC are transmitted to the intended recipient.
• The recipient performs the same calculation on the received message, using the
same secret key, to generate a new MAC.
• The received MAC is compared to the calculated MAC.
• 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 it will accept
otherwise, it will reject.
9
Basic Uses of Message Authentication code (MAC)

Confidentiality,
Integrity and
Authentication is
achieved

10

You might also like