MD5 Collision Generator — Live Demo

1 min read Original article ↗

MD5 is a cryptographic hash function designed in 1991 by Ronald Rivest. It produces a 128-bit (16-byte) hash from any input. In 2004, Wang et al. discovered a practical collision attack.

This tool implements the FastColl identical-prefix collision, finding two 128-byte messages M and M' where MD5(M) = MD5(M') but M != M'. The attack uses:

Wang's differential path — specific bit differences propagated through MD5's internal rounds

Sufficient conditions — ~290 precise bit constraints on internal state variables

Tunneling (Klima 2006) — efficiently trying many candidates by modifying "neutral" bits

Two-block structure — Block 0 creates a near-collision; Block 1 completes it

The entire implementation (MD5 hash + collision search) is written from scratch with no external dependencies, compiled to WebAssembly for near-native performance.