4 ms·
Not mentioned in the article, is why salting is important even if rainbow tables aren't part of your threat model: There is more than one reason, but they all
by aidenn0 11y ago
Not mentioned in the article, is why salting is important even if rainbow tables aren't part of your threat model:
There is more than one reason, but they all boil down to one fact; two accounts with the same password will hash to the same value if you do not have a salt.
As an example, if an attacker gets a dump of all the hashed passwords, the weak passwords will be immediately apparent just from an analysis of duplicates.
- firebird84 11y agoI almost feel as though this is at least half of the point of using salts. We're trying to make things slow, so forcing an attacker to crack the same password twice (or more) in cases where it's reused seems beneficial and very cheap. Weak passwords will still be cracked first but it will still require at least SOME work.
- hinkley 11y agoThat was the reason salts were used in /etc/passwd. You couldn't tell if John and James had the same password, and you couldn't tell if John used the same password on multiple machines. Or more critically, if the root password was the same on the entire cluster. As you two have already discussed, it mostly provides herd safety. You can't target the 'weak ones' because all the passwords look roughly the same.
- willvarfar 11y agoFurthermore, bcrypt, scrypt and the rest all have a salt. They just serialize it into the password along with the work factor etc.
- Semiapies 11y agoThat's kind of the point; if you're worrying at all about salts in your login code, you're using a crappy algorithm. If you're using a decent algorithm, it takes care of the salts.
- InclinedPlane 11y agoSort of a catch-22 though. On the one hand you want all of the important details about your password "encryption" system to be handled by more competent people (read: cryptographic experts). On the other hand, without an understanding of the details you will be too ignorant to tell the difference between a good and bad algorithm and in whom you can entrust such implementation specifics or not. Additionally, one might say "well, just follow industry best practices", but that is based on the idea that "use bcrypt/script" is such, but it's not. The "best practice" as defined by the industry at large is mostly just to use MD5, maybe with a salt, because that's what "everybody else is doing".