3 ms·
Isn't there value in having a long global salt to make bruteforcing harder in case the database but not the server code is compromised, though?
by oliwary 13y ago
Isn't there value in having a long global salt to make bruteforcing harder in case the database but not the server code is compromised, though?
- judofyr 13y agoThink about it like this: Using a SHA256 + global salt is nothing different from using SHA256 with a different set of constants/initial values.
- oliwary 13y agoTrue, but if the global salt is secret, it'll at least make it slightly harder for the attacker to figure out the password. For example, if the password is "a" and an unique salt is available in the database, it'll be trivial to brute force. If the password function is something like this, however: sha256("longsalt" + password + salt) the attacker will first have to figure out longsalt which can be slow if it's long. Or am I completely mistaken?
- Buge 13y agoBut if hackers can break in and steal your database, they'll probably also be able to steal the global salt.
- pmjordan 13y agoIf you can steal the password hash database, stealing the shared "salt" is usually going to be trivial. Second, lots of hash functions are vulnerable to length extension attacks, so even if extracting the shared secret directly is hard, you can probably exploit the system to see what an empty password hashes to and then use that as a basis for brute-forcing the rest. In other words: there is a reason why security experts and cryptographers recommend the password storage mechanisms they do.
- oliwary 13y agoI see, that makes sense. Thanks for explaining!