Scrypt Hash Generator & Verifier
Memory-hard password hashing with configurable CPU and memory cost parameters. More resistant to GPU attacks than bcrypt.
Scrypt Hash
Enter a password and click Generate to create a scrypt hash
Enter a password and hash to verify
Interactive: fast, low memory (~16 MB). Sensitive: slower, more memory (~128 MB).
Other Hash Algorithms
What is Scrypt?
Scrypt is a password-based key derivation function designed by Colin Percival in 2009. It is specifically engineered to be memory-hard, making it extremely expensive to perform large-scale brute-force attacks using ASICs, GPUs, or FPGAs.
Unlike bcrypt which is only CPU-hard, scrypt requires large amounts of RAM proportional to its cost parameter. This means attackers cannot simply throw more processing cores at the problem — they also need proportionally more memory, which is expensive in parallel hardware.
How Scrypt Works
Scrypt works in three phases: (1) uses PBKDF2-HMAC-SHA256 to generate an initial key, (2) fills a large memory array using the ROMix algorithm with Salsa20/8 core, then (3) performs memory-dependent lookups that force sequential access to the array. The memory requirement is approximately 128 × N × r bytes.
Type
Password KDF
Year
2009
Status
✓ Secure
Common Use Cases
- Password hashing and storage
- Litecoin and cryptocurrency mining
- Key derivation for encryption
- Tarsnap online backup service
- Django password storage backend
- libsodium password hashing
Security Considerations
Scrypt's memory-hardness makes it significantly more resistant to hardware-based attacks than bcrypt or PBKDF2. However, Argon2 (the Password Hashing Competition winner) improves upon scrypt by offering better resistance to time-memory trade-off attacks and GPU parallelism. For new projects, consider Argon2 as the first choice, with scrypt as a strong alternative.
Scrypt vs Other Password Hashing Functions
| Feature | Scrypt | Bcrypt | Argon2 |
|---|---|---|---|
| Memory-hard | ✓ Yes | ✗ No | ✓ Yes |
| GPU resistant | Strong | Moderate | Strong |
| TMTO resistance | Moderate | N/A | Strong |
| Year | 2009 | 1999 | 2015 |
| PHC winner | ✗ No | ✗ No | ✓ Yes |