Security · interactive
Storing passwords
Assume the user table leaks: it eventually does. What the attacker can do next depends entirely on how you stored the passwords. Hashes shown are illustrative; guess rates are rough single-GPU figures.
The leaked users table · SHA-256
| user | password column |
|---|---|
| alice | 0b14d5…e1f7 ← same as another user |
| bob | 0b14d5…e1f7 ← same as another user |
| carol | 5f2e88…41c0 |
Time to try every possible “8 random lowercase letters” password:
21 seconds
26⁸ ≈ 2×10¹¹ options
Fast hash: about 10 billion guesses a second on one GPU. Same password, same hash.
How passwords are stored
The user's password
Step 2 of 4 · read left to right
In production
Tools and technologies
Use a password-hashing function from your platform; never design your own.
Not tied to one language — use these names when you search docs or design a system.
- OWASP Password Storage Cheat SheetStandard
Recommended algorithms and parameters.
Official site ↗ - Argon2Standard
Winner of the Password Hashing Competition.
GitHub ↗ - bcryptStandard
The long-standing slow, salted password hash.
Official site ↗ - Have I Been PwnedService
Check passwords against known breaches.
Official site ↗