What is PBKDF2 key derivation?
PBKDF2 applies HMAC repeatedly to derive key bytes from a passphrase and salt. AES-128 uses 16 bytes, AES-192 uses 24 bytes, and AES-256 uses 32 bytes. Hex and Base64 encode the same derived bytes for copying.
How to derive an AES key from a password
- Enter a passphrase and choose the HMAC algorithm and iteration count.
- Use the generated salt for a new key, or enter the original salt and its encoding to reproduce a key.
- Choose the AES key size, derive the key, and copy either Hex or Base64.
- In the AES tool, set the matching key size and key encoding, then paste the key into the secret key field.
PBKDF2 with SHA-256 or SHA-512
SHA-256 and SHA-512 select the hash used by HMAC. Either can derive any of the three AES key sizes. For interoperability, match the algorithm and iteration count used by the other application.
Reproduce a derived key
Keep the salt bytes, HMAC algorithm, iteration count, and key size with your encryption metadata. This tool encodes passwords as UTF-8 and preserves spaces and Unicode spelling as entered. Check the password bytes and salt encoding if another implementation gives a different result.
Protect your key
Use a strong passphrase and a fresh random salt for each new derivation. Treat the derived key like a secret and keep it out of logs, messages, and shared documents. Use the timing result to evaluate iteration settings on your target devices.
The DevGlan AES tool processes encryption requests on the server. Use the key in your own local application if it needs to stay on your device.
Frequently asked questions
Does the salt need to be secret?
You can store the salt alongside the ciphertext. Keep the passphrase and derived key private.
Can I reverse PBKDF2 to recover the passphrase?
PBKDF2 is one-way. Someone with the key and settings can still test passphrase guesses, so use a strong passphrase.
How many iterations should I use?
The tool starts at 600,000 for SHA-256 and 220,000 for SHA-512. For new keys, choose a cost your target devices can tolerate. To reproduce a key, use its exact original count.
Where can I generate or verify password hashes?
Use the PBKDF2 Hash Generator for password storage and verification.
❤️ Liked this tool?
If it saved you time, consider buying me a coffee to support future improvements.