Hash Lab

Password hashing / KDF

PBKDF2

Password-Based Key Derivation Function 2, specified in PKCS #5 v2.1 (RSA Labs, 2000) and republished as RFC 8018 in 2017. PBKDF2 turns a password into a key by iterating an HMAC chain thousands or millions of times; the only cost lever is iteration count.

At a glance

OutputAny length
Cost parameteriteration count c
Internal primitiveHMAC over a base hash (SHA-256 / SHA-512)
Memory costNone , trivially parallelizable on GPUs
StandardRFC 8018 (PKCS #5 v2.1)
StatusAcceptable for legacy; prefer Argon2id / scrypt for new designs

Recommended iteration counts (2026)

Calibrate so an interactive login takes 100–500 ms on real hardware.

Where it is used

Why it’s no longer the first choice

No memory cost. A modern GPU can attempt millions of PBKDF2-HMAC-SHA-256 candidates per second per device. Memory-hard alternatives like Argon2id force the attacker to commit RAM per candidate, flattening the GPU advantage.

Try it

The KDF Lab includes PBKDF2 with HMAC-SHA-256 or HMAC-SHA-512 selectable and an iteration-count slider.

References

Generate

Run pbkdf2 on your input

16 bytes

600,000

Quick quiz

Test yourself on pbkdf2

10 multiple-choice questions. Pick an answer for each, then submit to see explanations.

  1. Q1.What does PBKDF2 stand for?

  2. Q2.RFC:

  3. Q3.Only cost lever in PBKDF2:

  4. Q4.Internal primitive:

  5. Q5.OWASP 2023 floor for PBKDF2-HMAC-SHA-256:

  6. Q6.WPA2-PSK uses PBKDF2 with:

  7. Q7.Is PBKDF2 memory-hard?

  8. Q8.Migration path from PBKDF2:

  9. Q9.Year PKCS #5 v2.1 (RFC 8018) published:

  10. Q10.Which Wikipedia category?

0 of 10 answered