VeraCrypt

Documentation >> Key Derivation Algorithms >> PBKDF2

PBKDF2

PBKDF2 (Password-Based Key Derivation Function 2) is a widely used KDF that applies a pseudorandom function (HMAC) repeatedly to slow down password guessing. In VeraCrypt, PBKDF2 is available with several HMAC hash functions and is used to derive the keys that decrypt a volume header.

PBKDF2-HMAC Variants Supported in VeraCrypt

Parameters in VeraCrypt

Salt

A 512-bit random salt (stored in the volume header) is mixed into the password to prevent precomputation and rainbow-table attacks.

Iteration Count

The number of PBKDF2 iterations depends on the selected HMAC hash, the context (e.g., system vs. non-system encryption), and the PIM value. Increasing PIM increases the iteration count and thus the time required to derive keys. For exact values and formulas, see Header Key Derivation, Salt, and Iteration Count.

Output Length

The derived key length depends on the selected encryption algorithm(s) (e.g., 256 bits for AES-256, 768 bits for AES-Twofish-Serpent cascades).

Advantages and Considerations

Related Topics