Title: Cryptographic Hash Functions:
Presented by: Maimadu
Muhammad Sulum
ID No: 2024/HND/CSDP/020
Institution: Federal
Polytechnic Damaturu
Department: Cyber Security
Department
Course: Mathematics for Cyber
Security
Date: 26 May 2025
Introduction
In an era defined by digital communication and data
transmission, ensuring data integrity, authenticity,
and security is paramount. Cryptographic hash
functions serve as fundamental building blocks in
many cryptographic protocols
Definition and Mathematical Background
A cryptographic hash function maps input data of arbitrary
length to a fixed-size string . The output , known as the hash or
digest, is deterministic but computationally infeasible to reverse
or predict.
What is a Cryptographic Hash
Function?
How does cryptographic hash function works?
The hash function accepts data of a fixed Length. The data
block size varies between Algorithms.
. If the blocks are too small, padding may be Used to fill the
space. However, regardless of The kind of hashing used, the
output, or hash Value, always has the same set length.
The hash function is then applied as many Times as the
number of data blocks.
What Does a Cryptography Hash Function Do?
• Secure against unauthorized alterations: It assists You
in even minor changes to a message that Will result in the
generation of a whole new Hash value.
• Protect passwords and operate at various Speeds:
Many websites allow you to save your Passwords so that
you don’t have to remember Them each time you log in.
However, keeping Plaintext passwords on a public-facing
server is Risky since it exposes the information to thieves.
Websites commonly use hash passwords to create Hash
values, which they then store.
Key Properties
Essential Properties of Cryptographic Hash Functions
A secure cryptographic hash function must satisfy the following properties:
• Preimage Resistance: Given , it should be computationally infeasible to
find any such that .Given a hash value h , it should be difficult to find Any
message m such that h = hash(m ) . This Concept is related to that of a one-way
function . Functions that lack this property are vulnerable to Preimage attacks.
• Second Preimage Resistance: Given , it should be hard to find such that .
Given an input m 1 , it should be difficult to find a Different input m 2 such that
Hash(m 1 ) = hash( m 2 ). This property is sometimes Referred to as weak
collision resistance. Functions That lack this property are vulnerable to second
Preimage attacks.
Popular Hash Functions
• MD5 – 128-bit, now insecure
• SHA-1 – 160-bit, deprecated
• SHA-2 – secure, widely used
• SHA-3 – Keccak-based, modern and secure
• MD5: Developed in 1992, MD5 produces a 128-bit digest. It is now considered
insecure due to collision vulnerabilities. MD5 was designed by Ronald Rivest in
1991 to replace an Earlier hash function, MD4, and was specified in 1992 as RFC
1321.
• SHA-1: Introduced by NIST, SHA-1 produces a 160-bit hash. It has also been broken
using collision attacks and is deprecated. Was developed as part of the U.S.
Government’s Capstone project the algorithm was published In 1993 under the
title Secure Hash Standard, FIPS PUB 180, by U.S. Government standards agency
NIST (National Institute of Standards and Technology).
• SHA-2: Includes SHA-224, SHA-256, SHA-384, and SHA-512. It remains secure for
most applications.SHA-2 (Secure Hash Algorithm 2) is a set of Cryptographic hash
functions designed by the United States National Security Agency (NSA), first
published in 2001. They are built using the Merkle–Damgård structure, from A one-
way compression function itself built using the Davies–Meyer structure from a
(classified) specialized Block cipher.
• SHA-3: Based on the Keccak algorithm, SHA-3 provides a different
structure and resistance to the same attacks affecting its predecessors. Can also be
used to Build other cryptographic primitives such as a stream Cipher. SHA-3
provides the same output sizes as SHA-2: 224, 256, 384, and 512 bits.
Applications
• Digital Signatures: The digital signature application is comparable to message
authentication.
• Digital signatures operate similarly to MACs .
• Digital signatures encrypt message hash values using a user's private key .
• The digital signature may be verified by anybody who knows the user's public key
• Data Integrity Check: Hash functions are most commonly used to create
checksums for data files.
• This program offers the user with assurance that the data is correct.
• The integrity check allows the user to detect any modifications to the original file.
• It does not assure uniqueness. Instead of altering file data, the attacker can
update the entire file,
• Message Authentication: Message authentication: is a system or service that
verifies the integrity of a communication.
• • It ensures data is received precisely as transmitted, with no modifications,
insertions, or deletions, a hash function is used for message authentication, and
the value is sometimes referred to as a message digest.
• • Message authentication often involves employinga message
authentication code (MAC).
• • MACs are widely used between two parties that share a secret key for
authenticmblock to generate a hash value, that identifies the protected
communication.
Blockchain: Cryptographic hashes form the
foundation of block linking and mining in blockchain
systems like Bitcoin.
Password Storage: Passwords are stored as hashes,
often with added salt for enhanced security.
Known Attacks
• Birthday Attack: Exploits the birthday paradox to find collisions with
complexity around . A birthday attack is a bruteforce collision
attack that Exploits the mathematics behind the birthday problem
in Probability theory . This attack can be used to abuse
Communication between two or more parties. The attack Depends on
the higher likelihood of collisions found Between random attack
attempts and a fixed degree of Permutations ( pigeonholes ).
• Length Extension Attack: Affects certain Merkle–Damgård-based
hash functions like MD5 and SHA-1.In cryptography and computer
security , a length extension Attack is a type of attack where an
attacker can use Hash( message1 ) and the length of message1 to
calculate Hash( message1 ‖ message2 ) for an attacker-controlled
Message2 , without needing to know the content of qMessage1 .
• Quantum Attacks: Grover’s algorithm can reduce brute-force
search to operations, prompting the need for post-quantum hash
designs.
Future Directions
As computational power increases and quantum
computing emerges, new hash function
standards are under development. Post-
quantum cryptography, lightweight
cryptographic primitives, and hash-based
signature schemes (e.g., SPHINCS+) are gaining
prominence.
Conclusion
• Hash functions are vital to digital security
• Must be secure, efficient, and resistant to
threats.
• Cryptographic hash functions are
indispensable tools in the digital age,
providing the foundation for data integrity,
secure communications, and robust
authentication mechanisms .