in cryptography, a key derivation function (kdf) makes a long secret key (which is called a "hash") from a secret phrase, like a password. the output of a key derivation function will look common to another result made from a random phrase. they are also used to re-use secret keys in a specific format, like using a shared secret key from the diffie–hellman key exchange for sending secrets in aes.