0% found this document useful (0 votes)
20 views18 pages

YAsh NIS

Uploaded by

Yash raundal
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)
20 views18 pages

YAsh NIS

Uploaded by

Yash raundal
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/ 18

Matoshri Education Society’s

MATOSHRI INSTITUTE OF TECHNOLOGY


A/P : Dhanore, Tal-Yeola , Dist.-Nasik, 423401

Micro Project Report


Academic year: 2024-25

Title of Project
Hashing Function

Name of Student: Raundal Yash Suresh


Class : TYCO
Semester : Sixth
Roll No : 08
Enrollment No: 2211710048
Seat No : 493829

Program : Computer Engineering


Course : NIS
Course code : 22620
Name of Teacher: Miss. Bhandare S.N.
Matoshri Education Society’s
MATOSHRI INSTITUTE OF TECHNOLOGY
A/P : Dhanore, Tal-Yeola , Dist.-Nasik, 423401

CERTIFICATE
This is to certify that Mr. Raundal Yash Suresh
Roll no 08 Of Sixth Semester of Diploma in
Computer Engineering has successfully completed
the for the Academic yeear 2024 -2025 as prescribed
MSBTE Micro Project in Hashing Function
curriculum under the guidance of subject teacher.

Place: Yeola Enrollment No: 2211710048


Date: Seat No: 493829

Subject Teacher HOD Principal


Miss. Bhandare S.N. Mr. Ghorpade M. S. Mr. Gujrathi G.S.
Micro Project Report Index

Academic Year: 2024-25 Program: Computer Engineering


Class: TYCO Course: NIS
Course Code: 22620 Roll No: 08
Enrollment No: 2211710048 Exam Seat No: 493829

Title of Micro Project: - Hashing Function

Sr. Contents Page No.


No.
1 Introduction 8

2 What is a Hashing Function? 9

3 Characteristics of a Good Hashing 10


Function
4 Types of Hashing Algorithms 11

5 Working of a Hashing Function 12

6 Implementation of Hashing in Python

7 Applications of Hashing

8 Security Issues in Hashing 16

9 Conclusion 17

10 Reference 18

Signature of Students Signature of Faculty


Raundal Yash Suresh Miss. Bhandare S.N.
ANNEXURE I
Rubric for Evaluation of Micro Project

Academic Year: 2024-25 Program: Computer Engineering


Class: TYCO Course: NIS
Course Code: 22620 Roll No: 08
Enrollment No: 2211710048 Exam Seat No: 493829

Title of Micro Project: - Hashing Function


Group Members:
Sr.No. Roll No. Name of Candidates

1 08 Raundal Yash Suresh

CO coverage:
CO1: Apply cryptographic algorithms and protocols to maintain computer security.
CO2: Identify risks related to computer security and information hazards in various situations.

Indicatorsfor different level of Performance


Marks
(Evaluation Scale 0 to 2)
Sr. No Criteria Obtained (
Out of 2) Poor (0) Average (1) Good (2)

Submission of Not Submitted proposal or project Project proposal &


1 Project anything in report submitted in project report
proposal/Report time time submitted ij time
CO/PRO Not attained any Attained some Attained
2 Attainment CO/PRO CO/PRO Maximum
Contains
Content of Not contains
Contains some relevant maximum
3 project/Formatti relevant
information relevant
ng information information
Total Marks
4 (06)
QuNISion/
5 Answers (04)
Total (10) :

Additional Comments (if any):

Name of Teacher & Sign


Miss. Bhandare S.N.
Micro Project Proposal

Academic Year: 2024-25 Program: Computer Engg


Class: TYCO Course: NIS
Course Code: 22620

Title of Micro Project: Hashing Function

Group Members:
Sr no Roll no Name Of Candidates

1 08 Raundal Yash Suresh

Content / Key Points:


Understanding concets of organization

Stationary/ Material Required (if any):

Internet Source

References:
https://www.geeksforgeeks.org/network-protocols-and-proxies-in-system-design/
Micro Project Log Book

semester: Sixth Program: Computer Engineering


Course: NIS Class: TYCO

Topic of the Micro-Project :- Hashing Function

Sr.No. Roll No. Name of Group Members Sign


1 08 Raundal Yash Suresh

Week Discussion & Details Teacher’s Teacher’s


No. Comment Sign
1 General Discussion about micro project activity.
2 Guidelines for micro project
3 Discussion on different industry/application/study
oriented topics
4 Work distribution to collect the information regarding
topic by each member.
5 Gathered information through the various sources, such
as internet, book, magazine, joutrnar and newspaper
6 Discussed the difficulty faced during the collection of
necessary information among the group member.
7 Discussion with the guide to sort out differently faced
while collecting the information.
8 Prepared a rough draft & shown it to the guide.

19 Necessary instructions are given by the guide for its


better Presentation & Finalized project.
10 Presentation is given on the topic, Report is prepared onthe
topics & final submission of micro project and
Report

Name & Signature of project Guide Name & Signature of HOD


Mr.Ghorpade .M.S
Introduction
In the digital era, data security is a critical concern, and hashing
functions play a vital role in protecting sensitive information. A hashing
function is a mathematical algorithm that transforms input data into a
fixed-length hash value, ensuring data integrity, authentication, and
security. Unlike encryption, hashing is a one-way process, meaning the
original data cannot be retrieved from the hash, making it ideal for
password storage, digital signatures, and data verification.
Hashing functions are widely used in cryptography to prevent
unauthorized access and detect data tampering. They provide unique
hash values for different inputs, ensuring that even a small change in the
input results in a significantly different output. Strong cryptographic hash
functions, such as SHA-256 and SHA-512, are designed to be collision-
resistant, preventing attackers from generating the same hash for
different inputs. This property makes them crucial for applications like
blockchain, digital certificates, and secure authentication systems.
As cyber threats continue to evolve, the importance of hashing functions
in cybersecurity grows. Weak hashing algorithms like MD5 and SHA-1
have been compromised due to their vulnerability to collision attacks,
leading to the adoption of more secure alternatives. Organizations and
developers must implement robust hashing techniques to safeguard
sensitive data and maintain the trust of users. Understanding hashing
functions is essential for anyone involved in cybersecurity, as they form
the foundation of secure communication, authentication, and data
protection mechanisms.
What is a Hashing Function?
A hashing function is a mathematical algorithm that converts an input
(or "message") into a fixed-length string of characters, which
represents the original data uniquely. This output, called a hash value
or digest, is a one-way transformation, meaning it cannot be reversed
to obtain the original input. Hashing functions are widely used in
computer science, particularly in cryptography, data structures, and
authentication systems.

Characteristics of a Hashing Function:

1. Deterministic: The same input will always produce the same hash
value.

2. Fast Computation: It should quickly generate a hash for any given


input.

3. Fixed-Length Output: Regardless of the input size, the hash


function produces a fixed-size output (e.g., SHA-256 always
generates a 256-bit hash).

4. Preimage Resistance: Given a hash value, it should be


computationally infeasible to determine the original input.

5. Collision Resistance: No two different inputs should generate the


same hash value.

6. Avalanche Effect: A small change in the input should drastically


change the output.
Types of Hashing Algorithms
1. MD5 (Message Digest 5)
• Output Size: 128-bit hash value
• Speed: Very fast
• Status: Outdated and considered insecure
• Use Case: Previously used in file integrity checks
• Drawback: Vulnerable to collision attacks, meaning two different
inputs can produce the same hash

2. SHA-1 (Secure Hash Algorithm 1)


• Output Size: 160-bit hash value
• Speed: Slower than MD5 but more secure
• Status: Deprecated due to vulnerability to collisions
• Use Case: Was widely used in digital certificates and SSL
• Drawback: Can no longer be trusted for security applications

3. SHA-2 Family (SHA-224, SHA-256, SHA-384, SHA-512)


• Output Size: Varies (e.g., SHA-256 gives a 256-bit hash)
• Security: Highly secure and widely used
• Use Case: Used in blockchain (e.g., Bitcoin), digital signatures,
secure password storage
• Strength: Resistant to collision and preimage attacks
• Popular Variant: SHA-256 is the most commonly used algorithm in
the family
4. SHA-3 (Keccak Algorithm)
• Output Size: Variable (SHA3-224, SHA3-256, etc.)
• Introduced by: NIST in 2015
• Security: Designed as an alternative to SHA-2
• Use Case: Cryptographic applications requiring higher security
• Advantage: Based on a completely different structure (sponge
construction), making it secure even if SHA-2 becomes vulnerable in
the future

5. BLAKE and BLAKE2


• Output Size: Variable
• Security: Comparable or better than SHA-2
• Use Case: Cryptography, digital signatures, and general-purpose
hashing
• Advantage: Fast and secure; BLAKE3 is a recent, even faster variant

6. Whirlpool
• Output Size: 512-bit hash value
• Use Case: Data integrity, encryption systems
• Security: Considered secure, based on AES encryption principles
• Advantage: Very strong cryptographic algorithm
Working of a Hashing Function

Step-by-Step Working:

1. Input Data is Provided:


The user or system provides input data. This could be a file, string,
password, or even an entire document. The input size can be small or
large — there is no restriction on length.
2. Padding and Preprocessing:
For security and standardization, some hash functions (like SHA
algorithms) add padding bits to the input so that the total length
becomes a multiple of a fixed block size (e.g., 512 bits). Metadata,
such as the original message length, may also be appended.
3. Breaking into Blocks:
The padded input is divided into fixed-size blocks (like 512-bit
chunks). These blocks are then processed sequentially by the hash
function’s internal logic.
4. Compression Function Applied:
Each block passes through a compression function. This function
uses mathematical operations such as bitwise operations (AND, OR,
XOR), modular arithmetic, and permutations to compress data.
5. Hash Value is Produced:
After processing all blocks, the final hash value (digest) is generated.
This is a fixed-size output — for example, SHA-256 always outputs a
256-bit (64 hexadecimal character) hash.

Example:
Let's say you hash the string:
Input: "Hello World"
Output (SHA-256):
a591a6d40bf420404a011733cfb7b190d62c65bf0bcda32b57b277d9ad9f146e
Implementation of Hashing in Python
1. Importing Required Library

import hashlib

2. Hashing a String with SHA-256

# Input data

text = "Cybersecurity123"

# Encoding the input string

encoded_text = text.encode()

# Creating SHA-256 hash object

hash_object = hashlib.sha256(encoded_text)

# Getting hexadecimal digest

hash_result = hash_object.hexdigest()

# Output

print("Original Text:", text)

print("SHA-256 Hash:", hash_result)


Output:

Original Text: Cybersecurity123


SHA-256 Hash:
78ac5a8574a38b7e9a0ae184cf5a5c340d9a96bc6f0f929c27c2dcbd58c
924a3

3. Using Different Hashing Algorithms

import hashlib

text = "Cybersecurity123"

hash_md5 = hashlib.md5(text.encode()).hexdigest()

hash_sha1 = hashlib.sha1(text.encode()).hexdigest()

print("MD5 Hash:", hash_md5)

print("SHA-1 Hash:", hash_sha1)

Output:

MD5 Hash: f2063fb83d4f8efa1637d3017dd2c1be

SHA-1 Hash: c9e5c94e532bd69654369a69886c1699a04233d6


Applications of Hashing
1. Password Protection
Stores hashed passwords instead of plain text to improve login
security.

2. Data Integrity Verification


Verifies if data/files have been altered using hash values (e.g., file
checksums).

3. Digital Signatures
Ensures message authenticity by hashing content before signing.

4. Blockchain Technology
Links blocks securely using hash values, preventing tampering.

5. Hash Tables
Used in programming for fast data lookup using key-value pairs.

6. Duplicate Detection
Identifies duplicate files by comparing their hash values.

7. Malware Detection
Compares file hashes with known malware signatures for threat
detection.
Security Issues in Hashing

1. Collision Attacks
Two different inputs produce the same hash — compromising data
integrity (e.g., in MD5, SHA-1).

2. Preimage Attacks
Finding an input that matches a given hash value — breaking the
one-way nature of hashing.

3. Rainbow Table Attacks


Precomputed tables used to crack hashes — effective against unsalted
passwords.

4. Lack of Salting
Without salt, identical inputs create identical hashes — making them
easy to guess.

5. Weak Hash Functions


Older algorithms like MD5 and SHA-1 are insecure and vulnerable to
various attacks.

6. Length Extension Attacks


Some hashes allow attackers to extend the original input and forge a
valid hash.
Conclusion
Hashing functions are vital tools in the field of cybersecurity and data
management. They ensure data integrity, secure passwords, and
support technologies like blockchain and digital signatures. By
converting data into a fixed-size hash value, they make storage and
verification efficient and reliable.

However, the security of hashing depends on using strong algorithms


and best practices like salting and avoiding outdated methods. As
cyber threats evolve, so must our approach to secure hashing.
Understanding how hashing works and its applications helps build
more robust and secure systems.
References
https://www.geeksforgeeks.org/hashing-data-structure/
https://developer.mozilla.org/en-
US/docs/Web/Security/Information_security_basics#hash_
functions
https://en.wikipedia.org/wiki/Cryptographic_hash_functio
n
https://www.tutorialspoint.com/cryptography/cryptograph
y_hash_functions.htm
https://csrc.nist.gov/publications/detail/fips/180/4/final

You might also like