PBKDF2
PBKDF2 (Password-Based Key Derivation Function 2) turns a password into a cryptographic key by repeatedly hashing it, so that guessing the password by brute force takes deliberately longer.
A password is not a good encryption key on its own: it's usually short, guessable, and much smaller than the 256 bits a cipher like AES-256 needs. A key derivation function (KDF) solves this by turning a password into a fixed-size key, and — critically — by making that process deliberately slow.
PBKDF2 does this by applying a hash function (commonly HMAC-SHA256) to the password thousands or hundreds of thousands of times in a row ('iterations'), combined with a salt to prevent precomputed lookup-table attacks. Each iteration adds computational cost, so an attacker trying to guess a password by brute force has to redo all of those iterations for every guess. OWASP's current recommendation for PBKDF2-HMAC-SHA256 is at least 600,000 iterations.
V4ult uses PBKDF2-HMAC-SHA256 with 600,000 iterations (salted with the user's email) to derive the key that wraps the vault's symmetric key from the master password — this is the derivation that actually protects the vault's encryption. Separately, V4ult also runs the master password through a second PBKDF2 pass with only 1 iteration to produce a Master Password Hash, which is sent to the server purely to authenticate the session; that 1-iteration hash is not what secures the vault's contents, the 600,000-iteration one is.
Advantages
- Makes brute-force password guessing computationally expensive
- Widely implemented and audited across cryptographic libraries
- Iteration count can be increased over time as hardware gets faster
Related
Frequently asked questions
What is PBKDF2?
A key derivation function that turns a password into a cryptographic key by hashing it repeatedly (with a salt), making brute-force guessing deliberately slow.
Why does the number of iterations matter?
Each iteration adds computational cost for every password guess. OWASP currently recommends at least 600,000 iterations for PBKDF2-HMAC-SHA256.
How many PBKDF2 iterations does V4ult use?
600,000 iterations of PBKDF2-HMAC-SHA256 to derive the key that protects the vault's contents. A separate, 1-iteration PBKDF2 pass produces a Master Password Hash used only to authenticate with the server — it is not what secures the vault's encryption.