In case of password security I often read, that the use of rainbow tables is appreciated. It is possible, that I don't get it right, but my current perspective is just confusion.
You save a couple of salts in a table, but you must reference them in the table with password hash, which allows you to rebuild the password hash. So I would do it like this:
By creating a new password, save hash ( input + salt ) into the table
Table: Password: hash, Salt reference: 123
I thought, this is used to prevent "dictionary attacks", but what happens, when the user uses a password, which is contained by the dictionary. The attacker can easily pass through.
Just a list with events, which are happening in my point of view:
- User/Attacker "types" in this login data
- Email/Username is looked up and returns salt reference
- Look up salt with reference
- Build password
- Check password in table with email/username
So how can the salt matter, if it is automatically looked up? This might be a bit confusing, but in the end it makes all sense to me.