0% found this document useful (0 votes)
133 views28 pages

MD5 Algorithm

The document provides an overview of the Message Digest 5 (MD5) hash algorithm, detailing its properties, applications, and vulnerabilities. It emphasizes the importance of hash functions in data integrity and security, while also highlighting that MD5 is considered insecure due to known collision vulnerabilities. The session aims to educate on hash functions, their design, and the need for stronger alternatives like SHA-2.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
133 views28 pages

MD5 Algorithm

The document provides an overview of the Message Digest 5 (MD5) hash algorithm, detailing its properties, applications, and vulnerabilities. It emphasizes the importance of hash functions in data integrity and security, while also highlighting that MD5 is considered insecure due to known collision vulnerabilities. The session aims to educate on hash functions, their design, and the need for stronger alternatives like SHA-2.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 28

Department of CSE(Honors)

CRYPTANALYSIS & CYBER


DEFENSE
Topic:
MESSAGE DIGEST 5 (MD5)

Session -26

CREATED BY K. VICTOR BABU


AIM OF THE SESSION

Demonstrate hash algorithm like Message Digest 5 (MD5).

INSTRUCTIONAL
OBJECTIVES
The objective of this session is to introduce the basic concepts of Hash Functions. It provides the

necessary theoretical background and demonstrates attacks on hash functions.

LEARNING OUTCOMES
At the end of this session, you should be able to:
 Demonstrate MD5 hash algorithm

CREATED BY K. VICTOR BABU


Module Description

This module defines Hash function. Applications of Hash


algorithms are also discussed in this module. Secure Hash
Algorithm (SHA 512) algorithms are demonstrated. Calculating
Hash value using two simple hash functions is also discussed.
Similarly MD5 is also discussed.

CREATED BY K. VICTOR BABU


SESSION INTRODUCTION

This session starts with the introduction of MD5. It


illustrates block diagram of MD5and the operations
being carried in a single round of MD5 in detail.

CREATED BY K. VICTOR BABU


SESSION DESCRIPTION

Hash Functions Family

• MD (Message Digest)
• Designed by Ron Rivest
• Family: MD2, MD4, MD5

CREATED BY K. VICTOR BABU


SESSION DESCRIPTION

MD (Message Digest)

•A message digest, also known as a hash value or hash code, is a fixed-size


numerical representation derived from a given input data of arbitrary length.
It is generated using a mathematical algorithm called a hash function.
•The purpose of a message digest is to provide a unique and condensed
representation of the input data. The resulting digest is typically a fixed-
length sequence of characters or bits, regardless of the size of the original
input. This makes it useful for verifying the integrity of data, detecting
changes or tampering, and ensuring data authenticity.

CREATED BY K. VICTOR BABU


SESSION DESCRIPTION

MD (Message Digest)

Message digests have several important properties:


•Deterministic: Given the same input, a hash function will always
produce the same digest. This property allows for consistency and
reproducibility.
•Fixed Size: The length of the digest is typically fixed, regardless of the
input size. Common hash functions, such as MD5, SHA-1, and SHA-256,
produce digests of specific lengths (e.g., 128 bits, 160 bits, 256 bits).

CREATED BY K. VICTOR BABU


SESSION DESCRIPTION

MD (Message Digest)

Message digests have several important properties:


• •Collision Resistance: It is extremely unlikely for two different inputs to produce
the same digest. However, as the input space is typically larger than the digest
space, collisions (two different inputs producing the same digest) are
theoretically possible, but highly improbable with well-designed hash functions.
• Message digests are widely used in various applications, including data integrity
checks, digital signatures, password storage (with salted hashes), and
checksums. They provide a way to verify that data remains unchanged and
hasn't been tampered with during transmission or storage.

CREATED BY K. VICTOR BABU


SESSION DESCRIPTION

Note: Copyrights of this figure are reserved with original author

CREATED BY K. VICTOR BABU


SESSION DESCRIPTION

Sample Processing

CREATED BY K. VICTOR BABU


SESSION DESCRIPTION

MD2, MD4 and MD5


• Family of one-way hash functions by Ronald Rivest
• All produces 128 bits hash value

• MD2: 1989
• Optimized for 8 bit computer
• Collision found in 1995
• MD4: 1990
• Full round collision attack found in 1995
• MD5: 1992
• Specified as Internet standard in RFC 1321
• since 1997 it was theoretically not so hard to create a collision
• Practical Collision MD5 has been broken since 2004
• CA attack published in 2007

CREATED BY K. VICTOR BABU


Note: Copyrights of this figure are reserved with original author

SESSION DESCRIPTION

MD5 Overview

CREATED BY K. VICTOR BABU


SESSION DESCRIPTION

Hash Algorithm Design – MD5

Constructed from sine function

CREATED BY K. VICTOR BABU


The ith 32-bit word in matrix T, constructed from the sine function

M [q*16+k] = the kth 32-bit word from the qth 512-bit block of the msg

Hash Algorithm Design – MD5

Single step

CREATED BY K. VICTOR BABU


SESSION DESCRIPTION

Sample Processing

Type bits data processed


MD5 128 469.7 MB/s
SHA-1 160 339.4 MB/s
SHA-512 512 177.7 MB/s

Mac Intel 2.66 Ghz core i7


1024 bytes block of data

CREATED BY K. VICTOR BABU


SESSION DESCRIPTION

Hash Function Cryptanalysis


cryptanalytic attacks exploit some property of
algorithm so faster than exhaustive search

hash functions use iterative structure


process message in blocks (incl length)

attacks focus on collisions in function f

CREATED BY K. VICTOR BABU


SESSION DESCRIPTION

Attacks on Hash Functions


 brute-force attacks and cryptanalysis
 cryptanalytic attacks exploit some property of algorithm so faster than brute-force
 a preimage or second preimage attack
 find y such that H(y)equals a given hash value
 collision resistance
 find two messages x &y with same hash so H(x) = H(y)

"md5 and sha1 are both clearly broken (in terms of collision-resistance ”
Ron Rivest

http://mail.python.org/pipermail/python-dev/2005-December/058850.html

CREATED BY K. VICTOR BABU


SESSION DESCRIPTION

The need of new Hash standard

 MD5 should be considered cryptographically broken and unsuitable for further


use, US CERT 2010
 In 2004, a collision for the full SHA-0 algorithm was announced
 SHA-1 not yet fully “broken”
 but similar to the broken MD5 & SHA-0
 so considered insecure and be fade out
 SHA-2 (esp. SHA-512) seems secure
 shares same structure and mathematical operations as predecessors so have
concern

CREATED BY K. VICTOR BABU


Summary
Hash functions are keyless
Applications for digital signatures and in message
authentication codes
The three security requirements for hash
functions are
one-wayness, second preimage resistance and collision
resistance
MD5 is insecure
Serious security weaknesses have been found
in SHA-1
should be phased out
SHA-2 appears to be secure
May use SHA-512 and use the first 256 bytes
The ongoing SHA-3 competition will result in
new standardized hash functions in a next year

CREATED BY K. VICTOR BABU


SELF-ASSESSMENT QUESTIONS

1. A __________ hash function is MD5.

a) Symmetric
b) Asymmetric
c) One-way
d) Reversible

2. What is the MD5 output size?

a) 64 bits
b) 128 bits
c) 160 bits
d) 256 bits
CREATED BY K. VICTOR BABU
SELF-ASSESSMENT QUESTIONS

3. For an input message of any length, MD5 generates a _______-bit hash value.

a) 32
b) 64
c) 128
d) 256

4. MD5 was developed by:

a) Bruce Schneier
b) Ron Rivest
c) Whitfield Diffie
d) Martin Hellman

CREATED BY K. VICTOR BABU


SELF-ASSESSMENT QUESTIONS

5. Which statement regarding MD5 collisions is accurate?

a) MD5 guarantees no collisions.


b) Collisions are extremely rare in MD5.
c) Collisions are possible due to the birthday paradox.
d) Collisions are intentionally introduced for security purposes.

6. The security of MD5 is taken into account:

a) Highly secure
b) Moderately secure
c) Insecure
d) Theoretical
CREATED BY K. VICTOR BABU
SELF-ASSESSMENT QUESTIONS

7. Which weakness caused MD5's usage to decline and its security to be compromised?

a) Collision attacks]
b) Pre-image attacks
c) Birthday attacks
d) Chosen-prefix attacks

8. MD5 is frequently employed for:

a) Cryptographic encryption
b) Digital signatures
c) Password hashing
d) Public key encryption
CREATED BY K. VICTOR BABU
SELF-ASSESSMENT QUESTIONS

13. A 128-bit digest is what MD5, sometimes referred to as the _________, produces.

14. Commonly, the digest is shown as a numeric string, frequently in hexadecimal form.

15. It is computationally impossible to produce the identical hash value from two separate input
messages using the MD5 hash function because it is a __________ hash function.

16. Due to flaws like __________ attacks, MD5 is nevertheless regarded as insecure for
cryptographic applications.

17. For increased security, it is advised to utilize stronger hash functions as _________ or
_________.

CREATED BY K. VICTOR BABU


SELF-ASSESSMENT QUESTIONS

9. The __________ algorithm for calculating a hash value of 128 bits is MD5.

10. It works with input messages that are __________ in length, splitting them into chunks of
a specific size

11. The MD5 algorithm uses blocks of _________ bits in size.

12. Each _________ block is processed by MD5 using a number of logical operations, bitwise
operations, and modular addition.

CREATED BY K. VICTOR BABU


TERMINAL QUESTIONS

1. Compare & Contrast SHA-512 & MD5.


2. Illustrate MD5 with a neat diagram
3. How does the MD5 algorithm process input messages of arbitrary
length? Explain the steps involved in dividing the input message into fixed-
sized blocks.
4. Describe the series of logical functions, bitwise operations, and modular
addition used in MD5 to process each block of the input message. How do
these operations contribute to the computation of the final hash value?
5. Discuss the internal state maintained by MD5 during its computation.
How is the state updated as the algorithm progresses through the blocks
of the input message? Explain the role of the intermediate hash value in
this process.
CREATED BY K. VICTOR BABU
REFERENCES FOR FURTHER LEARNING OF THE SESSION

1. Cryptography and Network Security Principles and Practice, by William


stallings, Pearson, 5th edition.
2.Applied Cryptography: Protocols, Algorthms, and Source Code in C , by Bruce
Schneier, Second Edition , John Wiley & Sons, Inc., 2015.
3.Applied Cryptography for Cyber Security and Defense: Information Encryption
and Cyphering, by Hamid R. Nemati and Li Yang, IGI Global, 2011
4. Forouzon B, “Cryptography and Network Security,” Indian Edition, TMH
(2010).

CREATED BY K. VICTOR BABU


THANK YOU

Team – CACD

CREATED BY K. VICTOR BABU

You might also like