kdf
A key derivation function (KDF) is a cryptographic primitive used to derive secret keys from a secret value such as a password, a master key, or a shared secret. A KDF is designed to be deterministic, producing a key of a specified length, while incorporating random-looking input like a salt and, often, a computational cost parameter to slow down brute-force attacks.
There are two broad categories. Password-based KDFs, such as PBKDF2, scrypt, and Argon2, aim to convert a
How it works: a KDF takes as input a secret (password or key material), a salt, and
Security considerations: parameter choice is important; use strong, unique salts, sufficiently large iteration counts for passwords,
Standards and usage: PBKDF2 (RFC 8018), scrypt, Argon2, and HKDF (RFC 5869) are widely used. KDFs underpin