Password & key derivation
Key Derivation
Derive cryptographic keys from passwords or shared secrets. Password-based KDFs — PBKDF2, scrypt and Argon2id — are deliberately slow and memory-hard to resist brute-force and GPU/ASIC attacks; tune iterations, memory and parallelism to your threat model, and always use a unique random salt per password.
Key-based KDFs derive subkeys from existing key material: HKDF (extract-and-expand) for protocol key schedules, SP 800-108 KBKDF, and the NIST SP 800-56C / ANSI X9.63 single-step KDFs for derivation after key agreement. Pair these with the shared secret from the Key Exchange tool.
Frequently asked questions
- Which KDF should I use for passwords?
- Prefer Argon2id where available; scrypt is a strong alternative, and PBKDF2 when you need FIPS or legacy compatibility — always with a high iteration count.
- Why do I need a salt?
- A unique random salt makes each derivation distinct, so identical passwords do not produce identical keys and precomputed rainbow-table attacks do not work.
- What is the difference between HKDF and PBKDF2?
- PBKDF2 is a slow password hash. HKDF is fast and meant for deriving keys from already-strong secrets (such as a Diffie–Hellman result), not from low-entropy passwords.
Configure
PBKDF2KDFPassword-based KDF (RFC 8018) — HMAC repeated over many iterations.
Algorithm
Inputs
Password
Salt