News for hackers. Stuff that matters.
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.