News for hackers. Stuff that matters.
Re:How To Safely Store A Password by Fargren on Friday July 01, 2011 @08:59AM (#2718094)
I know very little about security, but is there something wrong with using a hash in the client side and then using bcrypt on the server so that you never receive the plain text password?
Re:How To Safely Store A Password by Someone on Friday July 01, 2011 @09:11AM (#2718139)
If the client sends hash(password) to the server, hash(password), for all intents and purposes, _is_ the password.

After all, an attacker does not need to recover the password from the hash, all he has to do is capture the hash and replay it.

Re:How To Safely Store A Password by eneveu on Friday July 01, 2011 @09:44AM (#2718275)
Re:How To Safely Store A Password by shazow on Friday July 01, 2011 @11:22AM (#2718684)
On the upside, it is an improvement for the use-the-same-password-on-many-services users, assuming the hash is not trivial to reverse like md5.

At this point, I'm less worried about somebody getting access to some random startup I signed up for than I am about them using the leaked password to gain access to my other accounts.

(I've recently changed my password scheme to using a different one for every service, but this just puts me within a minority.)

Re:How To Safely Store A Password by zepolen on Friday July 01, 2011 @02:06PM (#2719437)
I'm no crypto expert but wouldn't using a nonce allow this approach to work?
Re:How To Safely Store A Password by pavpanchekha on Friday July 01, 2011 @10:39PM (#2720879)
How would you check the nonce? All your server gets is a black box hash.
Re:How To Safely Store A Password by IgorPartola on Saturday July 02, 2011 @10:23AM (#2721644)
Not a security expert here.

Doesn't http://en.wikipedia.org/wiki/Digest_access_authentication do this? Also the server could store the nonce in a session.

Re:How To Safely Store A Password by barefoot on Friday July 01, 2011 @09:27AM (#2718210)
Hashing passwords on the client indicates that the salt is available to the client. In the event of a database compromise it's guaranteed then that the attacker will have the salt and be able to crack your passwords.

If the salt is stored on the server, in a login.php script for example, and there is (just) a database compromise then an attacker will be at a disadvantage because they will need to figure out the salt first before cracking any of the passwords.

In fact, this is something being ignored here quite a bit. A number of potential attacks only lead to the database - or part of it - being exposed. If you have a large enough salt stored in your unaffected code base then an attacker is going to have a hard time.

Re:How To Safely Store A Password by nlco on Friday July 01, 2011 @10:34AM (#2718471)
Salts are suppose to be considered public. For the most part, they are defenses against rainbow tables and to make an attacker have crack each password individually.
Re:How To Safely Store A Password by zagaberoo on Friday July 01, 2011 @12:09PM (#2718881)
Exactly; Having a secret hash is just another example of futile security through obscurity. You want an attacker to be able to know as many parts of the puzzle as possible and still be thwarted.
Re:How To Safely Store A Password by barefoot on Friday July 01, 2011 @09:08PM (#2720750)
Agreed, but an important part of the article was that even public salted md5 passwords are ineffective.
Re:How To Safely Store A Password by rgarcia on Friday July 01, 2011 @09:04AM (#2718115)
I'm no security expert either, but I'm guessing the real solution is SSL. If you hash passwords in javascript, a middleman could easily just look up the source of your application and decrypt the hashed password coming over the wire.
Re:How To Safely Store A Password by nokcha on Friday July 01, 2011 @10:05AM (#2718362)
>If you hash passwords in javascript, a middleman could easily just look up the source of your application and decrypt the hashed password coming over the wire.

Hashing ≠ Encryption.

Unlike encryption, where an encrypted message is intended to be decrypted by a trusted party, a hashed password is never intended to be 'unhashed'. Rather, the hash of the password supplied by the user is compared against the hash value stored in the database. Given a sufficiently strong password P, it should be computationally infeasible for anyone to compute the value of P from hash(P).

Re:How To Safely Store A Password by dpark on Friday July 01, 2011 @12:41PM (#2719027)
Of course, if you're doing the hashing on the client, there's no need to reverse the hash anyway. An attacker can just replay the hash they sniffed. You can do some additional things to avoid this (like using a nonce as part of the hash), but the best solution is still to just use SSL.
Re:How To Safely Store A Password by fleitz on Saturday July 02, 2011 @07:23AM (#2721479)
An attacker in that position could also capture the password coming over the wire. Both are of equal security in that situation. SSL is also middleman-able.