Skip to content

Glossary

Salt

A salt is a unique random value added to a password before hashing, defeating rainbow tables and ensuring identical passwords produce different hashes.

A salt is a unique, random value combined with a password before it is hashed. Its job is to make every stored hash different, even when two users choose the same password. Because the salt changes the input, identical passwords no longer share a digest, and an attacker cannot crack many accounts at once by recognising repeated hashes.

Salting also defeats precomputed rainbow tables: a table built for unsalted MD5 is worthless against salted hashes, because the attacker would need a separate table for every possible salt. Modern password formats such as bcrypt and sha512crypt store the salt inside the hash string itself.

Important caveat: a salt protects against precomputation, not speed. It does not slow down a per-guess attack, so a salt must be paired with a slow algorithm to be effective. See why fast hashes are dangerous for the full picture.