password hashing
Storing a password as the output of a deliberately slow, salted hash function, so a stolen database does not reveal the passwords.
In more detail
Good password hashes such as scrypt and Argon2 are slow and memory hungry on purpose, so guessing at scale on graphics cards costs real money. To check a login you hash the candidate with the same salt and parameters and compare the results in constant time. Fast general-purpose hashes such as MD5 or plain SHA-256 are the wrong tool for passwords.
Related terms
- salt — An extra value mixed into data before hashing so that otherwise identical inputs produce different hashes.
- Argon2 — A modern password hashing function that is deliberately slow and needs a lot of memory for every guess, which makes stolen password hashes very expensive to crack.
- bcrypt — A long-established password hashing function with a built-in salt and an adjustable cost factor that makes each guess slower.
- password cracking — Recovering the actual passwords behind stolen password hashes by guessing candidates, hashing each one and looking for a match.
- scrypt — A memory-hard password hashing function that is slow and needs lots of memory, so guessing passwords in bulk is expensive.
- constant-time comparison — Comparing two secret values in a way that always takes the same time, whether they differ in the first byte or the last.
- hash — A short fixed-length fingerprint calculated from data, which changes completely if even one byte of the data changes.
Taught in
- CIA Triad, Non-Repudiation & Parkerian Hexad — Cybersecurity Fundamentals, GRC & Cryptography
- Authentication Versus Authorisation — Application Security & Threat Modeling for Engineers
- Mass Assignment — Application Security & Threat Modeling for Engineers