SHA-256 vs Argon2id for passwords
SHA-256 is fast, so a thief with the password table can test 10,000 guesses/s on one core. Argon2id with 19 MB and 25 ms per hash cuts that to under 100 guesses/s. Logins still finish under 500 ms on a 2 vCPU auth box.
Envelope keys · < 1 key service calls/s · limit 10,000/s
Limit 1/s per account · all codes tried in 12 days
Case 1
Users sign in at 20 logins/s, then 60 logins/s from 0:10, on one 2 vCPU box. A thief has the password table. One attacker core may test at most 100 guesses/s.
| Measure | Goal | SHA-256 with a salt | Argon2id, 19 MB, 25 ms |
|---|---|---|---|
| Throughput (Guesses) | under 100 req/s | 10,000 req/s Fail | 41 req/s Pass |
| p99 latency (Logins) | under 500 ms | 71 ms Pass | 192 ms Pass |
| Availability (Logins) | at least 99.9% | 100% Pass | 100% Pass |
| Monthly cost | 34 USD/mo | 34 USD/mo | |
| Error rate | 0% | 0% |