Please enable JavaScript.
Coggle requires JavaScript to display documents.
CRYPTOGRAPHIC HASH FUNCTIONS - Coggle Diagram
CRYPTOGRAPHIC HASH FUNCTIONS
PROPERTIES
DETERMINISTIC
The Hash function will always give the same output for a particular input. No matter how many times you apply hash function on it
Quick Computation
PRE-IMAGE RESISTANCE
Given H(A) it is
infeasible
to determine the input A
Note :red_flag: it is not impossible to determine the input from the hash value, we can try
brute force approach
and try to find out the hash of the entire dataset and match it
Small changes in the input changes the hash
Collision Resistant
Given two different inputs A and B where H(A) and H(B) are their respective hashes, it is
infeasible
for H(A) to be equal to H(B).
that means
for the most part
each input will have its unique hash.
THE BIRTHDAY PARADOX
If you meet any random person the probability that he will have the same birthday as yours will be 1/365 (negligible) assuming all days have equal probability for a birthday.
Now if you gather up 20-30 people in a room the odds of two people sharing the same birthday will be
50%
Why :!?:
BIRTHDAY PARADOX EXPLAINED
:lock:
you have N different possibilities of an event happening, then you need square root of N random items for them to have a 50% chance of a collision.
Let's say we have a 128 bit hash which has 2^128 different possibilities. By using the birthday paradox, you have a 50%chance to break the collision resistance at the sqrt(2^128) i.e.
2^64 instance.
It is much easier to break the collision resistance than the pre-image resistance
PUZZLE FRIENDLY
For every output “Y”, if k is chosen from a distribution with high min-entropy it is infeasible to find an input x such that
H(k|x) = Y
.
high min-entropy
- the distribution from which the value has been chosen is largely distributed so that choosing a random value has a negligible probability.
k|x
- concatenation of k and x
EXAMPLES
SHA 256
- produces a 256 bit hash currently being used by the
Bitcoin
Keccak 256
- produces a 256 bit hash currently used by the
Ethereum
What is Hashing