Check scrypt Password
Verify a plaintext password against a scrypt hash. Supports $s0$, $scrypt$ MCF, and raw formats with full client-side scrypt KDF computation.
About
The scrypt key derivation function, designed by Colin Percival in 2009, is deliberately memory-hard. Unlike bcrypt or PBKDF2, scrypt forces attackers to allocate large blocks of RAM proportional to the cost parameter N, making GPU and ASIC-based brute-force attacks economically impractical. A misconfigured N (below 214) or a weak salt leaves your stored credentials vulnerable to offline dictionary attacks. This tool parses the hash string, extracts parameters N, r, p, and salt, then re-derives the key from your plaintext input entirely in the browser. No data leaves your machine.
Supported formats include Colin Percival's original $s0$ encoding, the Modular Crypt Format $scrypt$ variant, and raw parameter specifications with hex or base64 salt and hash. The tool approximates memory usage as 128 Γ N Γ r bytes. For N = 214 and r = 8, that is 16 MB of working memory per hash computation. High values of N (above 220) may cause browser tab crashes on low-memory devices.
Formulas
The scrypt function derives a key from a password and salt through a chain of three sub-algorithms. The top-level call is:
Where P = password bytes, S = salt bytes, N = CPU/memory cost (must be a power of 2), r = block size, p = parallelization factor, dkLen = desired key length in bytes.
Step 1: Generate an initial block array B via PBKDF2:
Step 2: For each parallelism lane i from 0 to p β 1, apply the memory-hard ROMix to a 128r-byte block:
ROMix builds an array V of N snapshots, each 128r bytes, then performs N random lookups into V using BlockMix. This forces 128 Γ N Γ r bytes of memory allocation.
Step 3: Derive the final key from the mixed blocks:
Verification succeeds when the derived DK equals the stored hash bytes in constant-time comparison.
Reference Data
| Parameter | Symbol | Typical Range | Default (Percival 2009) | OWASP 2023 Minimum | Effect |
|---|---|---|---|---|---|
| CPU/Memory Cost | N | 214 - 220 | 214 (16384) | 217 (131072) | Memory usage & iterations; must be power of 2 |
| Block Size | r | 1 - 16 | 8 | 8 | Increases sequential memory access per block |
| Parallelism | p | 1 - 16 | 1 | 1 | Independent mixing lanes (multiplies CPU time) |
| Salt Length | - | 16 - 32 bytes | 32 bytes | 16 bytes min | Prevents rainbow table attacks |
| Derived Key Length | dkLen | 32 - 64 bytes | 32 bytes | 32 bytes | Output hash length |
| Memory per hash (N=214, r=8) | - | - | 16 MB | - | RAM allocated during computation |
| Memory per hash (N=217, r=8) | - | - | 128 MB | - | RAM allocated during computation |
| Memory per hash (N=220, r=8) | - | - | 1 GB | - | May crash browser tabs |
| Hash Format: $s0$ | - | $s0$PARAMS$SALT_BASE64$HASH_BASE64 - Percivalβs original encoding. PARAMS is hex-encoded log2(N), r, p. | |||
| Hash Format: $scrypt$ (MCF) | - | $scrypt$ln=LOGN,r=R,p=P$SALT_BASE64$HASH_BASE64 - Modular Crypt Format variant. | |||
| Hash Format: Raw | - | Manual entry: N, r, p, salt (hex/base64), hash (hex/base64). No standard string. | |||
| Underlying PRF | - | PBKDF2-HMAC-SHA-256 with c = 1 iteration | |||
| Core Mixing | - | Salsa20/8 applied inside BlockMix / ROMix | |||