Skip to main content

Timeline for Hashing passwords

Current License: CC BY-SA 3.0

9 events
when toggle format what by license comment
Nov 4, 2015 at 8:19 history edited otus CC BY-SA 3.0
edited body
Nov 4, 2015 at 8:15 comment added otus @CodesInChaos, AFAICT, it is sufficient for PBKDF2 that HMAC is PRF. That means e.g. that the XORs are independent. The implementation complexity is a valid point, but bcrypt et al. are much more complex. You usually need to trust the cryptographic library to get much more complex things right.
Nov 4, 2015 at 8:08 history edited otus CC BY-SA 3.0
added 376 characters in body
Nov 4, 2015 at 8:05 comment added CodesInChaos As far as I can tell, PBKDF1 only relies on collision resistance (to a small degree) and first-pre-image resistance, which are standard properties. PBKDF2 uses the password as key, which is clearly not something HMAC has been designed for. It adds those weird xor-s, which can interfere with the feed-forward of the underlying hash (it does not for the common ones, because they use addition for the feed-forward), which means that you can't consider the hash as a black-box. On top of that PBKDF2 is hard to implement and most implementations are several times slower than they need to be.
Nov 4, 2015 at 8:02 comment added otus @CodesInChaos, personally I think it's the other way around. PBKDF1 also relies on nonstandard properties of the hash function, but PBKDF2 uses HMAC which at least has proofs. However, your point that it is approximately PBKDF1 is correct, and I should fix the answer.
Nov 4, 2015 at 7:44 comment added CodesInChaos 1) The second suggestion if PBKDF1. 2) I prefer PBKDF1 over PBKDF2 as long as the underlying hash is wide enough (256 bits is plenty). The only concern I have is the lack of domain separation, but that doesn't matter for fixed size salts. 3) PBKDF2 abuses the underlying hash so much, that proving its security will be harder than proving the security of PBKDF1.
Sep 14, 2014 at 17:10 comment added pitoko Thanks, it seems that this function (PBKDF2) does what I need. $10^9$ was my typo (meant to be $10^6$).
Sep 14, 2014 at 16:58 history edited otus CC BY-SA 3.0
better link
Sep 14, 2014 at 16:41 history answered otus CC BY-SA 3.0