It seems to me that anything that was sufficiently good as a KDF would work just fine as a password hash, though the reverse might not be true. Are there considerations specific to password-hashing that don't apply to KDFs?

To clarify: This is about key-stretching KDFs. Not the kind for diversifying keys (eg. HKDF)

  • 1
    $\begingroup$ There are two kinds of KDF, the slow, strengthening kind fed by a password(e.g. PBKDF2), and a fast one that only derives secondary keys from a master key(e.g. HMAC). The second one obviously shouldn't be used for password hashing. $\endgroup$ – CodesInChaos Oct 11 '12 at 21:42
  • $\begingroup$ Right, I knew that actually. I clarified the question. $\endgroup$ – Jason Oct 11 '12 at 22:30

KDF must produce results that have certain randomness properties, and be very difficult to reverse. Password hashes only need to satisfy the property "difficult to reverse", without randomness requirements. This is why all KDFs work as password hashes but not the other way around.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.