MD 5
MD 5
Saif Madre
Department of Computer Engineering
M.H Saboo Siddik College of Engineering
Mumbai, India
[email protected]
Aim—For varying message sizes, test the integrity of the message using MD5, SHA-1, and
analyse the performance the two protocols.
Keywords— Hashing, SHA1, MD5.
I. INTRODUCTION
Hashing is a fundamental cryptographic technique that transforms input data into a fixed-size
hash value. Cryptographic hash functions ensure data integrity, authentication, and digital
signatures. However, with advances in computational power, vulnerabilities have been
discovered in older hashing algorithms like MD5 and SHA-1, making them unsuitable for
security-sensitive applications. This study examines the efficiency, security, and execution time
of MD5 and SHA-1 to highlight their limitations and the need for more secure alternatives.
II. MD5
III. SHA-1
SHA-1 (Secure Hash Algorithm 1) is a cryptographic hash function developed by the NSA
and standardized by NIST, producing a 160-bit hash value typically represented as a 40-digit
hexadecimal number. Initially widely used in security protocols like TLS, SSL, PGP, SSH, and
IPsec, SHA-1 has been found to be cryptographically weak due to collision attacks, making it
unsuitable for security-sensitive applications. Since 2005, researchers have demonstrated
vulnerabilities, leading to its deprecation by NIST in 2011 and its disallowance for digital
signatures in 2013. In 2017, Google and CWI Amsterdam
Fig. 1. Block diagram for one round of MD5
successfully performed a collision attack, proving its insecurity. Major web browsers stopped
accepting SHA-1 SSL certificates the same year, and Microsoft discontinued SHA-1 code
signing support in 2020. While SHA-1 is still used in some non-security applications, such as
Git for data integrity verification, experts strongly recommend migrating to SHA-2 or SHA-3
for cryptographic security.
Fig2. Block Diagram for one round of SHA-1
IV. CODE
import hashlib
import timeit
# Compute hashes
sha1_result = sha1_hash(text)
md5_result = md5_hash(text)
V. OUTPUT
VI.CONCLUSION
This study highlights the vulnerabilities of MD5 and SHA-1, emphasizing their deprecation
in security- critical applications. While MD5 remains useful for checksums and SHA-1 is still
used in data verification systems like Git, neither should be used for cryptographic security.
Instead, stronger alternatives like SHA- 256 and SHA-3 should be adopted for modern security
needs.
REFERENCES
[1] ”MD5,” Wikipedia, https://en.wikipedia.org/wiki/MD5.