HASH Function
HASH Function
Function:
Properties & Applications
Anosha Nadeem
2021-ag-7954
Data security & Encryption (IT-502)
Hash Function:
• A mathematical function that converts an input (or 'message')
into a string with a fixed number of character (hash value or
hash).
• The output data string is the hash value or Message digest.
• Hash Values are written in Hexadecimal.
• A hash function is basically performing some calculations in
the computer. Data values that are its output are of fixed
length. Length always varies according to the hash function.
• Converting Hash Codes to their original value is an impossible
task to perform. This is the main difference between
Encryption as Hash Function. (One-way functions).
Examples:
Some of the popular Hash Functions are Following:
• Message Digest (MD):MD5 was most popular and widely used
hash function for quite some years.The MD family comprises of hash
functions MD2, MD4, MD5 and MD6. It is a 128-bit hash function
Properties
Avalanche Fixed Output
Effect Size
Collision
Resistance
Properties
• Deterministic :
Hash functions are deterministic, meaning that given the same
input, the output will always be the same. This makes hash functions
useful for verifying the authenticity of data, as any changes to the data
will result in a different hash value.
• Fixed-Size Output:
Hash functions produce a fixed-size output, regardless of the
size of the input. This property makes hash functions useful for storing
and transmitting data, as the hash value can be stored or transmitted
more efficiently than the original data.
• Avalanche Effect:
A small change in the input should result in a significant
change in the output. This property ensures that similar inputs produce
vastly different hash values, which enhances security.
Properties
• Fast Computation :
Hash functions are designed to be computed quickly, making
them efficient for processing large volumes of data.
• Pre-Image Resistance :
This property means that it should be computationally hard to
reverse a hash function.This property protects against an attacker who
only has a hash value and is trying to find the input.
• Second Pre-Image Resistance:
This property means given an input and its hash, it should be
hard to find a different input with the same hash.This property of hash
function protects against an attacker who has an input value and its
hash, and wants to substitute different value as legitimate value in
place of original input value.
Applications of Hash
Function:
Cryptography
Data
Integrity Digital
Checking: Forensics
Applications
Data
Fingerprinting
Password
Storage:
Data
Blockchain
Indexing:
Applications :
Cryptography:
These are used in cryptography to ensure the confidentiality and integrity of
data. They generate digital signatures, which verify the authenticity of a
message or document. Hash functions also create message digests, ensuring
data integrity during transmission.
Data Fingerprinting:
These uniquely identify data, such as file-sharing networks.
Generating a hash value for a piece of data makes it possible to
identify and ensure it is uniquely safe.
Data Indexing:
These create indexes for large data sets. This allows for quick retrieval of data,
even from extensive databases.
Applications :
Digital forensics:
These are popular in digital forensics to ensure the authenticity of evidence.
Generating hash values for evidence makes it possible to ensure the evidence
is safe.
Blockchain:
These are extensively popular in blockchain technology. Each block in a
blockchain contains a hash value of the previous block, ensuring the entire
blockchain’s integrity. Additionally, they also mine new partnerships in a
blockchain.