The PBKDF2 (Password-based Key Derivation Function 2) SHA-256 algorithm is for generating Encryption Keys from a user’s Master Password. Before being sent to the Locker servers, the Master Password is encrypted with a random value created by using the user’s email address and the hashing technique, locally on the user’s device. When the Locker servers receive the encrypted Master Password, the password is encrypted again with a secure random value (generated by the Cryptographically Secure Pseudorandom Number Generator) and the hashing technique, and is subsequently stored in the Locker database.
The default number of iterations with the PBKDF2 algorithm is 100,001 on the user’s device, and then an additional 216,000 on the Locker’s servers (for a total of 316,001 iterations by default).
The PBKDF2 algorithm has 5 input parameters:
- : the user’s Master Password.
- : cryptographic salt. Locker uses the user’s email as the first salt.
- : number of iterations.
- : hash function with output of length .
- : length of output key.
Key is divided into blocks of maximum length . For each block ,
- Use the hash function with iterations with and as inputs. The first is the user’s email and the next s are the outputs of the previous hashing:
- Perform operation with all the outputs from step 1:
- Concatenate all the blocks into key :