InterviewHubPRO
Section Overview
Q9

Question 9 of 50

Part 1: Candid Security Experience, Threat Modeling & Fundamentals (1 - 10)

18%
Web Security & OWASP (50 Qs)•Part 1: Candid Security Experience, Threat Modeling & Fundamentals (1 - 10)

Modern Password Hashing: Why MD5/SHA-256 are broken, Argon2id vs. bcrypt, and memory-hard functions.

Cryptographic Storage of User Passwords

General-purpose hashing algorithms (MD5, SHA-1, SHA-256, SHA-512) are engineered for high-speed file checksums and digital signatures. They can process billions of hashes per second, making them dangerously vulnerable to GPU-based offline dictionary attacks.

yaml
Brute Force Speed Comparison (Modern RTX 4090 GPU Cluster):
- SHA-256:   ~120,000,000,000 hashes / sec  (CRACKED IN SECONDS!)
- bcrypt:    ~100,000 hashes / sec          (HIGH RESISTANCE)
- Argon2id:  ~1,000 hashes / sec            (OPTIMAL: MEMORY-HARD CRACKING DEFENSE)

Hashing Algorithm Comparison

AlgorithmTypeStrengths & CharacteristicsRecommendation
Argon2idMemory-Hard (Hybrid)Winner of the Password Hashing Competition (PHC). Defends against both GPU and ASIC hardware attacks by requiring large blocks of RAM (e.g., 64MB per hash).#1 Industry Standard (OWASP Recommended)
bcryptCPU-Bound (Eksblowfish)Industry workhorse for 20+ years. Tunable work factor (cost: 12). Maximum 72-byte password length truncation gotcha.Excellent legacy choice
PBKDF2Iterative CPU-BoundNIST certified, widely supported in enterprise standard libraries. Requires high iteration count (600,000+ iterations for SHA-256).Acceptable for legacy compliance

Argon2id Production Parameters (OWASP Guidelines)

  • Memory Cost (m): 65,536 KiB (64 MiB RAM per hash).
  • Time Cost (t): 3 iterations.
  • Parallelism (p): 4 threads.