Concepts / Cryptography at work

Cryptography at work

Salted password storage

Also called password salt, per-user salt, rainbow table, precomputed lookup

Storing a password as a hash of the password plus a per-account random salt, so a precomputed table is useless and two accounts with the same password store different hashes.

Same password, different stored hash
Same password, different stored hash

Without a salt, equal passwords store equal hashes and one precomputed table cracks them all. A random salt per account makes each stored hash different; it is not a secret and does not slow guessing one account.

Salted password storage hashes each password with a random salt, one per account, stored in clear beside the [[cryptographic-hash|hash]]. Without it, the same password stores the same digest, so one precomputed table (a rainbow table is a compact one) reads passwords out, and reuse shows. With salts, no single table fits and equal passwords differ. A salt does not slow [[password-cracking|guessing]] one account: pair it with a slow hash ([[hashing-and-salting]]).

See it on real machines

Read next

Learn it on real machines.

Every lab is a small network of real Linux machines in your browser. Sign in with Google or email to start.

Start this lab