3 ms·
Using bcrypt or scrypt or PBKDF2 is useless if you hash only the password with it. It's trivial to build a lookup table like with md5, it just takes longer. S
by raverbashing 14y ago
Using bcrypt or scrypt or PBKDF2 is useless if you hash only the password with it.
It's trivial to build a lookup table like with md5, it just takes longer.
Salting is essential. I don't know why the parent was downvoted (probably because his salt is predictable?) so good salting is needed.
Example: WPA2 uses the SSID as the salt and PBKDF2 to derive the encryption key.
- daeken 14y agoThis is a million degrees of wrong. With bcrypt, scrypt, and PBKDF2, there is no "adding a salt". It's an inherent part of each algorithm. If you're "building" a salt, you're doing it wrong, period. > It's trivial to build a lookup table like with md5, it just takes longer. No, that's not true, because each one is initialized with a completely different public salt. You can't generate lookup tables for it, without covering the entire hash space.
- raverbashing 14y ago- there is no "adding a salt" Of course there is. As you said, it's an inherent part of the algorithm. But never put it beyond some people to use a trivial salt (or use the same one for all users) "because each one is initialized with a completely different public salt" If they follow the proper procedures, yes, building a lookup table is impossible.
- d4n3 14y agoThe actual output from the bcrypt library is: [salt]$[hash] You don't set the salt yourself, the library generates it from from a secure RNG. For someone that's not that into security, it's easy to use and hard to get wrong.
- raverbashing 14y agoThanks for clarifying Checking the python libraries they make it really easy to use, but you can provide your own salt if you want (you have to manually call 'gensalt' as well) So pretty safe if you copy their examples.