IT lexicon › Security › Collision attack

Collision attack

Security På svenska → Updated: 2026-10-13

Finding two different inputs that hash to the same value, which is easier than finding an input for a given hash value.

A hash function is collision-resistant if no one can practically find two different messages with the same output. The birthday paradox means a collision costs roughly the square root of the output space. A 128-bit hash can therefore collide after about 2^64 evaluations in theory, which is why 256-bit outputs are the usual recommendation for long-term security.

Practical attacks followed. MD5 was broken in stages between 1996 and 2004, when Xiaoyun Wang and coauthors produced constructed collisions. SHA-1 fell in 2017, when CWI and Google published two PDF files with the same hash. The lesson is simple: a hash cannot be trusted to show that two documents match once the other side chooses the content.

← Back to the lexicon