PBKDF2
PBKDF2 is a method for turning a password into a cryptographic key or a securely stored password hash. It works by repeatedly applying a pseudorandom function to the password combined with a random value called a salt, which makes it much harder for attackers to guess passwords using precomputed tables or dictionary lists. It is widely used to protect stored passwords.
PBKDF2 (Password-Based Key Derivation Function 2) is a password-based key derivation function specified in RFC 2898 (PKCS #5). It derives a key from a password by applying a pseudorandom function (commonly HMAC) to the password together with a salt over a number of iterations; the length of the derived key is essentially unbounded per the specification. The salt and iteration count are intended to increase resistance to dictionary attacks and rainbow table (precomputed hash) attacks. In practice it is used both for deriving cryptographic keys from passwords and for storing password verifiers. Note that PBKDF2's security depends heavily on configuration, particularly the iteration count and the choice of underlying pseudorandom function; specific parameter recommendations are out of scope for this evidence.
Why it matters
PBKDF2 addresses a foundational problem in identity systems: storing passwords in a way that resists attack if the password store is compromised. A plain or unsalted hash of a password can be reversed at scale using precomputed lookup tables (rainbow tables) or dictionary lists. By combining the password with a random salt and applying a pseudorandom function over many iterations, PBKDF2 forces an attacker to expend meaningful computational effort per password guess and defeats precomputation, since each stored verifier is individualized by its salt. This makes it a widely adopted mechanism for protecting stored password verifiers and for deriving keys from passwords.
Because it is specified in RFC 2898 (PKCS #5) and has been available for a long time, PBKDF2 is broadly supported across cryptographic libraries, platforms, and compliance regimes, which is a large part of its continued relevance. Organizations that need an interoperable, standardized, and well-understood password-hashing option frequently encounter PBKDF2 as a default or approved choice.
Its protective value is not automatic, however. PBKDF2's security depends heavily on configuration, particularly the iteration count and the choice of underlying pseudorandom function. An implementation using a low iteration count offers substantially weaker resistance to offline guessing than one tuned appropriately for current hardware. Teams that treat PBKDF2 as a set-and-forget primitive rather than a parameterized function that must be reviewed over time may find their stored verifiers weaker than assumed. Specific parameter recommendations are out of scope for this entry.
Who it's relevant to
Inside PBKDF2
Common questions
Answers to the questions practitioners most commonly ask about PBKDF2.
