SlideShare a Scribd company logo
Hash Function
Prof. Neeraj Bhargava
Kapil Chauhan
Department of Computer Science
School of Engineering & Systems Sciences
MDS University, Ajmer
Hash Functions
 Goal: To provide a unique “fingerprint” of the message.
 properties:
1. Fast to compute y from m.
2. One-way: given y = h(m), can’t find any m’ satisfying h(m’) = y
easily.
3. Strongly collision-free: Can’t find any m1 != m2 such that
h(m1)=h(m2)
Message m
(long)
Message digest, y
(Shorter fixed length)Cryptographic hash
Function, h
Easy Hash Algorithm
Break m into n-bit blocks, append zeros to get a multiple
of n.
There are L of them, where L =|m|/n
Fast But not very secure.












=












=
ln21
22221
11211
2
1
...
mmm
mmm
mmm
m
m
m
m
ll
n
n
l 



[ ]nccc ...21
⇓⇓⇓⇓
⊕⊕⊕⊕
ymm ii ↵=′
SHA-1: Notation
+
↵
¬
⊕
∨
∧
Bitwise AND
Bitwise OR
Bitwise XOR
Bitwise NOT
Left-shift, with wrap-around
SHA-1: Iterative compression
 Iterate over all of the L blocks, output a value that is a
function of the last output and the latest block:
m1
m2
X0 X1
X2
h’ h’
m3
X3
h’
mL
XL
h’
3
(X0 is constant)
SHA-1: Iterative compression
Repeat L times until we have compressed the whole message
into a single 160-bit vector.
m1
m2
X0 X1
X2
h’ h’
m3
X3
h’
mL
XL
h’
=h(m)
SHA-1: Iterative compression
Repeat L times until we have compressed the whole message
into a single 160-bit vector.
m1
m2
X0 X1
X2
h’ h’
m3
X3
h’
mL
XL
h’
=h(m)

More Related Content

PDF
Vol 14 No 1 - July 2014
PPTX
Variational Auto Encoder and the Math Behind
PDF
Multiplex Networks: structure and dynamics
PDF
Structure of triadic relations in multiplex (social) networks
PDF
Topology-conform segmented volume meshing of volume images (Oct 2012)
PPT
FUAT – A Fuzzy Clustering Analysis Tool
PDF
An introduction to isogeometric analysis
PPT
Y = mx + c
Vol 14 No 1 - July 2014
Variational Auto Encoder and the Math Behind
Multiplex Networks: structure and dynamics
Structure of triadic relations in multiplex (social) networks
Topology-conform segmented volume meshing of volume images (Oct 2012)
FUAT – A Fuzzy Clustering Analysis Tool
An introduction to isogeometric analysis
Y = mx + c

What's hot (19)

PDF
Kolmogorov Complexity, Art, and all that
PDF
T01022103108
PPTX
Convolution&Correlation
PPTX
Image Storage, Indexing and Recognition
PPTX
Vector-Valued Functions and GeoGebra
PPTX
Kohonen self organizing maps
PPTX
Learning multifractal structure in large networks (Purdue ML Seminar)
PPTX
CP 2011 Poster
PPTX
Visual cryptography
PDF
ShaderX³: Geometry Manipulation - Morphing between two different objects
PPTX
Lecture 15 data structures and algorithms
PPTX
Networks
PPTX
Bellman Ford Routing Algorithm-Computer Networks
PPT
project ppt on anti counterfeiting technique for credit card transaction system
PDF
SJUT/MAT210/Interpolation/Splines 2013-14S2
PPTX
First Step SVM
PDF
CRYPTOGRAPHY USING ELLIPTIC CURVE WITH MATRIX SCRAMBLING
PPTX
Time series predictions using LSTMs
Kolmogorov Complexity, Art, and all that
T01022103108
Convolution&Correlation
Image Storage, Indexing and Recognition
Vector-Valued Functions and GeoGebra
Kohonen self organizing maps
Learning multifractal structure in large networks (Purdue ML Seminar)
CP 2011 Poster
Visual cryptography
ShaderX³: Geometry Manipulation - Morphing between two different objects
Lecture 15 data structures and algorithms
Networks
Bellman Ford Routing Algorithm-Computer Networks
project ppt on anti counterfeiting technique for credit card transaction system
SJUT/MAT210/Interpolation/Splines 2013-14S2
First Step SVM
CRYPTOGRAPHY USING ELLIPTIC CURVE WITH MATRIX SCRAMBLING
Time series predictions using LSTMs
Ad

Similar to Hash Function (8)

PPTX
2.15 Message Authentication Code and Hash Functions.pptx
PPTX
Hash Techniques in Cryptography
PPTX
A Proposal of Loose Asymmetric Cryptography Algorithm - SMCE2017
PDF
1508.07756v1
PDF
The Perceptron (D1L1 Insight@DCU Machine Learning Workshop 2017)
PPT
27-SHA1.ppt
PPTX
Lecture 2 Message Authentication
PDF
BLIND SIGNATURE SCHEME BASED ON CHEBYSHEV POLYNOMIALS
2.15 Message Authentication Code and Hash Functions.pptx
Hash Techniques in Cryptography
A Proposal of Loose Asymmetric Cryptography Algorithm - SMCE2017
1508.07756v1
The Perceptron (D1L1 Insight@DCU Machine Learning Workshop 2017)
27-SHA1.ppt
Lecture 2 Message Authentication
BLIND SIGNATURE SCHEME BASED ON CHEBYSHEV POLYNOMIALS
Ad

More from chauhankapil (20)

PPTX
Gray level transformation
PPTX
Elements of visual perception
PPTX
JSP Client Request
PPTX
Jsp server response
PPTX
Markov decision process
PPTX
RNN basics in deep learning
PPTX
Introduction to generative adversarial networks (GANs)
PPTX
Bayesian probabilistic interference
PPTX
PPTX
Exception handling in java
PPTX
Knowledge acquistion
PPTX
Knowledge based system
PPTX
Introduction of predicate logics
PPTX
Types of inheritance in java
PPTX
Representation of syntax, semantics and Predicate logics
PPTX
Inheritance in java
PPTX
Propositional logic
PPTX
Constructors in java
PPTX
Methods in java
PPT
Circular linked list
Gray level transformation
Elements of visual perception
JSP Client Request
Jsp server response
Markov decision process
RNN basics in deep learning
Introduction to generative adversarial networks (GANs)
Bayesian probabilistic interference
Exception handling in java
Knowledge acquistion
Knowledge based system
Introduction of predicate logics
Types of inheritance in java
Representation of syntax, semantics and Predicate logics
Inheritance in java
Propositional logic
Constructors in java
Methods in java
Circular linked list

Recently uploaded (20)

PPTX
Fundamentals of safety and accident prevention -final (1).pptx
PPTX
Artificial Intelligence
PDF
Integrating Fractal Dimension and Time Series Analysis for Optimized Hyperspe...
PDF
null (2) bgfbg bfgb bfgb fbfg bfbgf b.pdf
PDF
PREDICTION OF DIABETES FROM ELECTRONIC HEALTH RECORDS
PDF
The CXO Playbook 2025 – Future-Ready Strategies for C-Suite Leaders Cerebrai...
PPTX
Information Storage and Retrieval Techniques Unit III
PDF
UNIT no 1 INTRODUCTION TO DBMS NOTES.pdf
PDF
A SYSTEMATIC REVIEW OF APPLICATIONS IN FRAUD DETECTION
PDF
Exploratory_Data_Analysis_Fundamentals.pdf
PPT
Occupational Health and Safety Management System
PPTX
UNIT 4 Total Quality Management .pptx
PPTX
introduction to high performance computing
PPTX
communication and presentation skills 01
PDF
86236642-Electric-Loco-Shed.pdf jfkduklg
PDF
keyrequirementskkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkk
PDF
Categorization of Factors Affecting Classification Algorithms Selection
PDF
PPT on Performance Review to get promotions
PPTX
CURRICULAM DESIGN engineering FOR CSE 2025.pptx
PDF
Mitigating Risks through Effective Management for Enhancing Organizational Pe...
Fundamentals of safety and accident prevention -final (1).pptx
Artificial Intelligence
Integrating Fractal Dimension and Time Series Analysis for Optimized Hyperspe...
null (2) bgfbg bfgb bfgb fbfg bfbgf b.pdf
PREDICTION OF DIABETES FROM ELECTRONIC HEALTH RECORDS
The CXO Playbook 2025 – Future-Ready Strategies for C-Suite Leaders Cerebrai...
Information Storage and Retrieval Techniques Unit III
UNIT no 1 INTRODUCTION TO DBMS NOTES.pdf
A SYSTEMATIC REVIEW OF APPLICATIONS IN FRAUD DETECTION
Exploratory_Data_Analysis_Fundamentals.pdf
Occupational Health and Safety Management System
UNIT 4 Total Quality Management .pptx
introduction to high performance computing
communication and presentation skills 01
86236642-Electric-Loco-Shed.pdf jfkduklg
keyrequirementskkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkk
Categorization of Factors Affecting Classification Algorithms Selection
PPT on Performance Review to get promotions
CURRICULAM DESIGN engineering FOR CSE 2025.pptx
Mitigating Risks through Effective Management for Enhancing Organizational Pe...

Hash Function

  • 1. Hash Function Prof. Neeraj Bhargava Kapil Chauhan Department of Computer Science School of Engineering & Systems Sciences MDS University, Ajmer
  • 2. Hash Functions  Goal: To provide a unique “fingerprint” of the message.  properties: 1. Fast to compute y from m. 2. One-way: given y = h(m), can’t find any m’ satisfying h(m’) = y easily. 3. Strongly collision-free: Can’t find any m1 != m2 such that h(m1)=h(m2) Message m (long) Message digest, y (Shorter fixed length)Cryptographic hash Function, h
  • 3. Easy Hash Algorithm Break m into n-bit blocks, append zeros to get a multiple of n. There are L of them, where L =|m|/n Fast But not very secure.             =             = ln21 22221 11211 2 1 ... mmm mmm mmm m m m m ll n n l     [ ]nccc ...21 ⇓⇓⇓⇓ ⊕⊕⊕⊕ ymm ii ↵=′
  • 4. SHA-1: Notation + ↵ ¬ ⊕ ∨ ∧ Bitwise AND Bitwise OR Bitwise XOR Bitwise NOT Left-shift, with wrap-around
  • 5. SHA-1: Iterative compression  Iterate over all of the L blocks, output a value that is a function of the last output and the latest block: m1 m2 X0 X1 X2 h’ h’ m3 X3 h’ mL XL h’ 3 (X0 is constant)
  • 6. SHA-1: Iterative compression Repeat L times until we have compressed the whole message into a single 160-bit vector. m1 m2 X0 X1 X2 h’ h’ m3 X3 h’ mL XL h’ =h(m)
  • 7. SHA-1: Iterative compression Repeat L times until we have compressed the whole message into a single 160-bit vector. m1 m2 X0 X1 X2 h’ h’ m3 X3 h’ mL XL h’ =h(m)