3 ms·
Actually, it's essentially PBKDF1, but that's close enough for non-cryptographers.
by cperciva 16y ago
Actually, it's essentially PBKDF1, but that's close enough for non-cryptographers.
- tptacek 16y agoShit, 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/pbkdf2.rb https://github.com/emerose/pbkdf2-ruby/blob/master/lib/pbkdf... I should stop saying PBKDF2 and just go back to saying PBKDF.
- cperciva 16y agoPBKDF2 also protects against entropy loss from repeated iteration, although that doesn't really matter unless you're using an unreasonably short hash.