Skill 5.2.2

Salting

Key Concepts

A salt is a random value generated for each password and combined with it before hashing; it is stored alongside the hash. Identical passwords then produce different hashes, which defeats rainbow tables (precomputed hash lists) and forces attackers to attack each hash separately.

Passwords should also be hashed with deliberately slow, iterated algorithms such as bcrypt, scrypt, Argon2 or PBKDF2, which make guessing expensive. A pepper is an additional secret stored separately from the database.