SlideShare a Scribd company logo
2
Most read
IJSRD - International Journal for Scientific Research & Development| Vol. 1, Issue 9, 2013 | ISSN (online): 2321-0613
All rights reserved by www.ijsrd.com 1931
Hashing Algorithm: MD5
Shweta Mishra1
Shikha Mishra2
Nilesh Kumar3
1, 2, 3
Department of Computer Science & Engineering
1
Echelon Institute of Technology, Faridabad, India 2, 3
JB Knowledge Park, Faridabad, India
Abstract—a message digest is a cryptographic hash function
containing a string of digits created by a one-way hashing
formula. Message digests are designed to protect the
integrity of a piece of data or media to detect changes and
alterations to any part of a message. In this paper, we have
explained the hashing algorithm of MD5 and also proposed
how to use it for file transmission and for hashing any
string.
General Terms: Security, Algorithms, Auxiliary Functions
Key words: Hash function, MD.
I. INTRODUCTION
Message Digest is a type of cryptography utilizing hash
values that can warn the copyright owner of any
modifications applied to their work. Message digest hash
numbers represent specific files containing the protected
works. One message digest is assigned to particular data
content. It can reference a change made deliberately or
accidentally, but it prompts the owner to identify the
modification as well as the individual(s) making the change.
Message digests are algorithmic numbers. MD5 was the last
in a succession of cryptographic hash functions designed by
Ron Rivest in the early 1990s [1].
It is a widely-used well-known 128-bit iterated
hash function, used in various applications including
SSL/TLS, IPsec, and many other cryptographic protocols. It
is also commonly-used in implementations of time stamping
mechanisms, commitment schemes, and integrity-checking
applications for online software, distributed systems, and
random-number generation.
Message digest functions are used to produce
digital summaries of information called message digests.
Message digests are commonly 128 bits to 160 bits in length
and provide a digital identifier for each digital file or
document. Message digest functions are mathematical
functions that process information to produce a different
message digest for each unique document [2]. Identical
documents have the same message digest; but if even one of
the bits for the document changes, the message digest
changes.
Because message digests are much shorter than the
data from which the digests are generated and the digests
have a finite length, duplicate message digests called
collisions can exist for different data sets. However, good
message digest functions use one-way functions to ensure
that it is mathematically and computationally infeasible to
reverse the message digest process and discover the original
data. Finding collisions for good message digest functions is
also mathematically and computationally infeasible but
possible given enough time and computational effort.
However, even if an attacker discovers a collision, it is
highly improbable that the collision could be useful.
II. NETWORK SECURITY AND MESSAGE DIGEST
Security and privacy is a growing concern in the Internet
community, due to the Internet’s rapid growth and the desire
to conduct business over it safely. This desire has led to the
advent of several proposals for security standards, such as
secure IP, Secure HTTP (SHTTP), and the Secure Socket
Layer (SSL). Thus, the need to use encryption protocols
such as DES and RSA is increasing. One problem with
using cryptographic protocols is the fact that they are slow.
An important question then is whether security can be
provided at gigabit speeds.
The standard set of algorithms required to secure a
connection includes a bulk encryption algorithm such as
DES, a cryptographic message digest such as MD5, a key
exchange algorithm such as Diffie-Hellman to securely
distribute a private key, and some form of digital signature
algorithm to authenticate the parties, such as RSA. The
encryption and hash digest algorithms must be applied to
every packet going across a link to ensure confidentiality,
and therefore the performance of these algorithms directly
affects the achievable throughput of an application. MD5 is
a message digest algorithm used for authentication and
message integrity. MD5 is a “required option” for secure IP;
by required option we mean that an application’s use of
MD5 in IP is optional, but an implementation must support
use of that option. MD5 is also the default message digest
algorithm proposed for SHTTP; and is also used in SSL.
III. MD5 ALGORITHM
The MD5 algorithm is designed to be quite fast on 32-bit
machines. In addition, the MD5 algorithm does not require
any large substitution tables; the algorithm can be coded
quite compactly. The MD5 algorithm is an extension of the
MD4 message-digest algorithm MD5 is slightly slower than
MD4, but is more "conservative" in design.
MD5 algorithm takes as input a message of
arbitrary length and produces as output a 128 bit message
digest of the input. The authentication algorithm computes a
digest of the entire data of the message, used for
authentication. Typically, the message digest is registered
with a trusted third-party, or encrypted via other means. The
digest is used by the receiver to verify the contents of a
message. It can also be used to encrypt the contents of a
message, via a second pass over the data by another
algorithm. MD5 requires that both the sender and receiver
compute the digest of the entire body of a message [3] [4].
Suppose a b-bit message as input, and that we need
to find its message digest.
Hashing Algorithm: MD5
(IJSRD/Vol. 1/Issue 9/2013/0060)
All rights reserved by www.ijsrd.com 1932
Step. 1 : Append padded bits--
The message is padded so that its length is
congruent to 448, modulo 512. 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.
Step. 2 : Append length--
A 64 bit representation of b is appended to the
result of the previous step. The resulting message
has a length that is an exact multiple of 512 bits.
Step. 3 : Initialize MD Buffer--
A four-word buffer (A, B, C, D) is used to compute
the message digest. Here each of A, B, C, D is a 32
bit register. These registers are initialized to the
following values in hexadecimal:
Word A: 01 23 45 67
Word B: 89 ab cd ef
Word C: fe dc ba 98
word D: 76 54 32 10
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) = XY v not(X) Z
G(X,Y,Z) = XZ v Y not(Z)
H(X,Y,Z) = X xor Y xor Z
I(X,Y,Z) = Y xor (X v not(Z))
If the bits of X, Y, and Z are independent and
unbiased, the each bit of F(X,Y,Z), G(X,Y,Z),
H(X,Y,Z), and I(X,Y,Z) will be independent and
unbiased.
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[5].
IV. MD5 HELPER FUNCTIONS
The BufferA.
MD5 uses a buffer that is made up of four words, each 32
bits long. These words are called A, B, C and D. They are
initialized as:
Fig. 1: MD5 Functions
Word A: 01 23 45 67
Word B: 89 ab cd ef
Word C: fe dc ba 98
Word D: 76 54 32 10
The TableB.
MD5 uses a table K that has 64 elements. The table is
computed beforehand to increase the speed of the
computation.
Auxiliary Functions(F)C.
MD5 uses four auxiliary functions that each take as input
three 32-bit words and produce as output one 32-bit word.
They apply the logical operators and, or, not and xor to the
input bits.
V. MD5 IN FILE TRANSMISSION
MD5 digests have been widely used in the software world to
provide some assurance that a transferred file has arrived
intact. , file servers often provide a pre-computed MD5
checksum for the files, so that a user can compare the
checksum of the downloaded file to it. However, now that it
is easy to generate MD5 collisions, it is possible for the
person who created the file to create a second file with the
same checksum, so this technique cannot protect against
some forms of malicious tampering. Also, in some cases, the
checksum cannot be trusted in which MD5 can only provide
error-checking functionality.
Hashing algorithm is applied on the file that to be
transmitted. Hashing value is then generated. When the file
is sent to the user or receiver one of the two conditions
arises. If the hash value received and the hash value
calculated matches then the file is correctly received by the
user but if those two values don’t match then the received
file have some error. In this way MD5 is used for
authentication purpose.
Fig. 2: MD5 in file transmission
Hashing Algorithm: MD5
(IJSRD/Vol. 1/Issue 9/2013/0060)
All rights reserved by www.ijsrd.com 1933
VI. CONCLUSION
Thus we saw that how message digest 5 is used for
authenticating any file and how it is used for hashing any
string using some helper functions. In my future work I
would be implementing this file transmission by using two
different algorithms and would like to show which one is
better by comparing their speeds and complexity. We would
also like to show how the various attacks are applied on
MD5 and what are their effects.
REFERENCES
[1] http://theory.lcs.mit.edu/~rivest/
[2] Bruce Schneir “Applied Cryptography: Protocols,
Algorithms, and Source Code in C”; 18.5 MD5 (pp.
436-441)
[3] Ronald Rivest: The MD5 Message Digest Algorithm,
RFC1321, April 1992, ftp://ftp.rfc-
editor.org/innotes/rfc1321.txt
[4] R.L. Rivest. The MD5 Message-Digest Algorithm.
RFC1321, MIT Laboratory for Computer Science and
RSA Data Security, Inc., April 1992.
[5] Amphion. CS5315, High Performance Message Digest
5 Algorithm (MD5) Core. Datasheet, URL:
http://www.amphion.com/acrobat/DS5315.pdf, (visited
September 9, 2004).
[6] J. Black, M. Cochran, T. Highland: A Study of the
MD5 Attacks: Insights and Improvements, March 3,
2006

More Related Content

What's hot (20)

PPTX
Cryptography Ashik
Ashik Iqbal
 
PDF
Modified MD5 Algorithm for Password Encryption
International Journal of Computer and Communication System Engineering
 
PDF
A technical writing on cryptographic hash function md5
Khulna University, Khulna, Bangladesh
 
PDF
The SHA Hashing Algorithm
Bob Landstrom
 
PPTX
Message digest 5
Tirthika Bandi
 
PPTX
Hash function
Harry Potter
 
PPTX
Message authentication with md5
志璿 楊
 
PPT
Network security cryptographic hash function
Mijanur Rahman Milon
 
PPTX
Basic explanation to md5 implementation in C
Sourav Punoriyar
 
PPT
01204427-Hash_Crypto (1).ppt
GnanalakshmiV
 
PPTX
Hash Function
Siddharth Srivastava
 
PDF
Hash
Tazo Al
 
PPTX
5. message authentication and hash function
Chirag Patel
 
PPTX
Network Security(MD5)
United International University
 
PPTX
Cryptographic Hashing Functions
Yusuf Uzun
 
PPTX
Hash Function
stalin rijal
 
PPT
Hash crypto
Harry Potter
 
Cryptography Ashik
Ashik Iqbal
 
Modified MD5 Algorithm for Password Encryption
International Journal of Computer and Communication System Engineering
 
A technical writing on cryptographic hash function md5
Khulna University, Khulna, Bangladesh
 
The SHA Hashing Algorithm
Bob Landstrom
 
Message digest 5
Tirthika Bandi
 
Hash function
Harry Potter
 
Message authentication with md5
志璿 楊
 
Network security cryptographic hash function
Mijanur Rahman Milon
 
Basic explanation to md5 implementation in C
Sourav Punoriyar
 
01204427-Hash_Crypto (1).ppt
GnanalakshmiV
 
Hash Function
Siddharth Srivastava
 
Hash
Tazo Al
 
5. message authentication and hash function
Chirag Patel
 
Network Security(MD5)
United International University
 
Cryptographic Hashing Functions
Yusuf Uzun
 
Hash Function
stalin rijal
 
Hash crypto
Harry Potter
 

Viewers also liked (19)

PPTX
RSA & MD5 algorithm
Siva Rushi
 
PDF
Hash Functions, the MD5 Algorithm and the Future (SHA-3)
Dylan Field
 
PPT
Secure hashing algorithm
Karteek Paruchuri
 
PDF
A Comparative Study between RSA and MD5 algorithms
Er Piyush Gupta IN ⊞⌘
 
PDF
A Comparative Analysis between SHA and MD5 algorithms
Er Piyush Gupta IN ⊞⌘
 
PPT
Lecture1 Introduction
rajakhurram
 
PDF
HMAC authentication
Siu Tin
 
PPTX
Message digest & digital signature
Dinesh Kodam
 
PDF
Hashing
Ramzi Alqrainy
 
PDF
Triple Data Encryption Standard (t-DES)
Hardik Manocha
 
PPTX
Trible data encryption standard (3DES)
Ahmed Mohamed Mahmoud
 
PPTX
Secure Hash Algorithm (SHA-512)
DUET
 
PPTX
Hash Techniques in Cryptography
Basudev Saha
 
PPTX
Improving Healthcare Outcomes: Keep the Triple Aim in Mind
Health Catalyst
 
PPT
Message Authentication Code & HMAC
Krishna Gehlot
 
PDF
Data Vault 2.0: Using MD5 Hashes for Change Data Capture
Kent Graziano
 
PPT
Hashing
Ghaffar Khan
 
PPTX
Secure Hash Algorithm
Vishakha Agarwal
 
PDF
Introduction to Data Vault Modeling
Kent Graziano
 
RSA & MD5 algorithm
Siva Rushi
 
Hash Functions, the MD5 Algorithm and the Future (SHA-3)
Dylan Field
 
Secure hashing algorithm
Karteek Paruchuri
 
A Comparative Study between RSA and MD5 algorithms
Er Piyush Gupta IN ⊞⌘
 
A Comparative Analysis between SHA and MD5 algorithms
Er Piyush Gupta IN ⊞⌘
 
Lecture1 Introduction
rajakhurram
 
HMAC authentication
Siu Tin
 
Message digest & digital signature
Dinesh Kodam
 
Triple Data Encryption Standard (t-DES)
Hardik Manocha
 
Trible data encryption standard (3DES)
Ahmed Mohamed Mahmoud
 
Secure Hash Algorithm (SHA-512)
DUET
 
Hash Techniques in Cryptography
Basudev Saha
 
Improving Healthcare Outcomes: Keep the Triple Aim in Mind
Health Catalyst
 
Message Authentication Code & HMAC
Krishna Gehlot
 
Data Vault 2.0: Using MD5 Hashes for Change Data Capture
Kent Graziano
 
Hashing
Ghaffar Khan
 
Secure Hash Algorithm
Vishakha Agarwal
 
Introduction to Data Vault Modeling
Kent Graziano
 
Ad

Similar to Hashing Algorithm: MD5 (20)

PDF
Unit-3.pdf
HarishChaudhary21
 
PDF
An Enhanced Message Digest Hash Algorithm for Information Security
paperpublications3
 
PPT
ENGG_CSE_III_YEAR_Message_Digest_MD_5.ppt
SakethBhargavaRallap
 
PDF
MD5.pptx.pdf
PrateekKarkera1
 
PPT
An Introduction to Hashing: A basic understanding
prabhatv1
 
PDF
Implementation of New Modified MD5-512 bit Algorithm for Cryptography
AM Publications
 
PPTX
MD5 ALGORITHM.pptx
Rajapriya82
 
PPTX
Cryptography-Hash-Functions.pptx
AngeloChangcoco
 
PPT
introduction to MD5 Massage Digest Algorithm.ppt
madlord2
 
PPTX
chapter three 3-part II-1lecture slide.pptx
meharikiros2
 
PPTX
Message Digest message digest ppttsx.pptx
LaxmipujaBiradar
 
PPTX
Module 2onblockchain technologies 2.pptx
shruthig40
 
PPT
HifnCrypto101
Jim Faith
 
PPTX
IS413 Topic 5.pptx
WarrenPhiri4
 
PPT
Hash crypto
Fraboni Ec
 
PPT
Hash crypto
Luis Goldster
 
PPT
Hash crypto
David Hoen
 
PPT
Hash crypto
Tony Nguyen
 
PPT
Hash crypto
James Wong
 
PPT
Hash crypto
Young Alista
 
Unit-3.pdf
HarishChaudhary21
 
An Enhanced Message Digest Hash Algorithm for Information Security
paperpublications3
 
ENGG_CSE_III_YEAR_Message_Digest_MD_5.ppt
SakethBhargavaRallap
 
MD5.pptx.pdf
PrateekKarkera1
 
An Introduction to Hashing: A basic understanding
prabhatv1
 
Implementation of New Modified MD5-512 bit Algorithm for Cryptography
AM Publications
 
MD5 ALGORITHM.pptx
Rajapriya82
 
Cryptography-Hash-Functions.pptx
AngeloChangcoco
 
introduction to MD5 Massage Digest Algorithm.ppt
madlord2
 
chapter three 3-part II-1lecture slide.pptx
meharikiros2
 
Message Digest message digest ppttsx.pptx
LaxmipujaBiradar
 
Module 2onblockchain technologies 2.pptx
shruthig40
 
HifnCrypto101
Jim Faith
 
IS413 Topic 5.pptx
WarrenPhiri4
 
Hash crypto
Fraboni Ec
 
Hash crypto
Luis Goldster
 
Hash crypto
David Hoen
 
Hash crypto
Tony Nguyen
 
Hash crypto
James Wong
 
Hash crypto
Young Alista
 
Ad

More from ijsrd.com (20)

PDF
IoT Enabled Smart Grid
ijsrd.com
 
PDF
A Survey Report on : Security & Challenges in Internet of Things
ijsrd.com
 
PDF
IoT for Everyday Life
ijsrd.com
 
PDF
Study on Issues in Managing and Protecting Data of IOT
ijsrd.com
 
PDF
Interactive Technologies for Improving Quality of Education to Build Collabor...
ijsrd.com
 
PDF
Internet of Things - Paradigm Shift of Future Internet Application for Specia...
ijsrd.com
 
PDF
A Study of the Adverse Effects of IoT on Student's Life
ijsrd.com
 
PDF
Pedagogy for Effective use of ICT in English Language Learning
ijsrd.com
 
PDF
Virtual Eye - Smart Traffic Navigation System
ijsrd.com
 
PDF
Ontological Model of Educational Programs in Computer Science (Bachelor and M...
ijsrd.com
 
PDF
Understanding IoT Management for Smart Refrigerator
ijsrd.com
 
PDF
DESIGN AND ANALYSIS OF DOUBLE WISHBONE SUSPENSION SYSTEM USING FINITE ELEMENT...
ijsrd.com
 
PDF
A Review: Microwave Energy for materials processing
ijsrd.com
 
PDF
Web Usage Mining: A Survey on User's Navigation Pattern from Web Logs
ijsrd.com
 
PDF
APPLICATION OF STATCOM to IMPROVED DYNAMIC PERFORMANCE OF POWER SYSTEM
ijsrd.com
 
PDF
Making model of dual axis solar tracking with Maximum Power Point Tracking
ijsrd.com
 
PDF
A REVIEW PAPER ON PERFORMANCE AND EMISSION TEST OF 4 STROKE DIESEL ENGINE USI...
ijsrd.com
 
PDF
Study and Review on Various Current Comparators
ijsrd.com
 
PDF
Reducing Silicon Real Estate and Switching Activity Using Low Power Test Patt...
ijsrd.com
 
PDF
Defending Reactive Jammers in WSN using a Trigger Identification Service.
ijsrd.com
 
IoT Enabled Smart Grid
ijsrd.com
 
A Survey Report on : Security & Challenges in Internet of Things
ijsrd.com
 
IoT for Everyday Life
ijsrd.com
 
Study on Issues in Managing and Protecting Data of IOT
ijsrd.com
 
Interactive Technologies for Improving Quality of Education to Build Collabor...
ijsrd.com
 
Internet of Things - Paradigm Shift of Future Internet Application for Specia...
ijsrd.com
 
A Study of the Adverse Effects of IoT on Student's Life
ijsrd.com
 
Pedagogy for Effective use of ICT in English Language Learning
ijsrd.com
 
Virtual Eye - Smart Traffic Navigation System
ijsrd.com
 
Ontological Model of Educational Programs in Computer Science (Bachelor and M...
ijsrd.com
 
Understanding IoT Management for Smart Refrigerator
ijsrd.com
 
DESIGN AND ANALYSIS OF DOUBLE WISHBONE SUSPENSION SYSTEM USING FINITE ELEMENT...
ijsrd.com
 
A Review: Microwave Energy for materials processing
ijsrd.com
 
Web Usage Mining: A Survey on User's Navigation Pattern from Web Logs
ijsrd.com
 
APPLICATION OF STATCOM to IMPROVED DYNAMIC PERFORMANCE OF POWER SYSTEM
ijsrd.com
 
Making model of dual axis solar tracking with Maximum Power Point Tracking
ijsrd.com
 
A REVIEW PAPER ON PERFORMANCE AND EMISSION TEST OF 4 STROKE DIESEL ENGINE USI...
ijsrd.com
 
Study and Review on Various Current Comparators
ijsrd.com
 
Reducing Silicon Real Estate and Switching Activity Using Low Power Test Patt...
ijsrd.com
 
Defending Reactive Jammers in WSN using a Trigger Identification Service.
ijsrd.com
 

Recently uploaded (20)

PDF
Book.pdf01_Intro.ppt algorithm for preperation stu used
archu26
 
PPTX
Presentation on Foundation Design for Civil Engineers.pptx
KamalKhan563106
 
PPTX
REINFORCEMENT AS CONSTRUCTION MATERIALS.pptx
mohaiminulhaquesami
 
PDF
Additional Information in midterm CPE024 (1).pdf
abolisojoy
 
PDF
MOBILE AND WEB BASED REMOTE BUSINESS MONITORING SYSTEM
ijait
 
PDF
Unified_Cloud_Comm_Presentation anil singh ppt
anilsingh298751
 
PPTX
MobileComputingMANET2023 MobileComputingMANET2023.pptx
masterfake98765
 
PDF
A presentation on the Urban Heat Island Effect
studyfor7hrs
 
PPTX
NEUROMOROPHIC nu iajwojeieheueueueu.pptx
knkoodalingam39
 
PPTX
Introduction to Neural Networks and Perceptron Learning Algorithm.pptx
Kayalvizhi A
 
PPTX
Innowell Capability B0425 - Commercial Buildings.pptx
regobertroza
 
PDF
ARC--BUILDING-UTILITIES-2-PART-2 (1).pdf
IzzyBaniquedBusto
 
PPTX
Thermal runway and thermal stability.pptx
godow93766
 
PPTX
MPMC_Module-2 xxxxxxxxxxxxxxxxxxxxx.pptx
ShivanshVaidya5
 
PPTX
artificial intelligence applications in Geomatics
NawrasShatnawi1
 
PDF
BioSensors glucose monitoring, cholestrol
nabeehasahar1
 
PPTX
UNIT DAA PPT cover all topics 2021 regulation
archu26
 
PDF
6th International Conference on Machine Learning Techniques and Data Science ...
ijistjournal
 
PDF
UNIT-4-FEEDBACK AMPLIFIERS AND OSCILLATORS (1).pdf
Sridhar191373
 
PDF
Zilliz Cloud Demo for performance and scale
Zilliz
 
Book.pdf01_Intro.ppt algorithm for preperation stu used
archu26
 
Presentation on Foundation Design for Civil Engineers.pptx
KamalKhan563106
 
REINFORCEMENT AS CONSTRUCTION MATERIALS.pptx
mohaiminulhaquesami
 
Additional Information in midterm CPE024 (1).pdf
abolisojoy
 
MOBILE AND WEB BASED REMOTE BUSINESS MONITORING SYSTEM
ijait
 
Unified_Cloud_Comm_Presentation anil singh ppt
anilsingh298751
 
MobileComputingMANET2023 MobileComputingMANET2023.pptx
masterfake98765
 
A presentation on the Urban Heat Island Effect
studyfor7hrs
 
NEUROMOROPHIC nu iajwojeieheueueueu.pptx
knkoodalingam39
 
Introduction to Neural Networks and Perceptron Learning Algorithm.pptx
Kayalvizhi A
 
Innowell Capability B0425 - Commercial Buildings.pptx
regobertroza
 
ARC--BUILDING-UTILITIES-2-PART-2 (1).pdf
IzzyBaniquedBusto
 
Thermal runway and thermal stability.pptx
godow93766
 
MPMC_Module-2 xxxxxxxxxxxxxxxxxxxxx.pptx
ShivanshVaidya5
 
artificial intelligence applications in Geomatics
NawrasShatnawi1
 
BioSensors glucose monitoring, cholestrol
nabeehasahar1
 
UNIT DAA PPT cover all topics 2021 regulation
archu26
 
6th International Conference on Machine Learning Techniques and Data Science ...
ijistjournal
 
UNIT-4-FEEDBACK AMPLIFIERS AND OSCILLATORS (1).pdf
Sridhar191373
 
Zilliz Cloud Demo for performance and scale
Zilliz
 

Hashing Algorithm: MD5

  • 1. IJSRD - International Journal for Scientific Research & Development| Vol. 1, Issue 9, 2013 | ISSN (online): 2321-0613 All rights reserved by www.ijsrd.com 1931 Hashing Algorithm: MD5 Shweta Mishra1 Shikha Mishra2 Nilesh Kumar3 1, 2, 3 Department of Computer Science & Engineering 1 Echelon Institute of Technology, Faridabad, India 2, 3 JB Knowledge Park, Faridabad, India Abstract—a message digest is a cryptographic hash function containing a string of digits created by a one-way hashing formula. Message digests are designed to protect the integrity of a piece of data or media to detect changes and alterations to any part of a message. In this paper, we have explained the hashing algorithm of MD5 and also proposed how to use it for file transmission and for hashing any string. General Terms: Security, Algorithms, Auxiliary Functions Key words: Hash function, MD. I. INTRODUCTION Message Digest is a type of cryptography utilizing hash values that can warn the copyright owner of any modifications applied to their work. Message digest hash numbers represent specific files containing the protected works. One message digest is assigned to particular data content. It can reference a change made deliberately or accidentally, but it prompts the owner to identify the modification as well as the individual(s) making the change. Message digests are algorithmic numbers. MD5 was the last in a succession of cryptographic hash functions designed by Ron Rivest in the early 1990s [1]. It is a widely-used well-known 128-bit iterated hash function, used in various applications including SSL/TLS, IPsec, and many other cryptographic protocols. It is also commonly-used in implementations of time stamping mechanisms, commitment schemes, and integrity-checking applications for online software, distributed systems, and random-number generation. Message digest functions are used to produce digital summaries of information called message digests. Message digests are commonly 128 bits to 160 bits in length and provide a digital identifier for each digital file or document. Message digest functions are mathematical functions that process information to produce a different message digest for each unique document [2]. Identical documents have the same message digest; but if even one of the bits for the document changes, the message digest changes. Because message digests are much shorter than the data from which the digests are generated and the digests have a finite length, duplicate message digests called collisions can exist for different data sets. However, good message digest functions use one-way functions to ensure that it is mathematically and computationally infeasible to reverse the message digest process and discover the original data. Finding collisions for good message digest functions is also mathematically and computationally infeasible but possible given enough time and computational effort. However, even if an attacker discovers a collision, it is highly improbable that the collision could be useful. II. NETWORK SECURITY AND MESSAGE DIGEST Security and privacy is a growing concern in the Internet community, due to the Internet’s rapid growth and the desire to conduct business over it safely. This desire has led to the advent of several proposals for security standards, such as secure IP, Secure HTTP (SHTTP), and the Secure Socket Layer (SSL). Thus, the need to use encryption protocols such as DES and RSA is increasing. One problem with using cryptographic protocols is the fact that they are slow. An important question then is whether security can be provided at gigabit speeds. The standard set of algorithms required to secure a connection includes a bulk encryption algorithm such as DES, a cryptographic message digest such as MD5, a key exchange algorithm such as Diffie-Hellman to securely distribute a private key, and some form of digital signature algorithm to authenticate the parties, such as RSA. The encryption and hash digest algorithms must be applied to every packet going across a link to ensure confidentiality, and therefore the performance of these algorithms directly affects the achievable throughput of an application. MD5 is a message digest algorithm used for authentication and message integrity. MD5 is a “required option” for secure IP; by required option we mean that an application’s use of MD5 in IP is optional, but an implementation must support use of that option. MD5 is also the default message digest algorithm proposed for SHTTP; and is also used in SSL. III. MD5 ALGORITHM The MD5 algorithm is designed to be quite fast on 32-bit machines. In addition, the MD5 algorithm does not require any large substitution tables; the algorithm can be coded quite compactly. The MD5 algorithm is an extension of the MD4 message-digest algorithm MD5 is slightly slower than MD4, but is more "conservative" in design. MD5 algorithm takes as input a message of arbitrary length and produces as output a 128 bit message digest of the input. The authentication algorithm computes a digest of the entire data of the message, used for authentication. Typically, the message digest is registered with a trusted third-party, or encrypted via other means. The digest is used by the receiver to verify the contents of a message. It can also be used to encrypt the contents of a message, via a second pass over the data by another algorithm. MD5 requires that both the sender and receiver compute the digest of the entire body of a message [3] [4]. Suppose a b-bit message as input, and that we need to find its message digest.
  • 2. Hashing Algorithm: MD5 (IJSRD/Vol. 1/Issue 9/2013/0060) All rights reserved by www.ijsrd.com 1932 Step. 1 : Append padded bits-- The message is padded so that its length is congruent to 448, modulo 512. 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. Step. 2 : Append length-- A 64 bit representation of b is appended to the result of the previous step. The resulting message has a length that is an exact multiple of 512 bits. Step. 3 : Initialize MD Buffer-- A four-word buffer (A, B, C, D) is used to compute the message digest. Here each of A, B, C, D is a 32 bit register. These registers are initialized to the following values in hexadecimal: Word A: 01 23 45 67 Word B: 89 ab cd ef Word C: fe dc ba 98 word D: 76 54 32 10 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) = XY v not(X) Z G(X,Y,Z) = XZ v Y not(Z) H(X,Y,Z) = X xor Y xor Z I(X,Y,Z) = Y xor (X v not(Z)) If the bits of X, Y, and Z are independent and unbiased, the each bit of F(X,Y,Z), G(X,Y,Z), H(X,Y,Z), and I(X,Y,Z) will be independent and unbiased. 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[5]. IV. MD5 HELPER FUNCTIONS The BufferA. MD5 uses a buffer that is made up of four words, each 32 bits long. These words are called A, B, C and D. They are initialized as: Fig. 1: MD5 Functions Word A: 01 23 45 67 Word B: 89 ab cd ef Word C: fe dc ba 98 Word D: 76 54 32 10 The TableB. MD5 uses a table K that has 64 elements. The table is computed beforehand to increase the speed of the computation. Auxiliary Functions(F)C. MD5 uses four auxiliary functions that each take as input three 32-bit words and produce as output one 32-bit word. They apply the logical operators and, or, not and xor to the input bits. V. MD5 IN FILE TRANSMISSION MD5 digests have been widely used in the software world to provide some assurance that a transferred file has arrived intact. , file servers often provide a pre-computed MD5 checksum for the files, so that a user can compare the checksum of the downloaded file to it. However, now that it is easy to generate MD5 collisions, it is possible for the person who created the file to create a second file with the same checksum, so this technique cannot protect against some forms of malicious tampering. Also, in some cases, the checksum cannot be trusted in which MD5 can only provide error-checking functionality. Hashing algorithm is applied on the file that to be transmitted. Hashing value is then generated. When the file is sent to the user or receiver one of the two conditions arises. If the hash value received and the hash value calculated matches then the file is correctly received by the user but if those two values don’t match then the received file have some error. In this way MD5 is used for authentication purpose. Fig. 2: MD5 in file transmission
  • 3. Hashing Algorithm: MD5 (IJSRD/Vol. 1/Issue 9/2013/0060) All rights reserved by www.ijsrd.com 1933 VI. CONCLUSION Thus we saw that how message digest 5 is used for authenticating any file and how it is used for hashing any string using some helper functions. In my future work I would be implementing this file transmission by using two different algorithms and would like to show which one is better by comparing their speeds and complexity. We would also like to show how the various attacks are applied on MD5 and what are their effects. REFERENCES [1] http://theory.lcs.mit.edu/~rivest/ [2] Bruce Schneir “Applied Cryptography: Protocols, Algorithms, and Source Code in C”; 18.5 MD5 (pp. 436-441) [3] Ronald Rivest: The MD5 Message Digest Algorithm, RFC1321, April 1992, ftp://ftp.rfc- editor.org/innotes/rfc1321.txt [4] R.L. Rivest. The MD5 Message-Digest Algorithm. RFC1321, MIT Laboratory for Computer Science and RSA Data Security, Inc., April 1992. [5] Amphion. CS5315, High Performance Message Digest 5 Algorithm (MD5) Core. Datasheet, URL: http://www.amphion.com/acrobat/DS5315.pdf, (visited September 9, 2004). [6] J. Black, M. Cochran, T. Highland: A Study of the MD5 Attacks: Insights and Improvements, March 3, 2006