Salting

Adding a unique random value to each password before it is hashed, so identical passwords produce different stored hashes and precomputed tables such as rainbow tables lose their value.

Salting adds a random value, the salt, to each password before it is hashed, and stores the salt beside the resulting hash. Two users who choose the same password therefore end up with different stored values, and an attacker who steals the password file has no direct way to see that they match. NIST SP 800-63B, now in revision 4, requires passwords to be salted and hashed using a suitable password hashing scheme, and sets a minimum salt length of 32 bits.

The salt defeats precomputation. A rainbow table is built once for one hash function and reused against many stolen files; with a unique salt per password, the attacker would need a separate table for every salt, which removes the advantage. What salting does not do is make a weak password strong. The salt is not secret, so an attacker can still try guesses against one account at a time with a dictionary attack. Slowing each guess is the job of key stretching, and the two are commonly used together. A secret value added on top, sometimes called a pepper, is a separate control.

Exam relevance: a scenario about identical hashes in a stolen password store, or about precomputed tables, is likely to point to salting. Candidates are expected to keep straight that salting defeats precomputation, while key stretching slows guessing.