MD5
A widely deployed hash function that produces a 128-bit (32 hex character) digest. MD5 is cryptographically broken — practical collisions can be generated in seconds on consumer hardware. It must not be used for any security purpose, but remains acceptable for non-security checksums and legacy compatibility.
MD5 (Message Digest Algorithm 5) was designed by Ron Rivest in 1991 and produces a 128-bit (32 hexadecimal character) digest. It was widely adopted for checksums and digital signatures. MD5 is now cryptographically broken — collisions (two different inputs with the same hash) can be generated in seconds on a modern laptop. Do not use MD5 for any security-critical purpose.
Why MD5 Is Broken
In 2004, researchers demonstrated the first practical MD5 collision. By 2008, a rogue Certificate Authority certificate was created using MD5 collisions, allowing forged HTTPS certificates. MD5 collision attacks now take milliseconds on consumer hardware.
What MD5 Cannot Be Used For
- Password storage: MD5 is fast and breakable via rainbow tables — use bcrypt or Argon2
- Digital signatures: collisions allow document forgery
- Certificate fingerprints: replaced by SHA-256 in all modern PKI
- File integrity in security contexts: an attacker can produce a malicious file matching a MD5 hash
Acceptable Uses
MD5 remains acceptable when security is not a concern:
- Checksums for accidental corruption: verifying a file was not corrupted in transit (not by an attacker)
- Hash tables and data structures: fast non-cryptographic hash
- Legacy system compatibility: where migration is not possible
- Caching keys: generating cache keys from content (no security requirement)
MD5 vs SHA-256
| Property | MD5 | SHA-256 |
|---|---|---|
| Output bits | 128 | 256 |
| Speed | Very fast | Fast |
| Cryptographic status | Broken | Secure |
| Collision resistance | Broken | Intact |
Always prefer SHA-256 for new implementations. For checksums where performance matters and security is irrelevant, BLAKE3 is modern and extremely fast.
Calculate MD5 and SHA-256 hashes with the Hash Generator Tool.