There are a lot of questions about salts and best practices, however most of them simply answer very specific questions about them. I have several questions which feed into one another.
Assuming a database is compromised a per user salt prevents the use of generic rainbow tables to crack passwords. A separate rainbow table would have to be generated for each and every user who had a unique salt in order to obtain their password. This would be a time consuming process which is what makes salts effective. This does not help a tremendous amount against dictionary or brute force attacks.
This leads to a number of questions:
- Although a salt is not meant to be security through obscurity wouldn t it still be more secure to place salts in a separate table? That way even if the users table was to become compromised the salts would not.
- Would having a 2nd hard-coded application wide salt add a tremendous amount of security? This way even if the database is compromised, the actual application would also have to be compromised or both the salts and hashes would be completely useless.
- What is the best length for a salt? Obviously the longer the better, however with larger numbers of users database size does become an issue, so what would be the minimum length for an effective salt be?
- Is using a 3rd party source for a "true random salt" (random.org, random.irb.hr) really needed? I understand using a salt based off of server time is "guessable" to some extent however taking a random sub-string of a sha1 d random string seems like an effective salt method.
Thank you in advance.