Reference

Hash algorithms, explained

A cryptographic hash maps any input to a fixed-size digest. That single idea serves integrity checks, signatures, password storage and key derivation, but the algorithms are not interchangeable. These entries state the output size, the status and the correct use.

Three different jobs

General-purpose hashes such as SHA-256 are designed to be fast. They fit integrity checks, content addressing and signatures, where speed is a feature. Password hashes such as bcrypt, scrypt and Argon2 are deliberately slow and memory-hungry, because an attacker who steals the database should not be able to test billions of guesses per second.

Message authentication is a third job: HMAC combines a hash with a secret key so a receiver can verify both integrity and origin. A plain hash cannot do that, because anyone can recompute it.

Broken does not mean useless

MD5 and SHA-1 are broken for collision resistance: an attacker can construct two different inputs with the same digest. That destroys signatures and certificate trust, but a checksum against accidental corruption still works. The distinction matters when choosing an algorithm.

For new designs, use SHA-256 or SHA-512 for integrity and signatures, and Argon2id, scrypt or bcrypt for passwords. A salt prevents precomputed tables; a slow algorithm limits offline guessing after a breach.

All entries

New tools, straight to your inbox

One short email when we add tools worth using. No spam, unsubscribe anytime.