News for hackers. Stuff that matters.
Re:How To Safely Store A Password by tptacek on Tuesday December 14, 2010 @04:29PM (#2005797)
Shit, you're right. (PBKDF2 generates arbitrary-length output, which is what you want from a key derivation function, but maybe not something you care about for a password hash).

Here's a version that's much easier to read than the spec:

https://github.com/emerose/pbkdf2-ruby/blob/master/lib/pbkdf...

I should stop saying PBKDF2 and just go back to saying PBKDF.

Re:How To Safely Store A Password by cperciva on Tuesday December 14, 2010 @05:09PM (#2005929)
PBKDF2 also protects against entropy loss from repeated iteration, although that doesn't really matter unless you're using an unreasonably short hash.