#Hashfunctions : Tried to wrap my head around the complexity behind numbers on identifying collision hashes. ππ 1/10
A cryptographic hash function #β£ is a mathematical function. You insert something in the function, it gives an output that is of fixed size 64 hexadecimal characters.βοΈ 2/10
Hexa-decimal characters include numbers from 0-9 and alphabetics. Each hexa-decimal is equal to 4 bits, which makes the size of hash output 256 bits(i.e. 2^256 possibilities)#β£π’ 3/10
One property says hashes are collision-free π₯·, i.e. two objects (say X & Y) shouldn't output the same hash value. When Xβ Y | H(x) β H(y). 4/10
However it is theoretically/probabilistically possible to have the same value, but it is computationally difficult to run and prove it. Let's see howπ 5/10
A SHA-256 algorithm outputs 64 characters which can either be a lowercase letter or a number from 0β9. Which should mean that there are 2^Β²β΅βΆ distinct results. See the 2nd and 3rd tweets if you have any doubt π€
~6/10
~6/10
For comparison, as of January 2023, Bitcoin was computing 250*10^3 quadrillion(250*10^18) SHA-256 hashes per second. Check the source π~ 7/10
ycharts.com
ycharts.com
Letβs say we were tried to perform a collision attack and would βonlyβ need to calculate 2^ΒΉΒ²βΈ hashes(half of the total possibilities). π₯²
At the rate Bitcoin is going, it would take us 2ΒΉΒ²βΈ/(250*10^18*24*60*60*365) = 43.2*10^9 years.
~ 8/10
At the rate Bitcoin is going, it would take us 2ΒΉΒ²βΈ/(250*10^18*24*60*60*365) = 43.2*10^9 years.
~ 8/10
Life of universe = 13.7Γ10^9 years.
Hash identification time = 43.2*10^9 years.(@ 2^128).
π ββοΈπ ββοΈ
Therefore it is not worth spending time on something that takes more than the life of universe's time. ~ 9/10
newscientist.com
Hash identification time = 43.2*10^9 years.(@ 2^128).
π ββοΈπ ββοΈ
Therefore it is not worth spending time on something that takes more than the life of universe's time. ~ 9/10
newscientist.com
Wrote this thread so that you don't have to spend time regretting(like I do now) on knowing the time to calculate hash collisions. ~ 10/10 π π₯²
The above calculation is only valid for SHA-256 function. Feel free to share your comments/corrections and feedback if anyπ«
Unroll @rattibha
Loading suggestions...