Password security
Argon2 vs bcrypt vs PBKDF2: Choosing the Right Password Hash in 2026
Compare modern password hashing algorithms on memory-hardness, GPU resistance, FIPS compliance, and work factor configuration.
Storing passwords securely in an application database is a core engineering responsibility. Storing plain text or obsolete fast cryptographic hashes (such as MD5, SHA-1, or plain SHA-256) ensures that any database breach immediately compromises user accounts across the web.
Modern password hashing functions must be intentionally slow, CPU-intensive, and memory-hard.
The Contenders: Argon2id, bcrypt, and PBKDF2
1. Argon2id (Winner of the Password Hashing Competition)
- Architecture: Memory-hard algorithm with resistance to both side-channel cache attacks and GPU/ASIC parallel cracking.
- Recommended Parameters: Argon2id with 64 MB memory cost ($m=65536$), 3 iterations ($t=3$), and 4 parallel threads ($p=4$).
- Best For: Modern web applications, mobile backends, and new systems.
2. bcrypt
- Architecture: Based on the Blowfish cipher, bcrypt has resisted cryptanalysis for over 25 years. It is computationally intensive but utilizes only 4 KB of memory.
- Recommended Cost Factor: Work factor of 12 to 14 (targeting ~250–500ms hash time on server hardware).
- Limitation: Does not scale memory usage to exhaust modern high-memory GPU cracking rigs.
3. PBKDF2
- Architecture: Standardized by NIST and widely required for FIPS 140 compliance.
- Recommended Iterations: Minimum 600,000 iterations for PBKDF2-HMAC-SHA256 according to latest OWASP guidelines.
- Best For: Legacy enterprise environments requiring strict FIPS compliance.
Sources
Frequently asked questions
- Which password hashing algorithm is best in 2026?
- Argon2id is the internationally recognized gold standard, winning the Password Hashing Competition (PHC) and providing unmatched defense against GPU/ASIC cracking.
- Is bcrypt still secure?
- Yes, bcrypt remains secure and widely supported with work factors of 12 to 14, though it lacks Argon2id memory-hardness.
About the author
Written by the LockdownGuide Editorial Team, which researches and maintains every guide on this site. Read more about our editorial standards or contact us with corrections.
Keep reading
SIM Swapping Attacks: How Attackers Steal Numbers & How to Lock Your Carrier
How SIM swapping works, how attackers bypass SMS two-factor authentication, and step-by-step instructions to set carrier account lock PINs.
Read the guide →Passkeys vs Passwords: The Complete FIDO2 WebAuthn Migration Guide
How passkeys work under the hood with public-key cryptography, why they are immune to phishing, and how to migrate your organization.
Read the guide →How to Conduct a Credential Stuffing Audit & Protect User Authentication
How botnets execute credential stuffing attacks using breached password dumps, and defensive steps to detect and mitigate automated login fraud.
Read the guide →