So im building a authentication library for a site im working on.
There are other reasons besides the fact that im reinventing the wheel so don't get started there...
Back on topic...
The way I understand it is salt basically makes a pre-compiled rainbow table useless since you have no introduced yet more characters into the hash.
So a normal rainbow table would have
foo == acbd18db4cc2f85cedef654fccc4a4d8
And lets say I have a user
Username: Bob
Password: foo
Salt: asdf
encypted pass: ba6cd6a1511681f0df6d455f41d49ebc
And the user dosn't know how im storing the password (in this case password+salt)
As you can see ba6cd6a1511681f0df6d455f41d49ebc != acbd18db4cc2f85cedef654fccc4a4d8
So I guess all a salt does it make the rainbow table worthless and the fact that they would have to now generate a new one with the users salt. Just means It would take longer to crack 1 users password.
However it would make it closer to a brute force since each user has their own salt.
==================
So now the next thing is with some fancy programming (not really but more fancy than md5(password.salt); )
Why not add some more complexity since id be storing the password and salt in the table right next to each other.
Say we have the salt of asdf1234
Now instead of just md5(password+salt) lets do
md5((first 4 of salt) + password + (last 4 of salt))
This adds even more complexity to the script in the sense that if they just took the database they have no clue now that you split the salt. And to top that off you could encrypt the code as well to hide this fact a bit more as well.
Guess this was more of a just making sure I am getting what password salting is used for. It has always confused me that you store the salt with the password.
There are other reasons besides the fact that im reinventing the wheel so don't get started there...
Back on topic...
The way I understand it is salt basically makes a pre-compiled rainbow table useless since you have no introduced yet more characters into the hash.
So a normal rainbow table would have
foo == acbd18db4cc2f85cedef654fccc4a4d8
And lets say I have a user
Username: Bob
Password: foo
Salt: asdf
encypted pass: ba6cd6a1511681f0df6d455f41d49ebc
And the user dosn't know how im storing the password (in this case password+salt)
As you can see ba6cd6a1511681f0df6d455f41d49ebc != acbd18db4cc2f85cedef654fccc4a4d8
So I guess all a salt does it make the rainbow table worthless and the fact that they would have to now generate a new one with the users salt. Just means It would take longer to crack 1 users password.
However it would make it closer to a brute force since each user has their own salt.
==================
So now the next thing is with some fancy programming (not really but more fancy than md5(password.salt); )
Why not add some more complexity since id be storing the password and salt in the table right next to each other.
Say we have the salt of asdf1234
Now instead of just md5(password+salt) lets do
md5((first 4 of salt) + password + (last 4 of salt))
This adds even more complexity to the script in the sense that if they just took the database they have no clue now that you split the salt. And to top that off you could encrypt the code as well to hide this fact a bit more as well.
Guess this was more of a just making sure I am getting what password salting is used for. It has always confused me that you store the salt with the password.