What is a key derivation function?
A Key Derivation Function (KDF) is a function that derives a secret key of the desired bit length from some other secret material, such as a password, a passphrase, another shared secret, or a combination of asymmetric private and public keys. That other secret material is also called Input Key Material (IKM), while the secret key produced is also called Output Key Material (OKM). IKM and OKM often have different lengths. A KDF typically uses a cryptographic hash function or block cipher operations under the hood.
A Password-Based Key Derivation Function (PBKDF) is a KDF designed to produce secret keys from low-entropy IKMs, such as passwords. Those secret keys can be used as symmetric encryption keys. Another popular application of PBKDFs is password hashing. PBKDFs provide more brute-force-resistant password hashing than cryptographic hash functions alone.
Some key derivation functions are used for key exchange in secure network protocols...