Last updated: November 2026
Transparency disclosure: This guide contains affiliate links. If you purchase a recommended security tool through our links, we may earn a commission at no extra cost to you.
When a website suffers a database breach, the difference between a minor incident and millions of hijacked accounts comes down to one thing: password hashing. Secure systems never store your actual password in plaintext—nor do they encrypt it with a reversible cipher like AES-256. Instead, they run it through a specialized one-way algorithm designed to be painfully slow for attackers to brute-force.
In this technical guide to password hashing, we explain why fast hashes like SHA-256 fail miserably for storing credentials, how cryptographic salts destroy rainbow tables, how bcrypt, PBKDF2, and Argon2id compare in 2026, and let you test how long your own password would survive a GPU cracking rig using our live calculator below.
Why Fast Hashes (MD5, SHA-1 & Raw SHA-256) Fail for Passwords. Password Hashing
In our breakdown of Cryptographic Hash Functions (SHA-256 vs SHA-3), we noted that SHA-256 is engineered to be as fast as possible—so your computer can verify a 4 GB file in seconds.
For password hashing, speed is a fatal flaw:
- A modern multi-GPU cracking rig can test tens of billions of raw SHA-256 guesses per second.
- At that speed, an 8-character lowercase-and-digit password can be brute-forced in minutes—even without dictionary wordlists.
- Worse, attackers don’t even have to guess one password at a time if credentials are stored unsalted.
To stop offline cracking after a database leak, modern password hashing relies on two defenses: unique cryptographic salts and deliberately slow, memory-hard Key Derivation Functions (KDFs).
What Is a Cryptographic Salt (and How It Kills Rainbow Tables)?
A salt is a unique, cryptographically random string (typically 128 bits / 16 bytes) generated separately for every single user account and combined with their password before hashing. The salt is stored openly alongside the resulting hash in the database.
Salting solves two massive vulnerabilities immediately:
- Eliminates Identical Hashes: If two users both pick
Summer2026!, their unique salts produce two completely different hashes—so an attacker scanning a leaked database cannot spot reused passwords. - Destroys Precomputed Rainbow Tables: Attackers cannot use precomputed lookup tables of common password hashes because every single user has a different salt, forcing the attacker to run a brand-new brute-force attack on each account individually.
(Optional extra layer: some high-security backends also add a pepper—a single application-wide secret stored outside the database in a hardware security module or environment variable—so a SQL injection dump alone isn’t enough to start cracking).
bcrypt vs. PBKDF2 vs. scrypt vs. Argon2id (2026 Comparison)
Modern password hashing algorithms—formally recommended by the OWASP Password Storage Cheat Sheet—replace fast general-purpose hashes with tunable work factors (time, memory, and parallelism).
| Algorithm | Year / Standard | Memory-Hard? | GPU / ASIC Resistance | Key Limitation | 2026 Recommendation |
| PBKDF2 | 2000 (NIST SP 800-132) | No (CPU-bound only) | Low–Moderate (vulnerable to GPUs) | Needs 600,000+ iterations to stay safe | Use only when FIPS 140-3 compliance requires it |
| bcrypt | 1999 (Blowfish-based) | Minimal (4 KB state) | Moderate–Good (resists cheap GPUs) | Truncates passwords at 72 bytes; not memory-hard | Solid legacy standard; safe if cost ≥ 10–12 |
| scrypt | 2009 (RFC 7914) | Yes | High | Sensitive to memory-cost misconfiguration | Good alternative where Argon2 isn’t available |
| Argon2id | 2015 / IETF RFC 9106 | Yes (Tunable RAM) | Highest (defeats GPUs & ASICs) | Slightly higher server RAM usage during logins | #1 Industry Standard in 2026 |
Why Argon2id Won the Password Hashing Competition
While bcrypt served the web well for over two decades, it only requires 4 KB of memory—meaning modern FPGA and high-end GPU clusters can still parallelize attacks against it. It also silently cuts off passwords longer than 72 bytes (a subtle trap if users paste long passphrases).
Argon2id—the hybrid variant of the Password Hashing Competition winner—fixes both problems:
- Memory-Hard Defense: You force every single login attempt to allocate a configurable chunk of RAM (for example, 19 MiB to 64 MiB). While a legitimate server handles that in ~100 milliseconds, an attacker’s GPU cannot run thousands of parallel cracking threads because GPUs have strictly limited per-core memory bandwidth.
- Side-Channel + GPU Protection: Argon2id combines Argon2i (data-independent memory access, resisting side-channel timing leaks) on the first pass with Argon2d (data-dependent access, maximizing GPU resistance) on subsequent passes.
Password Entropy & Brute-Force Crack Time Estimator
Test a sample password (or click Generate Strong Sample) to see its cryptographic entropy in bits and how drastically Argon2id slows down an offline GPU cracking rig compared to raw SHA-256.
| Hashing Algorithm (Offline GPU Rig) | Assumed Crack Speed | Estimated Average Crack Time |
|---|---|---|
| Raw SHA-256 (Unsalted / Fast) | 100B guesses/sec | — |
| bcrypt (Cost Factor 12) | 50,000 guesses/sec | — |
| Argon2id (64 MiB RAM, 3 iter) | 500 guesses/sec | — |
How Real-World Security Tools Use Password Hashing
You don't need to be a backend engineer to benefit from Argon2id—the best consumer privacy tools already build it into their zero-knowledge architectures:
- Zero-Knowledge Password Vaults: NordPass derives your local vault encryption key from your Master Password using Argon2id and encrypts every stored login with XChaCha20 (see our technical breakdown of ChaCha20 vs AES-256 and our full NordPass Review). Even if an attacker stole your encrypted vault file, Argon2id makes offline guessing astronomically expensive—and because NordPass generates unique 20+ character random passwords for every website, a breach on a sloppy site using weak hashing never compromises your other accounts.
- End-to-End Encrypted Privacy Ecosystems: Swiss privacy leader Proton (behind Proton VPN, Proton Mail, and Proton Pass) uses SRP (Secure Remote Password) combined with bcrypt / Argon2 key derivation so your plaintext password never even crosses the network during authentication.
- Protecting Credentials in Transit: Password hashing only protects stored databases—it doesn't stop an attacker on public Wi-Fi from intercepting unencrypted sessions or phishing your login. Pairing a zero-knowledge password manager with an audited VPN (NordVPN or Proton VPN) seals both halves of your security stack.
NordPass
Zero-knowledge password & passkey manager powered by Argon2id key derivation and XChaCha20 encryption—generates unique 20+ char logins automatically.
Proton VPN
Built by the Swiss team behind Proton's SRP/Argon2 encrypted ecosystem—protects logins on public Wi-Fi with audited open-source apps.
NordVPN
Encrypts your network traffic with ChaCha20-Poly1305 and blocks credential-stealing phishing domains via Threat Protection Pro.
Verdict: The Golden Rules of Password Hashing in 2026
Whether you are securing a web application or protecting your own digital life, the rules are straightforward:
- For developers: Always use Argon2id with a unique 128-bit random salt per user (following OWASP's baseline of at least 19 MiB RAM and 2 iterations, or higher if your server allows). Use bcrypt (cost ≥ 12) only for legacy compatibility, and never hash passwords with raw SHA-256, SHA-1, or MD5.
- For everyday users: You can't control whether a random online store uses Argon2id or outdated MD5 behind the scenes. The only reliable defense is never reusing a password across two sites—and using a high-entropy passphrase (70+ bits) inside a zero-knowledge vault like NordPass to generate unique random logins everywhere else.
Explore Cryptography & Mathematical Foundations
Dive deeper into the ciphers, finite fields, and number theory powering modern digital security.
Ciphers & Hashing
Public-Key Cryptography
Frequently Asked Questions (FAQ)
What is the difference between hashing and encrypting a password?
Encryption is a two-way process—anyone with the decryption key can recover the original plaintext password. Password hashing is strictly one-way: the system converts your password into a fingerprint and compares fingerprints on future logins without ever needing to know or store your actual password.
Does a cryptographic salt need to be kept secret?
No. A salt is not a secret key—it is safely stored in plaintext right next to the password hash (in fact, bcrypt and Argon2 output strings embed the salt directly inside the hash format). Its sole job is to guarantee uniqueness per user and defeat precomputed rainbow tables.
Is bcrypt still safe in 2026, or should I migrate to Argon2id?
Bcrypt with a properly tuned cost factor (10–12+) is still considered safe for existing legacy systems, provided you account for its 72-byte password length limit. However, for all new projects in 2026, Argon2id is the clear first choice because its tunable memory-hardness provides far stronger protection against modern GPU and ASIC cracking hardware.