Skip to content
CryptoAcademy logo CryptoAcademy
Menu
Advanced Cryptography

Hash collision

Two different inputs that produce the same hash output.

Hash collision at a glance
A hash function turns input of any length into a fixed 256-bit digest INPUT — ANY SIZE Hello Blockchain 17 bytes SHA-256 one-way compression no key · deterministic · fast DIGEST — ALWAYS 256 BIT 7f83b1657ff1fc53b92dc1814 8a1d65dfc2d4b1fa3d677284 addd200126d9069 64 hexadecimal characters Change one character in the input and the entire digest changes. Going back from digest to input is computationally infeasible — hashing is one-way.

In simple terms

A collision happens when two different inputs share a hash. For a secure hash, finding one must be computationally infeasible.

Analogy

Two different people ending up with the same fingerprint.

Going deeper

Because the output space is finite, collisions always exist — security only requires that finding one is hard. Generic attacks cost about 2n/2 operations (the birthday bound), so SHA-256 sits at ~2128 while SHA-1 fell at ~263 in the 2017 SHAttered attack.

Common mistake

Confusing "a collision exists in theory" with "a collision can be found in practice".

Share this page

Send this link to a friend, or scan the QR code to open it on your phone.