SlideShare a Scribd company logo
1 of 16
Download to read offline
CYBER SECURITY PRESENTATION
MD5
BRIEF REFRESHER ON
by Prateek Karkera
CYBER SECURITY PRESENTATION
Cryptography
MD5
Symmetric Key Cryptography
Same Private key is used for encryption and
decryption.
Asymmetric Key Cryptography
Public key used for encryption and another,
different Private key is used for decryption
CYBER SECURITY PRESENTATION
Authentication
MD5
If A is the sender of a message and B is the
receiver, A encrypts the message with A’s private
key and sends the encrypted message to B.
This scheme does not achieve confidentiality, it
achieves authentication (identifying and proving
A as the sender).
This achieves the purpose of non-repudiation. B
can take the encrypted message, and decrypt it
with A’s public key to prove that the message
indeed came from A.
CYBER SECURITY PRESENTATION
Message Digest
MD5
We perform a hashing operation (or a message digest
algorithm) over a block of data to produce its hash or
message digest which is smaller in size than the original
message.
MD5 is a message-digest algorithm developed by Ron Rivest.
It has its roots in a series of message-digest algorithms,
which were the predecessors of MD5, all developed by Rivest.
In real practice, a more efficient scheme for Authentication is
used. It involves the usage of a message digest (also called
hash).
CYBER SECURITY PRESENTATION
Properties
MD5
Given a message, it should be very easy to
find its corresponding message digest. Also,
for a given message, the message digest
must always be the same
CYBER SECURITY PRESENTATION
Properties
MD5
Given a message digest, it should be very
difficult to find the original message for which
the digest was created.
CYBER SECURITY PRESENTATION
Properties
MD5
Given a message, it should be very easy to
find its corresponding message digest. Also,
for a given message, the message digest
must always be the same
CYBER SECURITY PRESENTATION
Collision
MD5
If any two messages produce the same message digest, thus
violating our principle, it is called a collision.
CYBER SECURITY PRESENTATION
Steps
MD5
01
The first step in MD5 is to add padding bits to the original message to make the length of the original
message equal to a value, which is 64 bits less than an exact multiple of 512.
For eg., it could be 448 bits (512-64), 960 bits ((2 x 512) - 64), 1472 bits ((3 x 512) - 64), etc.
Padding is always added, even if the message is already a multiple of 512.
CYBER SECURITY PRESENTATION
The length of the message is
calculated, excluding the padding bits
(length before the padding bits).
If the original message consisted of
1000 bits, and we added a padding of
472 bits to make the length of the
message 64 bits less than 1536 (a
multiple of 512).
Steps
MD5
02
Next step is to calculate the original length of the message, and add it to the end of the message, after padding.
Length of the original message is now expressed as a 64-bit value, and these 64 bits are appended to the end of the original message +
padding. If the length of the message exceeds 264
bits, we use only the low-order 64 bits of the length. That is, in effect, we calculate the
length mod 264
in that case. Length of the message is now an exact multiple of 512
CYBER SECURITY PRESENTATION
Steps
MD5
03
Divide the input message into
blocks, each of length 512 bits.
Steps
MD5
04
Four variables (called chaining variables) are initialized. They are
called A, B, C and D. Each of these is a 32-bit number. The initial
hexadecimal values of these chaining variables are shown
CYBER SECURITY PRESENTATION
Steps
MD5
05
There is a loop that runs for as many 512-bit blocks as
are in the message. Copy the four chaining variables
into four corresponding variables, a, b, c and d. Thus, we
now have a = A, b = B, c = C and d = D.
The algorithm considers the combination
of a, b, c and d as a 128-bit single
register. This register (abcd) is useful in
the actual algorithm operation for
holding intermediate as well as final
results.
CYBER SECURITY PRESENTATION
Divide the current 512-bit block into 16 sub-blocks. Thus, each sub-block contains 32 bits.
There are four rounds. In each round, we
process all the 16 sub-blocks belonging to a
block.
The inputs to each round are (a) all the 16
sub-blocks, (b) the variables a, b, c, d, and (c)
some constants, designated as t.
CYBER SECURITY PRESENTATION
Working
MD5
In each round, we have 16 input sub-blocks, named
M[0], M[1], …, M[15], or in general, M[i], where i varies
from 1 to 15. Each sub-block consists of 32 bits.
t is an array of constants. It contains 64 elements, with
each element consisting of 32 bits. We denote the
elements of this array t as t[1], t[2], … t[64], or in general
as t[k], where k varies from 1 to 64. Since there are four
rounds, we use 16 out of the 64 values of t in each round.
A process P is first performed on b, c and d. This process
P is different in all the four rounds.
The variable a is added to the output of the process P
(i.e. to the register abcd).
The message sub-block M[i] is added to the output.
The constant t[k] is added to the output.
The output is circular-left shifted by s bits.
The variable b is added to the output and this output
becomes the new abcd for the next step
CYBER SECURITY PRESENTATION
Working
MD5
We can mathematically express a single MD5
operation as:
a = b + ((a + Process P (b, c, d) + M[i] + T[k]) <<< s)
Where,
a, b, c, d = Chaining variables.
Process P = A non-linear operation.
M[i] = M[q ¥ 16 + i], which is the ith 32-bit word in
the qth 512-bit block of the message
t[k] = A constant, as discussed subsequently
<<<s = Circular-left shift by s bits
CYBER SECURITY PRESENTATION
Thank You
Closing
by Prateek Karkera

More Related Content

Similar to MD5.pptx.pdf

Cryptography and network security
Cryptography and network securityCryptography and network security
Cryptography and network security
patisa
 

Similar to MD5.pptx.pdf (20)

Basic explanation to md5 implementation in C
Basic explanation to md5 implementation in CBasic explanation to md5 implementation in C
Basic explanation to md5 implementation in C
 
MD5 ALGORITHM.pptx
MD5 ALGORITHM.pptxMD5 ALGORITHM.pptx
MD5 ALGORITHM.pptx
 
Cryptography and network_security
Cryptography and network_securityCryptography and network_security
Cryptography and network_security
 
A Comparative Study between RSA and MD5 algorithms
A Comparative Study between RSA and MD5 algorithms A Comparative Study between RSA and MD5 algorithms
A Comparative Study between RSA and MD5 algorithms
 
SHA
SHASHA
SHA
 
Cs8792 cns - unit iv
Cs8792   cns - unit ivCs8792   cns - unit iv
Cs8792 cns - unit iv
 
Cs8792 cns - unit iv
Cs8792   cns - unit ivCs8792   cns - unit iv
Cs8792 cns - unit iv
 
Cryptography Key Management.pptx
Cryptography Key Management.pptxCryptography Key Management.pptx
Cryptography Key Management.pptx
 
Hashing Algorithm: MD5
Hashing Algorithm: MD5Hashing Algorithm: MD5
Hashing Algorithm: MD5
 
Data streaming algorithms
Data streaming algorithmsData streaming algorithms
Data streaming algorithms
 
Cryptographic hash function md5
Cryptographic hash function md5Cryptographic hash function md5
Cryptographic hash function md5
 
PGP S/MIME
PGP S/MIMEPGP S/MIME
PGP S/MIME
 
Pkcs 5
Pkcs 5Pkcs 5
Pkcs 5
 
Cns
CnsCns
Cns
 
Chapter 15 - Security
Chapter 15 - SecurityChapter 15 - Security
Chapter 15 - Security
 
Message digest 5
Message digest 5Message digest 5
Message digest 5
 
Cryptography and network security
Cryptography and network securityCryptography and network security
Cryptography and network security
 
Unit 3
Unit 3Unit 3
Unit 3
 
Moein
MoeinMoein
Moein
 
Unit-3.pdf
Unit-3.pdfUnit-3.pdf
Unit-3.pdf
 

Recently uploaded

Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Victor Rentea
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Safe Software
 
TrustArc Webinar - Unified Trust Center for Privacy, Security, Compliance, an...
TrustArc Webinar - Unified Trust Center for Privacy, Security, Compliance, an...TrustArc Webinar - Unified Trust Center for Privacy, Security, Compliance, an...
TrustArc Webinar - Unified Trust Center for Privacy, Security, Compliance, an...
TrustArc
 

Recently uploaded (20)

الأمن السيبراني - ما لا يسع للمستخدم جهله
الأمن السيبراني - ما لا يسع للمستخدم جهلهالأمن السيبراني - ما لا يسع للمستخدم جهله
الأمن السيبراني - ما لا يسع للمستخدم جهله
 
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
 
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 AmsterdamDEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
 
Choreo: Empowering the Future of Enterprise Software Engineering
Choreo: Empowering the Future of Enterprise Software EngineeringChoreo: Empowering the Future of Enterprise Software Engineering
Choreo: Empowering the Future of Enterprise Software Engineering
 
WSO2's API Vision: Unifying Control, Empowering Developers
WSO2's API Vision: Unifying Control, Empowering DevelopersWSO2's API Vision: Unifying Control, Empowering Developers
WSO2's API Vision: Unifying Control, Empowering Developers
 
Design and Development of a Provenance Capture Platform for Data Science
Design and Development of a Provenance Capture Platform for Data ScienceDesign and Development of a Provenance Capture Platform for Data Science
Design and Development of a Provenance Capture Platform for Data Science
 
Decarbonising Commercial Real Estate: The Role of Operational Performance
Decarbonising Commercial Real Estate: The Role of Operational PerformanceDecarbonising Commercial Real Estate: The Role of Operational Performance
Decarbonising Commercial Real Estate: The Role of Operational Performance
 
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ..."I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
 
Intro to Passkeys and the State of Passwordless.pptx
Intro to Passkeys and the State of Passwordless.pptxIntro to Passkeys and the State of Passwordless.pptx
Intro to Passkeys and the State of Passwordless.pptx
 
DBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor Presentation
 
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
 
JavaScript Usage Statistics 2024 - The Ultimate Guide
JavaScript Usage Statistics 2024 - The Ultimate GuideJavaScript Usage Statistics 2024 - The Ultimate Guide
JavaScript Usage Statistics 2024 - The Ultimate Guide
 
Simplifying Mobile A11y Presentation.pptx
Simplifying Mobile A11y Presentation.pptxSimplifying Mobile A11y Presentation.pptx
Simplifying Mobile A11y Presentation.pptx
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
Introduction to use of FHIR Documents in ABDM
Introduction to use of FHIR Documents in ABDMIntroduction to use of FHIR Documents in ABDM
Introduction to use of FHIR Documents in ABDM
 
TEST BANK For Principles of Anatomy and Physiology, 16th Edition by Gerard J....
TEST BANK For Principles of Anatomy and Physiology, 16th Edition by Gerard J....TEST BANK For Principles of Anatomy and Physiology, 16th Edition by Gerard J....
TEST BANK For Principles of Anatomy and Physiology, 16th Edition by Gerard J....
 
ChatGPT and Beyond - Elevating DevOps Productivity
ChatGPT and Beyond - Elevating DevOps ProductivityChatGPT and Beyond - Elevating DevOps Productivity
ChatGPT and Beyond - Elevating DevOps Productivity
 
Introduction to Multilingual Retrieval Augmented Generation (RAG)
Introduction to Multilingual Retrieval Augmented Generation (RAG)Introduction to Multilingual Retrieval Augmented Generation (RAG)
Introduction to Multilingual Retrieval Augmented Generation (RAG)
 
Design Guidelines for Passkeys 2024.pptx
Design Guidelines for Passkeys 2024.pptxDesign Guidelines for Passkeys 2024.pptx
Design Guidelines for Passkeys 2024.pptx
 
TrustArc Webinar - Unified Trust Center for Privacy, Security, Compliance, an...
TrustArc Webinar - Unified Trust Center for Privacy, Security, Compliance, an...TrustArc Webinar - Unified Trust Center for Privacy, Security, Compliance, an...
TrustArc Webinar - Unified Trust Center for Privacy, Security, Compliance, an...
 

MD5.pptx.pdf

  • 1. CYBER SECURITY PRESENTATION MD5 BRIEF REFRESHER ON by Prateek Karkera
  • 2. CYBER SECURITY PRESENTATION Cryptography MD5 Symmetric Key Cryptography Same Private key is used for encryption and decryption. Asymmetric Key Cryptography Public key used for encryption and another, different Private key is used for decryption
  • 3. CYBER SECURITY PRESENTATION Authentication MD5 If A is the sender of a message and B is the receiver, A encrypts the message with A’s private key and sends the encrypted message to B. This scheme does not achieve confidentiality, it achieves authentication (identifying and proving A as the sender). This achieves the purpose of non-repudiation. B can take the encrypted message, and decrypt it with A’s public key to prove that the message indeed came from A.
  • 4. CYBER SECURITY PRESENTATION Message Digest MD5 We perform a hashing operation (or a message digest algorithm) over a block of data to produce its hash or message digest which is smaller in size than the original message. MD5 is a message-digest algorithm developed by Ron Rivest. It has its roots in a series of message-digest algorithms, which were the predecessors of MD5, all developed by Rivest. In real practice, a more efficient scheme for Authentication is used. It involves the usage of a message digest (also called hash).
  • 5. CYBER SECURITY PRESENTATION Properties MD5 Given a message, it should be very easy to find its corresponding message digest. Also, for a given message, the message digest must always be the same
  • 6. CYBER SECURITY PRESENTATION Properties MD5 Given a message digest, it should be very difficult to find the original message for which the digest was created.
  • 7. CYBER SECURITY PRESENTATION Properties MD5 Given a message, it should be very easy to find its corresponding message digest. Also, for a given message, the message digest must always be the same
  • 8. CYBER SECURITY PRESENTATION Collision MD5 If any two messages produce the same message digest, thus violating our principle, it is called a collision.
  • 9. CYBER SECURITY PRESENTATION Steps MD5 01 The first step in MD5 is to add padding bits to the original message to make the length of the original message equal to a value, which is 64 bits less than an exact multiple of 512. For eg., it could be 448 bits (512-64), 960 bits ((2 x 512) - 64), 1472 bits ((3 x 512) - 64), etc. Padding is always added, even if the message is already a multiple of 512.
  • 10. CYBER SECURITY PRESENTATION The length of the message is calculated, excluding the padding bits (length before the padding bits). If the original message consisted of 1000 bits, and we added a padding of 472 bits to make the length of the message 64 bits less than 1536 (a multiple of 512). Steps MD5 02 Next step is to calculate the original length of the message, and add it to the end of the message, after padding. Length of the original message is now expressed as a 64-bit value, and these 64 bits are appended to the end of the original message + padding. If the length of the message exceeds 264 bits, we use only the low-order 64 bits of the length. That is, in effect, we calculate the length mod 264 in that case. Length of the message is now an exact multiple of 512
  • 11. CYBER SECURITY PRESENTATION Steps MD5 03 Divide the input message into blocks, each of length 512 bits. Steps MD5 04 Four variables (called chaining variables) are initialized. They are called A, B, C and D. Each of these is a 32-bit number. The initial hexadecimal values of these chaining variables are shown
  • 12. CYBER SECURITY PRESENTATION Steps MD5 05 There is a loop that runs for as many 512-bit blocks as are in the message. Copy the four chaining variables into four corresponding variables, a, b, c and d. Thus, we now have a = A, b = B, c = C and d = D. The algorithm considers the combination of a, b, c and d as a 128-bit single register. This register (abcd) is useful in the actual algorithm operation for holding intermediate as well as final results.
  • 13. CYBER SECURITY PRESENTATION Divide the current 512-bit block into 16 sub-blocks. Thus, each sub-block contains 32 bits. There are four rounds. In each round, we process all the 16 sub-blocks belonging to a block. The inputs to each round are (a) all the 16 sub-blocks, (b) the variables a, b, c, d, and (c) some constants, designated as t.
  • 14. CYBER SECURITY PRESENTATION Working MD5 In each round, we have 16 input sub-blocks, named M[0], M[1], …, M[15], or in general, M[i], where i varies from 1 to 15. Each sub-block consists of 32 bits. t is an array of constants. It contains 64 elements, with each element consisting of 32 bits. We denote the elements of this array t as t[1], t[2], … t[64], or in general as t[k], where k varies from 1 to 64. Since there are four rounds, we use 16 out of the 64 values of t in each round. A process P is first performed on b, c and d. This process P is different in all the four rounds. The variable a is added to the output of the process P (i.e. to the register abcd). The message sub-block M[i] is added to the output. The constant t[k] is added to the output. The output is circular-left shifted by s bits. The variable b is added to the output and this output becomes the new abcd for the next step
  • 15. CYBER SECURITY PRESENTATION Working MD5 We can mathematically express a single MD5 operation as: a = b + ((a + Process P (b, c, d) + M[i] + T[k]) <<< s) Where, a, b, c, d = Chaining variables. Process P = A non-linear operation. M[i] = M[q ¥ 16 + i], which is the ith 32-bit word in the qth 512-bit block of the message t[k] = A constant, as discussed subsequently <<<s = Circular-left shift by s bits
  • 16. CYBER SECURITY PRESENTATION Thank You Closing by Prateek Karkera