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)
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.