I'm trying to understand how a password salt increase security. Basically, for each user password a random string is generated, added to the password and then hashed. When the user logs on, the system fetch the salt for that specific user, adds it to the password, hash and compare to the stored hash value.
Now. I understand how this makes a much longer password/hash value. What I do not understand is what hinders an automated function to chose a username and just make a lot of login attempts on - for example - a web site, with different password each time. To me it would seem that the salt has no function in that scenario?
I feel quite certain that I have misunderstood this and would be glad if someone could help me understand.
What I do not understand is what hinders an automated function to chose a username and just make a lot of login attempts on - for example - a web site, with different password each time. To me it would seem that the salt has no function in that scenario?
Correct. Hashing and salting do not prevent against brute-force login attempts. (For that, you want to limit the number of login attempts per unit of time, or to ban after X-failed attempts).
Hashing and salting are used to prevent a stolen password list being cracked (or, to increase the amount of time needed to crack said list).
When storing passwords, you have 3 options: plain text, hashed, or hashed+salted. If I steal your password list:
So: hashing + salting is used to prevent (or slow) attempts to crack a password from a stolen hash using brute force methods.