MD5 (Message Digest 5, RFC 1321) is a cryptographic hash function producing a 128-bit (32 hex character) digest. Designed by Ron Rivest in 1991, it was the standard integrity check for two decades before collision attacks broke it.
Output Format
MD5("hello world") = 5eb63bbbe01eeed093cb22bb8f5acdc3
Why MD5 Is Broken
- Collision attacks (2004) — Wang & Yu published a collision technique. Any two different inputs can be crafted to produce the same MD5 digest in seconds on modern hardware.
- Chosen-prefix collisions (2007) — attackers can produce two documents with different content but identical MD5 that both look legitimate. Weaponized in the Flame malware to forge a Microsoft code-signing certificate (2012).
Where MD5 Is Still Acceptable
- File integrity checks where the file isn’t security-sensitive (e.g., matching a local download to a published mirror hash)
- Checksums for accidental corruption detection (transmission errors, not attackers)
- De-duplication keys in databases when you control both sides
Where MD5 Must Not Be Used
- Password hashing — even with salt. Use bcrypt or Argon2.
- Digital signatures — use SHA-256 or SHA-512.
- HMAC — HMAC-MD5 has been broken since 2011.
- TLS certificate signatures — deprecated by every CA.
Generate MD5, SHA-256, and other hashes with the hash generator.
Related
Check the SHA-256 glossary entry, the bcrypt entry, and the Argon2 entry for modern replacements.