by samd · 13y ago · 0 comments
tl;dr
Use bcrypt.
For example, PBKDF2 does require a salt (as does scrypt, which relies on PBKDF2 for its implementation). It also comes with specific recommendations on the salt's minimum length. Salting an MD5 hash is pointless in the face of modern attack methods -- rice paper against a tiger.
What you want is functions that run slowly, thus increasing attack cost.
Like a broken record people like him/her chant "no security at all is better than security by obscurity".
If its an internal app use LDAP, Active Directory, or whatever other centralized ID system your company has. If it's a public app then consider using a federated approach like OpenID. It doesn't make sense for everything but if you can avoid storing passwords entirely then it's one less thing that can go wrong[1].
Course if you do store them then yes:
scrypt > bcrypt > PBKDF2 > ... If you get to here then you've got a problem!
Just make sure you choose a same number of rounds. PBDKF2 is fine for most folks if you have a large enough number of rounds. The old recommended default of 1K is not large enough. Ditto for bcrypt with a work factor less than 10 (or better yet 12). Your bet bet is to either use scrypt (who's defaults are paranoid enough) or choose a work factor for bcrypt/PBKDF2 that's has a decent CPU time (say .5 to 1s).
[1]: Though you do have to worry about the risk of compromise of the party your delegating too. For apps where this makes sense (say Google+ login to a Grouppn knockoff) that's a fair enough trade off for you an your users.
I did a little bit of research and I found the Secure Remote Password protocol [1]. Interestingly, this protocol does appear to protect against the case of a stolen password database. If true, that would mean that when site X loses control of the password database, that would be OK as this is designed to be secure against that attack.
I wonder why it's not been implemented anywhere widely. Anyone more knowledgeable about the security field care to comment.
[1] - http://en.wikipedia.org/wiki/Secure_Remote_Password_protocol
With Persona at least I know which email I use to sign up for random websites. I hope it succeeds.
You need to be using real KDFs to store passwords. Salted hashes are not real KDFs.
When it comes to picking passwords that humans can remember, what's your opinion on Diceware? Do five or six word passwords still stand up with the increases in computational power? http://world.std.com/~reinhold/diceware.html
I suspect your process should use the wrench on lower wear items than computers, for example the desk (if plastic or wood) and things sitting around it.