3 ms·
You're thinking of pepper, not salt. Salt is a random value that is added to a password before it is hashed, so that two identical passwords do not hash to the
by mnw21cam 12y ago
You're thinking of pepper, not salt.
Salt is a random value that is added to a password before it is hashed, so that two identical passwords do not hash to the same value. The value is different for each hashed password, and is stored alongside the hash.
Pepper is a configured value that is the same for all hashed passwords, and is added to the password (and salt) before it is hashed. It is kept secret, and effectively turns the hash function into a secret hash function. Its merit can be argued because if an attacker is able to compromise your hashed password database, they could possibly have compromised your configuration and discovered the pepper too. However, it does add an extra hurdle for an attacker.