5. Key Derivation Functions
5. Key Derivation Functions
A key derivation function produces a derived key from a base key and other parameters. In a password-based key derivation function, the base key is a password, and the other parameters are a salt value and an iteration count, as outlined in Section 3.
The primary application of the password-based key derivation functions defined here is in the encryption schemes in Section 6 and the message authentication scheme in Section 7. Other applications are certainly possible, hence the independent definition of these functions.
Two functions are specified in this section: PBKDF1 and PBKDF2. PBKDF2 is recommended for new applications; PBKDF1 is included only for compatibility with existing applications and is not recommended for new applications.
A typical application of the key derivation functions defined here might include the following steps:
-
Select a salt S and an iteration count c, as outlined in Section 4.
-
Select a length in octets for the derived key, dkLen.
-
Apply the key derivation function to the password, the salt, the iteration count and the key length to produce a derived key.
-
Output the derived key.
Any number of keys may be derived from a password by varying the salt, as described in Section 3.