Web & Dev

Cryptographic Hash Comparison

Hash algorithms side-by-side — output size, security status, and recommended uses.

Algorithms

AlgorithmOutputStatusUse for
MD5128 bit❌ BrokenNon-security checksums only
SHA-1160 bit❌ BrokenLegacy — avoid
SHA-256256 bit✓ SecureGeneral-purpose signing, integrity
SHA-384384 bit✓ SecureLonger than 256 where required
SHA-512512 bit✓ SecureFaster than SHA-256 on 64-bit CPUs
SHA-3 (224/256/384/512)vary✓ SecureKeccak sponge — distinct from SHA-2
BLAKE2b / BLAKE2s1–512 bit✓ Secure, fastGit object hashing, general purpose
BLAKE3Arbitrary✓ Secure, very fastParallel integrity, streaming
CRC-3232 bit❌ Not cryptographicError detection only
xxHash32/64/128 bit❌ Not cryptographicFast non-crypto checksums

Password hashes (slow on purpose)

AlgorithmTunableNotes
bcryptcost (log-rounds)Wide support, max 72-byte input.
scryptN, r, p (memory-hard)Memory-hard defence against GPU/ASIC.
Argon2idtime, memory, parallelismPHC winner — preferred for new systems.
PBKDF2iterationsFIPS-approved but not memory-hard.

Notes

  • Use HMAC-SHA-256 (not bare SHA-256) for message authentication with a secret key.
  • Use bcrypt/Argon2id (not SHA-256) for password storage.
  • Prefer AEAD (AES-GCM, ChaCha20-Poly1305) for encryption — hashes alone don't provide confidentiality.
Was this article helpful?