News for hackers. Stuff that matters.
Re:Md5crypt is no longer strong enough by darklajid on Thursday June 07, 2012 @08:44AM (#4078684)
How many web login forms (as an example) are doing client side hashing? The only ones I know are of the recent 'test your password in the linkedin leak' variety.

How do you degrade for NoScript users?

And where's the harm in that anyway (assuming TLS)?

Re:Md5crypt is no longer strong enough by michaelmior on Thursday June 07, 2012 @09:24AM (#4078867)
Graceful degradation is pretty easy. Override the form submit handler to hash the password, set a flag that the password is hashed, empty the original password, and submit the form. Users with JS blocked will just submit the unhashed password as usual.

Of course, if you're salting the hash uniquely for each user, then this approach isn't very helpful.

Finally, if your server will accept hashed passwords, then getting the hash is as good as getting the password for access to your site. The only benefit is that the password is hidden so you may avoid compromising security on other sites.

Re:Md5crypt is no longer strong enough by edoloughlin on Thursday June 07, 2012 @01:23PM (#4080177)
> Of course, if you're salting the hash uniquely for each user, then this approach isn't very helpful.

I've seen this advised a lot. However, where are you going to put the per-user salt? I presume in your users table, or somewhere in your db. Does this not mean that the salts are just as likely to be hacked as the encrypted passwords?

Are you not better off with either a single salt that's stored somewhere outside your db or with some other scheme for algorithmically picking a salt based on the user id?

Re:Md5crypt is no longer strong enough by sveiss on Thursday June 07, 2012 @02:18PM (#4080497)
Salts aren't meant to be secret (or rather, no more secret than the password hashes themselves). The goal is to prevent a precomputed brute force attack.

If you store straight unsalted hashes, you can precompute the hash for every likely password, store the precomputed hash -> password mappings in a nice efficient data structure (http://en.wikipedia.org/wiki/Rainbow_table) and use the same precomputed tables to reverse every hash in the system with a very fast lookup. And every other system using the same unsalted hash scheme.

If you have a salt, this doesn't work -- you'd need a set of precomputed tables for each salt value, which rather defeats the object of precomputation.

If you take it a step further, and use a storage scheme like bcrypt or PBKDF2, not only are you protected from the precomputation attacks, but testing each password candidate takes much longer than a straight cryptographic hash -- so brute force attacks becomes much slower, too.

Re:Md5crypt is no longer strong enough by mikeash on Thursday June 07, 2012 @05:52PM (#4081548)
To put it differently, hashing without salting lets an attacker crack the entire database at once. Try a password, see if the hash is in the database, repeat.

With salts, the attacker can only attack a single user at a time. Try a password with one user's salt, see if the hash is in the database, try the next user's salt, see if that hash is in the database, repeat.

Salts don't need to be secret to work.

Re:Md5crypt is no longer strong enough by michaelmior on Thursday June 07, 2012 @02:27PM (#4080538)
My point was that sending the hash the server doesn't work if the hash is salted per user since you don't know what the salt is. (I suppose you asynchronously fetch the salt value after the user puts in a username, but at the solution as a whole starts to fall apart.)