← Back to topic library
Dev MaxxingIntermediateIdentity and Access75 sec
Password hashing
Password hashing transforms a password into a scrambled, one-way value before storing it, so the original password can't be recovered even if the stored data is exposed.
Prerequisite: Authentication
What matters
Because hashing is one-way, even a database breach doesn't hand an attacker usable plaintext passwords directly, only the scrambled hashes.
Example
A login system stores a hash of a user's password, and checks a login attempt by hashing the entered password and comparing it to the stored hash.
Common misconception
Password hashing is not the same as encryption; encryption can be reversed with a key, while a proper password hash is designed to never be reversible.
Recall question
Why does storing a password's hash protect users even if the database is breached?
Keywords and related concepts
password hashingone-way functionsecurityauthentication