Key Derivation Lab
Derive keys with PBKDF2, scrypt, Argon2id and HKDF; compare costs with OWASP advice.
Try an example: OWASP defaults: PBKDF2-SHA-256, scrypt, Argon2id, HKDF · RFC 7914 scrypt test vector (N = 1024, r = 8, p = 16) · PBKDF2 with too few iterations (RFC 7914 §11 vector)
How it works
Derives keys from a password and salt with PBKDF2 (SHA-1/256/512), scrypt, Argon2id and HKDF using the parameters you choose, and compares their memory and work settings with the OWASP Password Storage recommendations. With JavaScript on, PBKDF2, HKDF and scrypt run locally in your browser and show real timings.
- PBKDF2 (RFC 8018) repeats HMAC with the chosen hash; its cost is the iteration count and it needs almost no memory, so GPUs attack it efficiently.
- scrypt (RFC 7914) needs about 128 × N × r bytes of memory per derivation, which makes large-scale guessing expensive. Argon2id (RFC 9106, winner of the Password Hashing Competition) is configured by memory m, passes t and lanes p; OWASP recommends it first.
- HKDF (RFC 5869) extracts and expands keys from input that is already random (for example a Diffie–Hellman secret); it is fast and must not be used to hash passwords.
- "Meets OWASP" compares your parameters with the minimums of the OWASP Password Storage Cheat Sheet (Argon2id m/t combinations; scrypt N×r ≥ 2^17×8; PBKDF2 1,300,000 / 600,000 / 210,000 iterations for SHA-1 / SHA-256 / SHA-512).
- Server and API results contain no timings, so the same input always gives the same result. With JavaScript on, the page derives PBKDF2 and HKDF with WebCrypto and scrypt with a built-in JavaScript implementation in your browser and shows how long each took on your device. Argon2 is not available in browsers, so it needs the server (you are asked first).
Never reuse the example salts. For real password storage use a maintained library that encodes parameters and salt (e.g. the PHC string format).
Sources
For scripts and AI agents
- JSON API:
POST https://keyderivationlab.usefulweb.site/api/v1/calculate(same calculation as this page) - Interface description: OpenAPI 3.1 · AI guide: llms.txt
- MCP server (Streamable HTTP):
https://keyderivationlab.usefulweb.site/mcp· tool namekey_derivation_lab
Example request
curl -s -X POST https://keyderivationlab.usefulweb.site/api/v1/calculate \
-H 'content-type: application/json' \
-d '{"password":"correct horse battery staple","salt":"c2FsdHNhbHRzYWx0c2FsdA==","saltFormat":"base64"}'Related tools
- Hash & HMAC Calculator – MD5, SHA-2, SHA-3, BLAKE2, CRC32 and HMAC of text or files, with checksum compare.
- Local File Encryption Studio – Encrypt and decrypt files with AES-256-GCM and a password, locally in your browser.
- Password & Passphrase Generator – Strong random passwords and passphrases, made in your browser, with exact entropy.