SlideShare a Scribd company logo
4
Most read
7
Most read
9
Most read
Cryptographic Hash Function: MD5
1
1
Md. Shahidul Islam
CSE, KU
shahid.sm35@gmail.com
Outline
 Introduction
Features
Application
Algorithm
Hash analysis
Drawbacks
2
2
Introduction
 A cryptographic hash function is a kind of algorithm
that can be run on a piece of data, like an individual
file or a password, producing a value called a
checksum.
 MD5 (Message-Digest algorithm 5) is a widely used
cryptographic hash function designed by Ronald L.
Rivest in 1991.
 It is one in a series of message digest algorithms.
3
3
Features of a hash function
 Fixed Length Output (Hash Value)
 Efficiency in computing
 Collision Resistance, two different message should not have
the same hash value
 Deterministic so the same message always results in the same
hash
 Infeasible to generate a message from its hash value except
by trying all possible messages
4
4
Application
 There are two types of application of hash function:
1. Password Storage
2. Data Integrity Check
5
5
Application (Cont.)
 MD5 is used to store hash passwords and verify
when user login.
 An intruder can only see the hashes of passwords,
even if he accessed the password.
6
6
Application (Cont.)
7
7
Application (Cont.)
 The integrity check helps the user to detect any
changes made to original file.
8
8
Algorithm
9
9
Step 1: Append padded bits:
• The message is padded so that, length mod 512 = 448
• A single “1” bit is appended to the message, and then “0” bits are
appended so that the length in bits equals 448 modulo 512.
Message 1 0 0 0 0 0
(Message length + padded bits) % 512 = 448
Algorithm (Cont.)
10
10
Step 2: Append length:
• A 64 bit integer representation of message is appended to the result of
the previous step.
• The resulting message has a length that is an exact multiple of 512
bits.
Message 1 0 0 0 0 0 64bits
(Message length + padded bits + 64 bits ) % 512 = 0
Algorithm (Cont.)
11
Step 3: Initialize MD Buffer:
• A four-word buffer (A,B,C,D) is used to compute the message digest.
• These are initialized to the
following values in hexadecimal:
A: 01 23 45 67
B: 89 ab cd ef
C: fe dc ba 98
D: 76 54 32 10
Algorithm (Cont.)
12
Step 4: Process message in 16-word blocks:
• Four auxiliary functions that take as input three 32-bit
words and produce as output one 32-bit word.
F(X, Y, Z) = (X ˄ Y) ˅ (¬ X ˄ Z)
G(X, Y, Z) = (X ˄ Z) ˅ (Y ˄ ¬ Z)
H(X, Y, Z) = X  Y  Z
I(X, Y, Z) = Y  (X ˅ ¬Z)
Algorithm (Cont.)
13
Step 5: Output:
• The message digest produced as output is A, B, C, D.
• That is, output begins with the low-order byte of A,
and end with the high-order byte of D.
A1 A2 . . . . . . . . . . . . . . . . . . . . D3
128 bits = 32 hexadecimal digits
A1, A2 are bytes
Hash analysis
14
• A small change in original message and the output
digest is completely different
Hash analysis (Cont.)
15
• Arbitrary message length to fixed length digest
• For MD5 128 bits = 32bits hexadecimal
Drawbacks
 In 1993 a hash collision was found in MD5 compression
function.
 In 2009 a preimage attack against MD5 was published that
breaks MD5’s preimage resistance.
 In 2012, the most infamous attack happened by the Flame
Malware. The CMU Software Engineering Institute considers
MD5 "cryptographically broken and unsuitable for further
use".
16
16
Drawbacks (Cont.)
 For cracking password crackers use rainbow table
 Salting process can make rainbow table ineffective
17
17
Thank You
18

More Related Content

What's hot (20)

PPTX
Message digest 5
Tirthika Bandi
 
PPT
DES (Data Encryption Standard) pressentation
sarhadisoftengg
 
PPTX
Hash function
Salman Memon
 
PPTX
Symmetric encryption
DR RICHMOND ADEBIAYE
 
PDF
AES-Advanced Encryption Standard
Prince Rachit
 
PPT
Network security cryptographic hash function
Mijanur Rahman Milon
 
PDF
SHA 1 Algorithm
Shiva RamDam
 
PPTX
Cryptography and Information Security
Dr Naim R Kidwai
 
PPT
Message Authentication Code & HMAC
Krishna Gehlot
 
PDF
symmetric key encryption algorithms
Rashmi Burugupalli
 
PPT
Data encryption standard
Vasuki Ramasamy
 
PDF
RSA ALGORITHM
Dr. Shashank Shetty
 
PPT
Message authentication and hash function
omarShiekh1
 
PDF
Asymmetric Cryptography
UTD Computer Security Group
 
PPTX
5. message authentication and hash function
Chirag Patel
 
PPTX
RSA algorithm
Arpana shree
 
PPTX
Password cracking and brute force
vishalgohel12195
 
PPTX
RSA ALGORITHM
Sathish Kumar
 
Message digest 5
Tirthika Bandi
 
DES (Data Encryption Standard) pressentation
sarhadisoftengg
 
Hash function
Salman Memon
 
Symmetric encryption
DR RICHMOND ADEBIAYE
 
AES-Advanced Encryption Standard
Prince Rachit
 
Network security cryptographic hash function
Mijanur Rahman Milon
 
SHA 1 Algorithm
Shiva RamDam
 
Cryptography and Information Security
Dr Naim R Kidwai
 
Message Authentication Code & HMAC
Krishna Gehlot
 
symmetric key encryption algorithms
Rashmi Burugupalli
 
Data encryption standard
Vasuki Ramasamy
 
RSA ALGORITHM
Dr. Shashank Shetty
 
Message authentication and hash function
omarShiekh1
 
Asymmetric Cryptography
UTD Computer Security Group
 
5. message authentication and hash function
Chirag Patel
 
RSA algorithm
Arpana shree
 
Password cracking and brute force
vishalgohel12195
 
RSA ALGORITHM
Sathish Kumar
 

Similar to Cryptographic hash function md5 (20)

PPTX
Cryptographic Hash Functions in Security.pptx
VivekanandaGN1
 
PDF
Hashing Algorithm: MD5
ijsrd.com
 
PDF
An Enhanced Message Digest Hash Algorithm for Information Security
paperpublications3
 
PDF
A Comparative Analysis between SHA and MD5 algorithms
Er Piyush Gupta IN ⊞⌘
 
PPTX
Message Digest message digest ppttsx.pptx
LaxmipujaBiradar
 
PDF
A technical writing on cryptographic hash function md5
Khulna University, Khulna, Bangladesh
 
PDF
Cs8792 cns - unit iv
ArthyR3
 
PDF
Cs8792 cns - unit iv
ArthyR3
 
PPTX
Data streaming algorithms
Hridyesh Bisht
 
PPT
Hash Function & Analysis
Pawandeep Kaur
 
PPT
ENGG_CSE_III_YEAR_Message_Digest_MD_5.ppt
SakethBhargavaRallap
 
PDF
Cns
ArthyR3
 
PPT
Secure hashing algorithm
Karteek Paruchuri
 
PDF
IRJET - Hash Functions and its Security for Snags
IRJET Journal
 
PPT
introduction to MD5 Massage Digest Algorithm.ppt
madlord2
 
PPT
Hash mac algorithms
Young Alista
 
PPT
Hash mac algorithms
James Wong
 
PPT
Hash mac algorithms
David Hoen
 
PPT
Hash mac algorithms
Fraboni Ec
 
PPT
Hash& mac algorithms
Harry Potter
 
Cryptographic Hash Functions in Security.pptx
VivekanandaGN1
 
Hashing Algorithm: MD5
ijsrd.com
 
An Enhanced Message Digest Hash Algorithm for Information Security
paperpublications3
 
A Comparative Analysis between SHA and MD5 algorithms
Er Piyush Gupta IN ⊞⌘
 
Message Digest message digest ppttsx.pptx
LaxmipujaBiradar
 
A technical writing on cryptographic hash function md5
Khulna University, Khulna, Bangladesh
 
Cs8792 cns - unit iv
ArthyR3
 
Cs8792 cns - unit iv
ArthyR3
 
Data streaming algorithms
Hridyesh Bisht
 
Hash Function & Analysis
Pawandeep Kaur
 
ENGG_CSE_III_YEAR_Message_Digest_MD_5.ppt
SakethBhargavaRallap
 
Cns
ArthyR3
 
Secure hashing algorithm
Karteek Paruchuri
 
IRJET - Hash Functions and its Security for Snags
IRJET Journal
 
introduction to MD5 Massage Digest Algorithm.ppt
madlord2
 
Hash mac algorithms
Young Alista
 
Hash mac algorithms
James Wong
 
Hash mac algorithms
David Hoen
 
Hash mac algorithms
Fraboni Ec
 
Hash& mac algorithms
Harry Potter
 
Ad

Recently uploaded (20)

PPTX
Views on Education of Indian Thinkers J.Krishnamurthy..pptx
ShrutiMahanta1
 
PPTX
How to Configure Lost Reasons in Odoo 18 CRM
Celine George
 
PPTX
PPT on the Development of Education in the Victorian England
Beena E S
 
PPTX
Growth and development and milestones, factors
BHUVANESHWARI BADIGER
 
PDF
IMP NAAC-Reforms-Stakeholder-Consultation-Presentation-on-Draft-Metrics-Unive...
BHARTIWADEKAR
 
PPTX
ASRB NET 2023 PREVIOUS YEAR QUESTION PAPER GENETICS AND PLANT BREEDING BY SAT...
Krashi Coaching
 
PPT
digestive system for Pharm d I year HAP
rekhapositivity
 
PPTX
Gall bladder, Small intestine and Large intestine.pptx
rekhapositivity
 
PPTX
How to Configure Prepayments in Odoo 18 Sales
Celine George
 
PDF
ARAL-Orientation_Morning-Session_Day-11.pdf
JoelVilloso1
 
PDF
Federal dollars withheld by district, charter, grant recipient
Mebane Rash
 
PDF
BÀI TẬP BỔ TRỢ TIẾNG ANH 8 - GLOBAL SUCCESS - CẢ NĂM - NĂM 2024 (VOCABULARY, ...
Nguyen Thanh Tu Collection
 
PPSX
HEALTH ASSESSMENT (Community Health Nursing) - GNM 1st Year
Priyanshu Anand
 
PPTX
Views on Education of Indian Thinkers Mahatma Gandhi.pptx
ShrutiMahanta1
 
PDF
DIGESTION OF CARBOHYDRATES,PROTEINS,LIPIDS
raviralanaresh2
 
PDF
CONCURSO DE POESIA “POETUFAS – PASSOS SUAVES PELO VERSO.pdf
Colégio Santa Teresinha
 
PPTX
How to Manage Access Rights & User Types in Odoo 18
Celine George
 
PPTX
Explorando Recursos do Summer '25: Dicas Essenciais - 02
Mauricio Alexandre Silva
 
PPTX
How to Manage Promotions in Odoo 18 Sales
Celine George
 
PPTX
Optimizing Cancer Screening With MCED Technologies: From Science to Practical...
i3 Health
 
Views on Education of Indian Thinkers J.Krishnamurthy..pptx
ShrutiMahanta1
 
How to Configure Lost Reasons in Odoo 18 CRM
Celine George
 
PPT on the Development of Education in the Victorian England
Beena E S
 
Growth and development and milestones, factors
BHUVANESHWARI BADIGER
 
IMP NAAC-Reforms-Stakeholder-Consultation-Presentation-on-Draft-Metrics-Unive...
BHARTIWADEKAR
 
ASRB NET 2023 PREVIOUS YEAR QUESTION PAPER GENETICS AND PLANT BREEDING BY SAT...
Krashi Coaching
 
digestive system for Pharm d I year HAP
rekhapositivity
 
Gall bladder, Small intestine and Large intestine.pptx
rekhapositivity
 
How to Configure Prepayments in Odoo 18 Sales
Celine George
 
ARAL-Orientation_Morning-Session_Day-11.pdf
JoelVilloso1
 
Federal dollars withheld by district, charter, grant recipient
Mebane Rash
 
BÀI TẬP BỔ TRỢ TIẾNG ANH 8 - GLOBAL SUCCESS - CẢ NĂM - NĂM 2024 (VOCABULARY, ...
Nguyen Thanh Tu Collection
 
HEALTH ASSESSMENT (Community Health Nursing) - GNM 1st Year
Priyanshu Anand
 
Views on Education of Indian Thinkers Mahatma Gandhi.pptx
ShrutiMahanta1
 
DIGESTION OF CARBOHYDRATES,PROTEINS,LIPIDS
raviralanaresh2
 
CONCURSO DE POESIA “POETUFAS – PASSOS SUAVES PELO VERSO.pdf
Colégio Santa Teresinha
 
How to Manage Access Rights & User Types in Odoo 18
Celine George
 
Explorando Recursos do Summer '25: Dicas Essenciais - 02
Mauricio Alexandre Silva
 
How to Manage Promotions in Odoo 18 Sales
Celine George
 
Optimizing Cancer Screening With MCED Technologies: From Science to Practical...
i3 Health
 
Ad

Cryptographic hash function md5

  • 1. Cryptographic Hash Function: MD5 1 1 Md. Shahidul Islam CSE, KU [email protected]
  • 3. Introduction  A cryptographic hash function is a kind of algorithm that can be run on a piece of data, like an individual file or a password, producing a value called a checksum.  MD5 (Message-Digest algorithm 5) is a widely used cryptographic hash function designed by Ronald L. Rivest in 1991.  It is one in a series of message digest algorithms. 3 3
  • 4. Features of a hash function  Fixed Length Output (Hash Value)  Efficiency in computing  Collision Resistance, two different message should not have the same hash value  Deterministic so the same message always results in the same hash  Infeasible to generate a message from its hash value except by trying all possible messages 4 4
  • 5. Application  There are two types of application of hash function: 1. Password Storage 2. Data Integrity Check 5 5
  • 6. Application (Cont.)  MD5 is used to store hash passwords and verify when user login.  An intruder can only see the hashes of passwords, even if he accessed the password. 6 6
  • 8. Application (Cont.)  The integrity check helps the user to detect any changes made to original file. 8 8
  • 9. Algorithm 9 9 Step 1: Append padded bits: • The message is padded so that, length mod 512 = 448 • A single “1” bit is appended to the message, and then “0” bits are appended so that the length in bits equals 448 modulo 512. Message 1 0 0 0 0 0 (Message length + padded bits) % 512 = 448
  • 10. Algorithm (Cont.) 10 10 Step 2: Append length: • A 64 bit integer representation of message is appended to the result of the previous step. • The resulting message has a length that is an exact multiple of 512 bits. Message 1 0 0 0 0 0 64bits (Message length + padded bits + 64 bits ) % 512 = 0
  • 11. Algorithm (Cont.) 11 Step 3: Initialize MD Buffer: • A four-word buffer (A,B,C,D) is used to compute the message digest. • These are initialized to the following values in hexadecimal: A: 01 23 45 67 B: 89 ab cd ef C: fe dc ba 98 D: 76 54 32 10
  • 12. Algorithm (Cont.) 12 Step 4: Process message in 16-word blocks: • Four auxiliary functions that take as input three 32-bit words and produce as output one 32-bit word. F(X, Y, Z) = (X ˄ Y) ˅ (¬ X ˄ Z) G(X, Y, Z) = (X ˄ Z) ˅ (Y ˄ ¬ Z) H(X, Y, Z) = X  Y  Z I(X, Y, Z) = Y  (X ˅ ¬Z)
  • 13. Algorithm (Cont.) 13 Step 5: Output: • The message digest produced as output is A, B, C, D. • That is, output begins with the low-order byte of A, and end with the high-order byte of D. A1 A2 . . . . . . . . . . . . . . . . . . . . D3 128 bits = 32 hexadecimal digits A1, A2 are bytes
  • 14. Hash analysis 14 • A small change in original message and the output digest is completely different
  • 15. Hash analysis (Cont.) 15 • Arbitrary message length to fixed length digest • For MD5 128 bits = 32bits hexadecimal
  • 16. Drawbacks  In 1993 a hash collision was found in MD5 compression function.  In 2009 a preimage attack against MD5 was published that breaks MD5’s preimage resistance.  In 2012, the most infamous attack happened by the Flame Malware. The CMU Software Engineering Institute considers MD5 "cryptographically broken and unsuitable for further use". 16 16
  • 17. Drawbacks (Cont.)  For cracking password crackers use rainbow table  Salting process can make rainbow table ineffective 17 17

Editor's Notes

  • #4: A checksum is a small-sized datum derived from a block of digital data for the purpose of detecting errors. - wikipedia
  • #8: Image source: Internet
  • #9: Image source: Internet
  • #17: A preimage attack on cryptographic hash functions tries to find a message that has a specific hash value.