News for hackers. Stuff that matters.
Re:Don't hash passwords? I say yes. Hash them And correctly by mseebach on Friday January 29, 2010 @09:39AM (#1086498)
In "olden times" (I guess around the fourth empire), common wisdom was to hash like this:

salt = getLongRandomString(); hash = sha256(salt+password); save_in_db = salt+"$"+hash

Thus, while you don't publish them, salts aren't "secret". That's based on the assumption that a cracker would have to bruteforce each password in turn, and that takes too much time.

But no, you can't re-hash with a new salt without access to the plain-text password. If you could, so could the bad guy :)

Disclaimer: IANAC, and if I were building security for mission critical stuff, I'd ask someone who was.

Re:Don't hash passwords? I say yes. Hash them And correctly by bengiuliano on Friday January 29, 2010 @10:49AM (#1086682)
But no, you can't re-hash with a new salt without access to the plain-text password. If you could, so could the bad guy :)

Yes you can, if you believe this: http://benlog.com/articles/2008/06/19/dont-hash-secrets/ This is exactly why HMAC is more complicated than just:

    hash(message+secret)
Re:Don't hash passwords? I say yes. Hash them And correctly by tptacek on Friday January 29, 2010 @12:05PM (#1086889)
It's H(k, m) that's trivial to break, not H(m, k) (where the attacker has no control over the final block of the hash). H(m, k) is also much weaker than HMAC, but in trickier ways.