Skip to content

scrypt and PBKDF2

Derive a key from a password with scrypt or PBKDF2-HMAC, choosing the salt, cost and length.

scrypt with N = 2^14, r = 8, p = 1 needs about 16 MiB of memory.

About this tool

A key derivation function stretches a password into a key of the length you need, and makes each guess slow. PBKDF2 (RFC 8018) repeats an HMAC many times. scrypt (RFC 7914) also uses a large block of memory, which makes it harder to attack with custom hardware.

Choose the password, salt (as text, hex or Base64), cost parameters and key length, and get the derived key. PBKDF2 defaults to 600,000 iterations of HMAC-SHA256, the OWASP recommendation.

Questions

What do scrypt’s N, r and p do?
N is the cost and must be a power of two, r sets the block size and p the parallelism. Memory use is about 128 × N × r bytes, so N = 2^14 with r = 8 uses 16 MiB.
Do I need a salt?
Yes. A unique random salt per password stops attackers from cracking many passwords at once with precomputed tables. It does not need to be secret.
Is my input sent to a server?
No. The page loads a compiled Dart engine into a Web Worker and does all the work in your browser tab. Nothing you type or drop in is uploaded, and the tools keep working offline once the page has loaded.

More tools