0% found this document useful (0 votes)
23 views17 pages

Hash Functions

The document discusses message authentication, focusing on mechanisms like Message Authentication Codes (MACs) and their relationship with cryptographic hash functions and symmetric encryption. It explains how MACs use a secret key to verify message integrity and outlines the differences between symmetric and public-key encryption in terms of confidentiality and authentication. Additionally, it describes the process of generating and verifying MACs to ensure the authenticity of messages between communicating parties.

Uploaded by

prajwalgautam007
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
23 views17 pages

Hash Functions

The document discusses message authentication, focusing on mechanisms like Message Authentication Codes (MACs) and their relationship with cryptographic hash functions and symmetric encryption. It explains how MACs use a secret key to verify message integrity and outlines the differences between symmetric and public-key encryption in terms of confidentiality and authentication. Additionally, it describes the process of generating and verifying MACs to ensure the authenticity of messages between communicating parties.

Uploaded by

prajwalgautam007
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 17

Cryptographic Hash Functions

and Digital Signatures. (8hr)


4.1 Message Authentication, Message
Authentication Functions, Message
Authentication Codes
• Message authentication is a mechanism or service used to
verify the integrity of a message. Message authentication
assures that data received are exactly as sent by (i.e., contain
no modification, insertion, deletion, or replay) and that the
purported identity of the sender is valid.
• Symmetric encryption provides authentication among those who
share the secret key.
• A message authentication code (MAC) is an algorithm that
requires the use of a secret key. A MAC takes a variable-length
message and a secret key as input and produces an
authentication code. A recipient in posses sion of the secret key
can generate an authentication code to verify the integrity of the
message.
• One means of forming a MAC is to combine a cryptographic
hash function in some fashion with a secret key.
• Another approach to constructing a MAC is to use a symmetric
block cipher in such a way that it produces a fixed-length output
for a variable length input.
Message Authentication Functions
• Message authentication mechanism has two levels of
functionality.
✔ Low level : A function that produces an authenticator (A value to be
used to authenticate a message).
✔ High level : Low level function is used as a primitive in higher level
authentication that enables a receiver to verify the authenticity of a
message.
• The types of functions that may be used to pro duce an
authenticator may be grouped into three classes as :
1. Hash function: A function that maps a message of any length into a
fixed length hash value, which serves as the authenticator.(after this
section)
2. Message encryption: The ciphertext of the entire message serves as
its authenticator .
3. Message authentication code (MAC): A function of the message and
a secret key that produces a fixed-length value that serves as the
authenticator
• Message Encryption : Message encryption by itself can provide
a measure of authentication. The analysis differs for symmetric
and public-key encryption schemes.
• SYMMETRIC ENCRYPTION: Consider the straightforward use of
symmetric encryption (Figure 1a). A message K M encrypted using a
secret key transmitted from source A to destination B is shared by A
and B. If no other party knows the key, then confidentiality is provided:
No other party can recover the plaintext of the message.
• PUBLIC-KEY ENCRYPTION: The straightforward use of
public-key encryption (Figure b) provides confidentiality but not
authentication. The source (A) uses the public key Pub of the
destination (B) to encrypt M. Because only B has the
corresponding private key Prb and only B can decrypt the
message.
• This scheme provides no authentication, because any opponent
could also use B’s public key to encrypt a message and claim to
be A. To provide authentication, A uses its private key to
encrypt the message, and B uses A’s public key to decrypt
(Figure c).This provides authentication using the same type of
reasoning as in the symmetric encryption
• To provide both confidentiality and authentication, A can encrypt
M first using its private key, which provides the digital signature,
and then using B’s public key, which provides confidentiality
(Figure d). The disadvantage of this approach is that the
public-key algorithm, which is complex, must be exercised four
times rather than two in each communication.
Message Authentication Code
• An alternative authentication technique involves the use of a
secret key to generate a small fixed-size block of data, known
as a cryptographic checksum or MAC, that is appended to the
message.
• This technique assumes that two communicating parties, say A
and B, share a common secret key .When A has a message to
send to B, it calculates the MAC as a function of the message
and the key:
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 per forms 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 (Figure
a).
Contd..

You might also like