Derive cryptographic keys from passwords

Derive a cryptographic key from a password with PBKDF2.

freeworks offlinenothing uploaded
ToolPBKDF2 Key Derivation
Input
Output
Put this on your own site

The frame below runs the same code as this page, in the reader's own browser. Nothing is sent to us, and nothing is sent to you.

Pick a dark background and the text and panels follow it, so the frame stays readable on a dark page.

Preview

How it works

PBKDF2 applies a pseudorandom function to a password, salt, block counter, and iteration count, XORing each repeated output into a derived block. Blocks are concatenated and truncated to the requested key length.

  • A random salt separates equal passwords while iterations raise offline cost.

Worked example

Derive Key
Derive a 256-bit key from a password and salt using PBKDF2
Input
											Input: MyPassword123
Salt: random-salt-value
										
Output
												e2149a2848050420eb689215a0cdc6b46805389a0771d93c1724d81552700fbf
											

When to use this

Password-based encryption, legacy file formats, and iteration upgrades derive keys with PBKDF2.

Edge cases

  • Reusing a salt makes equal passwords comparable.
  • Changing the iteration count changes the derived key.
  • A short password remains weak despite many iterations.

References