7KS05
Block chain Fundamentals
Unit No.: II
Lecture No. 2: Collision-resistant hash functions
Dr. Avinash S. Kapse,
Associate Professor & Head of Department
Computer Science & Engineering
1
Objectives…
Upon completion of this lecture, you will
be able
To understand the basics Cryptography
To understand Hash Function.
Review…./ Concepts
What do you mean by Cryptography?
What do you mean by Cipher text?
What do you mean by hash?
What do you mean by Network?
Hash function:
takes an arbitrary length string as input
produces a fixed‐size output (e.g 256 bits)
Easy to compute
Almost impossible to reverse
Security properties:
collision‐resistant
Hides the original String
Almost impossible to get the original string from the
output
puzzle‐friendly
Hash property 1: Collision‐
resistance
It is computationally NOT feasible
to find x and y such that
x != y and H(x)=H(y)
H(x) =
H(y)
y
However, for a weak hash function collisions may
be feasible to find:
possible
outputs
possible inputs
Examples of hash functions for which
collisions are found feasibly: MD‐5,
SHA‐1
Brute‐forcing collision
try 2130 randomly chosen inputs
99.8% chance that two of them will collide
This works no matter what H is …
… but it takes too long to matter
Even if each input checking takes 100 ms, we are
talking
0.1 aboutwhich
seconds 2130 ×is 1 × 2129 seconds = 4.3
5
1030 years
Are there any hash functions for which
efficient collision finding algorithms
● For some exist?
H
● But for others none known yet (SHA‐
256, SHA3 etc)
No H has been proven collision‐
free.
Many H has been proven to have
collisions.
Examples: SHA‐1
https://security.googleblog.com/2017/02/
announcing‐first‐sha1‐ collision.html
Application: Hash
as message digest
●If we know H(x) = H(y),
○ it’s safe to assume that x =
y.
●To recognize a file that we
saw before,
○ just remember its hash.
●Useful because the hash is
small.
Hash property 2: Hiding
We want something like this:
Given H(x), it is infeasible to
find x.
Hash property 2: Hiding
●Hiding property:
○ If r is chosen from a probability
distribution that has high min‐entropy, then
given H(r | x), it is infeasible to find x.
●High min‐entropy means
○ the distribution is “very spread out”, so
that no particular value is chosen with more
To know athan
bit more negligible probability.
on this: https://crypto.stackexchange.com/questions/66097/why ‐is ‐min ‐
entropy‐significant‐in‐ cryptography
Question?
12