PBKDF2 Cost Estimator
Choose your hardware tier and target hash time to get OWASP-aligned PBKDF2 iteration count recommendations for SHA-256 and SHA-512.
Use the PBKDF2 Cost Estimator
PBKDF2 Parameters
OWASP recommends ~600ms for interactive logins.
Recommended Iteration Count
Code Snippet
Attacker Cost Context
A GPU (RTX 4090) can attempt ~3.5B MD5 hashes/second. Against PBKDF2-SHA256 it is limited to roughly:
Each doubling of iterations halves attacker throughput. A 10-character random password with 600k iterations gives an attacker roughly 500+ years on a single GPU.
Summary
PBKDF2 (Password-Based Key Derivation Function 2) is a widely-deployed algorithm for hashing passwords and deriving cryptographic keys. Choosing the right iteration count is critical: too low leaves users vulnerable to brute-force attacks, too high causes unacceptable latency. This tool uses OWASP minimum baselines, typical hardware benchmarks, and your target hash time to recommend a safe iteration count for PBKDF2-HMAC-SHA256 and PBKDF2-HMAC-SHA512.
How it works
- Select your server hardware tier (low-end VPS, mid-range server, or high-end dedicated).
- Enter your target hash time in milliseconds — OWASP recommends 600ms for interactive logins.
- Choose the HMAC variant: SHA-256 (faster, 256-bit output) or SHA-512 (slower per iteration, 512-bit output).
- The estimator multiplies the hardware baseline speed (iterations/second) by your target time to get a recommended iteration count.
- Review the OWASP minimum floor — the tool always returns at least that floor even if your hardware is very fast.
- Use the recommended count in your server-side hashing code; never run PBKDF2 in the browser for real password storage.
Use cases
- Tune PBKDF2 parameters when setting up a new authentication service.
- Verify that legacy iteration counts still meet current OWASP minimums.
- Compare SHA-256 vs SHA-512 costs on your specific hardware tier.
- Generate code snippets for Node.js, Python, and PHP implementations.
- Estimate login latency impact before deploying a parameter change.
- Teach developers why iteration count choice matters for password security.