5 ms·
I am not too well-versed in this sphere, but I would also require salting passwords when hashing. It obviously won't help if your database is compromised, but w
by 0003 14y ago
I am not too well-versed in this sphere, but I would also require salting passwords when hashing. It obviously won't help if your database is compromised, but will protect your users (and your database) against the effects of leaks such as these.
- ZoFreX 14y ago> It obviously won't help if your database is compromised Good news, everyone: it will!
- batista 14y agoNo, it won't. They can just write a new password + salt in the db and get in as that user.
- shakesbeard 14y agoBut maybe that's not want you want to achieve?
- ZoFreX 14y agoWell, we need to define the attack if we're going to talk about what will and won't help. Generally when we talk password security, we assume the attack is to discover a large number of users' passwords, not to spoof as one. Additionally, it's more common to get read-only access to the data than it is to be able to execute arbitrary queries against the DB.
- ghshephard 14y agoOne of these days we will shut down the "Salting password hashes is a useful thing to do." meme from 1994. See: http://codahale.com/how-to-safely-store-a-password/ http://codahale.com/how-to-safely-store-a-password/ for details.
- e2e8 14y agoOf course a salt will not make a single password harder to attack. A salt will however force you to attack passwords "one at a time" by making precomputed hashes useless.
- nathan_long 14y agoYes, but you can attack them one at a time at astonishing speed these days. Which is why you need to not use a hashing algorithm designed to be fast, like SHA, but one designed to be slow, like bcrypt.
- Pyroshock 14y agoThere's a reason key derivation functions like PBKDF2 and bcrypt still require a salt as an input.
- pjscott 14y agoAnd there's a reason why high-level libraries like bcrypt handle salt generation and storage internally: if they didn't, people would screw it up. It's amazing how many people blithely use some crazy scheme like pwhash = md5("this is my salt" + password) Progress in password hashing security is primarily progress in making things trivially foolproof and then hectoring people into using them.
- rdzgtdsv 14y agoDoesn't this crazy scheme protect against brute force when only database is leaked, and "this is my salt" remains secret?
- masklinn 14y ago> One of these days we will shut down the "Salting password hashes is a useful thing to do." Uh? Why? It is a useful thing to do. More than that, it is necessary (but not sufficient). There's a reason why all of pbkdf2, bcrypt and scrypt generate salts if you leave them to their own devices. > See: http://codahale.com/how-to-safely-store-a-password/ http://codahale.com/how-to-safely-store-a-password/ for details. You completely misunderstand the article.