0% found this document useful (0 votes)
6 views3 pages

Assignment 02

The document discusses hash functions, which are mathematical algorithms that convert input data into fixed-size outputs known as hash values. It outlines essential qualities of a good hash function, such as deterministic behavior and collision resistance, and highlights their applications in various fields including data structures, cryptography, and blockchain technology. The document emphasizes the importance of hash functions in ensuring data integrity, efficient data retrieval, and security in modern computing.

Uploaded by

graphicsra41
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
6 views3 pages

Assignment 02

The document discusses hash functions, which are mathematical algorithms that convert input data into fixed-size outputs known as hash values. It outlines essential qualities of a good hash function, such as deterministic behavior and collision resistance, and highlights their applications in various fields including data structures, cryptography, and blockchain technology. The document emphasizes the importance of hash functions in ensuring data integrity, efficient data retrieval, and security in modern computing.

Uploaded by

graphicsra41
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 3

ASSIGNMENT 02

NAME : Rafia
ROLL NO : 23014119-104
COURSE : DATA STRUCTURES (CS-203)
SECTION : B (EVENING)
DEPARTMENT: COMPUTER SCIENCE
SUBMITTED TO : SIR TASADDAQ LATIF
SUBMISSION DATE : 14-12-2024
HASH FUNCTION
Introduction:
A hash Function is one of the most important aspects of computer science.
From it, data of any length gets converted into fixed sizes called hash values or
digests. This makes computing processes efficient, comfortable, and reliable.
The definition has been explained in terms of the salubrious functions of hash
functions, bringing out functionality that should be elaborated further in
technology.

Definition of a Hash Function


A hash function is a mathematical algorithm that takes an input data and
produces a fixed-size string or number. For instance, taking an input x , the hash
function ( h(x) outputs a value at a known length. Deterministically, two
identical entries will yield the same hash value.

Essential Qualities of a Good Hash Function:


For a hash function to be valuable and practical, it must possess these
properties:
• Deterministic Behavior: The input must always yield the same
output.
• Efficiency: Hash computation must be fast and resource efficient.
• Uniform Distribution: Outputs must be evenly distributed so as to
minimize avoid clusters.
• Pre-image Resistance: It should be infeasible to compute the
match given the hash value.
• Avalanche: Difference in an input will result in an output that has
no similarity to any other in the system.
• Collision Resistance: Two different inputs have a very small
probability of producing the same hash value
Computer Science Hash Functions:
Hash functions are today universal in modern computers and are widely used for
diverse domains. Notable fields of use include:

1. Data Structures: The presence of hash functions in data structures such as


hash tables makes data retrieval and storage quite easy. Examples include
dictionaries in Python and HashMap in Java.
2. Cryptography: The usage of hash functions applied to cryptography on
secure data for integrity, authenticity, and encryption purposes has been
SHA-256. Most of the applications drawn from blockchain and digital
signatures come from such functions.
3. Verification of Data Integrity: Hash functions provide a way of verifying
data integrity using hash comparisons to ensure that data has remained
unchanged during storage or transmission.
4. Password Storage: Compromise is just computationally infeasible to
restore a plaintext password because the system only stores hashed
passwords.
5. Blockchain and Cryptocurrencies: Hashing forms the security part of data
on blockchain technologies, chaining of blocks, and creates proof-of-work
in cryptocurrencies like Bitcoin.
6. Data Deduplication: Hashing is important in detecting and eliminating
these duplicate files in storage and avoiding redundancy in storage
optimization.
7. Searching and Indexing: Hash functions show a way of searching big data
by mapping it to fixed-size hash values.
8. Randomization and Simulations: Hash functions allow randomization,
which can be used in simulations, game operations, and randomized
algorithms.

You might also like