The Runtime Theory
Password Storage and Cryptography

Store Password Verifiers, Not Recoverable Passwords

Password storage should make a stolen database expensive to search.

The Runtime Theory Team5 min read#passwords#hashing#salts
▸ On this page

The model

Password storage should make a stolen database expensive to search. A password hashing function is intentionally slow and memory-intensive compared with a general-purpose hash. Each password needs a unique random salt so equal passwords do not produce equal stored verifiers.

A concrete walk-through

At registration, the service generates a salt and computes a verifier using a password-hashing algorithm with a configured cost. At login, it recomputes the verifier and compares safely. The stored record includes the algorithm parameters so the service can increase cost and rehash after successful authentication.

Costs and failure cases

Encryption is reversible with a key and is not a substitute for password hashing. A fast hash such as plain SHA-256 permits attackers to test guesses too quickly. No password scheme protects weak user choices completely, so rate limits and multifactor options still matter.

Check your understanding

A database export reveals salts and password verifiers. Explain what salts prevent, what they do not prevent, and why the chosen hash must be expensive to compute.

Further reading

OWASP Cheat Sheet: Password Storage

Not started

Sign in to save your learning progress.

Sign in to save