Skip to main content

6.2.2. PBES2 Decryption Operation

6.2.2. PBES2 Decryption Operation

The decryption operation for PBES2 consists of the following steps, which decrypt a ciphertext C under a password P to recover a message M:

  1. Obtain the salt S for the operation.

  2. Obtain the iteration count c for the key derivation function.

  3. Obtain the key length in octets, dkLen, for the derived key for the underlying encryption scheme.

  4. Apply the selected key derivation function to the password P, the salt S, and the iteration count c to produce a derived key DK of length dkLen octets:

    DK = KDF (P, S, c, dkLen)
  5. Decrypt the ciphertext C with the underlying encryption scheme under the derived key DK to recover a message M. If the decryption function outputs "decryption error", then output "decryption error" and stop.

  6. Output the recovered message M.