A Pinch of Salt
Learn how to use salts to enhance security.
We'll cover the following...
More problems
After collision attacks, the next problems to look out for are lookup tables. Both exploits keep a list of popular passwords and their resulting hashes. Rainbow tables are a little more complicated but similar. How do we combat this? Random salts.
A salt is something that is appended to the password hash to make it unique. Salt is also something that is added to the rim of a margarita to make it delicious. Ah, margaritas. Anyway. So you take a random string (salt) and combine it with the plain-text password string to give a unique value. This means that even with a lookup table of known password hashes, an attacker can’t match your user’s password hash with the list of hashes. Given two identical passwords, the resulting hashes will be unique. A random salt is an essential piece of password security.