IntelligenceAlgorithmsscrypt
scrypt
A memory-hard password-based key derivation function by Colin Percival, specified in RFC 7914. It is used in Ethereum keystore files, password storage and the Litecoin proof of work. Grover's search would roughly halve its effective security, so 256-bit outputs stay adequate.
In short
What a quantum computer changes.
- Quantum effect
- Weakened by Grover's search
- Family
- SymmetricRests on memory-hard function.
- What it means
- Grover's algorithm searches an unstructured space in roughly the square root of the usual number of steps. Against a symmetric key or a hash preimage, that roughly halves the effective security in bits: a 128-bit key gives about 64 bits of security against it. In practice the answer is size, not replacement. Keys and outputs of 256 bits stay adequate. Grover's search also needs a long, sequential run on a fault-tolerant machine and does not split well across many machines, so the effect is a smaller margin, not a break.
This describes the family, not any project that uses it.
26 in the catalogue
Packages that provide it
| Package | Provides |
|---|---|
| @noble/hashesnpm | Pure TypeScript hash, MAC and KDF library: SHA-1, SHA-2, SHA-3 and Keccak, BLAKE2 and BLAKE3, RIPEMD-160, HMAC, HKDF, PBKDF2, scrypt and Argon2. |
| hash-wasmnpm | Hash and password-hashing functions compiled to WebAssembly, including SHA-1, SHA-2, SHA-3, Keccak, BLAKE2, BLAKE3, RIPEMD-160, HMAC, PBKDF2, scrypt, bcrypt and Argon2. |
| scrypt-jsnpm | Pure JavaScript scrypt password-based key derivation with synchronous and cancellable asynchronous APIs. |
| libsodium-wrappers-sumonpm | The sumo build of libsodium.js: everything in libsodium-wrappers plus scrypt password hashing and lower-level functions. |
| sodium-nativenpm | Low-level native Node.js bindings to libsodium: X25519, Ed25519, XSalsa20-Poly1305 and ChaCha20-Poly1305 encryption, BLAKE2b, SHA-2, HMAC, Argon2 and scrypt, plus a PBKDF2-SHA512 extension. |
| ethersnpm | Ethereum library with secp256k1 signing, recovery and ECDH, Keccak-256, SHA-2, RIPEMD-160, HMAC, PBKDF2 and scrypt helpers, BIP-39 and BIP-32 wallets, and encrypted JSON keystores. |
| @ethersproject/json-walletsnpm | The ethers v5 sub-package that encrypts and decrypts Ethereum keystore and crowdsale JSON wallets with scrypt or PBKDF2, AES and a Keccak-256 MAC. |
| web3npm | Ethereum JavaScript API whose accounts module signs with secp256k1, hashes with Keccak-256 and encrypts V3 keystores with scrypt or PBKDF2 and AES-128-CTR. |
| web3-eth-accountsnpm | The web3.js accounts package: secp256k1 signing and recovery, Keccak-256 message hashing, and V3 keystores encrypted with scrypt or PBKDF2 and AES-128-CTR. |
| ethereum-cryptographynpm | Collection of the primitives Ethereum uses: secp256k1, BN254 and BLS12-381 curves, Keccak, SHA-2, RIPEMD-160, BLAKE2b, PBKDF2, scrypt, AES, BIP-32, BIP-39 and random bytes. |
| @ethereumjs/walletnpm | EthereumJS wallet utilities for secp256k1 key creation, BIP-32 HD keys and V3 keystores encrypted with scrypt or PBKDF2 and AES. |
| ethereumjs-walletnpm | The former name of the EthereumJS wallet package: secp256k1 keys and V3 keystores encrypted with scrypt or PBKDF2 and AES. |
| micro-eth-signernpm | Minimal Ethereum library for secp256k1 transaction and message signing, legacy and EIP-2335 keystores, EIP-2333 key derivation, and KZG and PeerDAS blob commitments. |
| @polkadot/util-cryptonpm | Polkadot crypto utilities: sr25519, Ed25519 and secp256k1 keys and signatures, BLAKE2, Keccak, SHA-2, HMAC, PBKDF2, scrypt, NaCl secretbox and encrypted JSON. |
| @polkadot/wasm-cryptonpm | WebAssembly build of the Rust primitives behind @polkadot/util-crypto: sr25519, Ed25519, secp256k1, BLAKE2b, Keccak, SHA-2, HMAC, PBKDF2, scrypt and BIP-39. |
| @polkadot/keyringnpm | Polkadot key management for sr25519, Ed25519 and secp256k1 key pairs, with encrypted JSON export using scrypt and NaCl secretbox. |
| opensslcrates.io | Rust bindings to OpenSSL covering TLS, X.509, RSA, DSA, Diffie-Hellman, elliptic curve and Edwards curve keys, symmetric ciphers, hashes, MACs and key derivation. |
| openssl-syscrates.io | Raw FFI declarations for the OpenSSL C library, used by the openssl crate. |
| boringcrates.io | Rust bindings to BoringSSL with TLS support, RSA, DSA, Diffie-Hellman, ECDSA and ECDH, Ed25519 and X25519, ML-KEM, ML-DSA, HPKE, AEAD ciphers, hashes, HMAC and key derivation. |
| botancrates.io | Rust wrapper for the Botan C++ library, exposing ciphers, hashes, MACs, KDFs, password hashing, random generators, X.509 and classical and post-quantum public key algorithms. |
| orioncrates.io | Pure Rust library offering ML-KEM, ML-DSA, X-Wing, HPKE, X25519, (X)ChaCha20-Poly1305, BLAKE2b, BLAKE3, SHA-2, SHA-3, HMAC, HKDF, PBKDF2, Argon2 and scrypt. |
| sodiumoxidecrates.io | Rust bindings to libsodium: X25519 crypto_box, XSalsa20-Poly1305 secretbox, Ed25519 signatures, ChaCha20-Poly1305 and AES-256-GCM AEADs, SHA-2, BLAKE2b, HMAC, Argon2 and scrypt password hashing. |
| libsodium-syscrates.io | Raw FFI bindings to the libsodium C library, used by sodiumoxide. |
| scryptcrates.io | Pure Rust scrypt memory-hard key derivation and password hashing. |
| agecrates.io | Library for the age file encryption format, with X25519, hybrid ML-KEM-768 plus X25519, P-256 tag, SSH key and scrypt passphrase recipients and ChaCha20-Poly1305 payload encryption. |
| eth-keystorecrates.io | Encrypted JSON keystores in the Web3 Secret Storage format: scrypt or PBKDF2 key derivation, AES-128-CTR encryption and a Keccak-256 MAC. |
2 listed
Sources
- RFC 7914: The scrypt Password-Based Key Derivation Functionrfc-editor.orgRetrieved 3 December 2026
- Tarsnap: The scrypt key derivation function and encryption utilitytarsnap.comRetrieved 3 December 2026
Full record
- Identifier
- scrypt
- Kind
- password-hash
- Family
- Symmetric
- Rests on
- memory-hard function
- Quantum effect
- Weakened by Grover's search
Standards
- RFC 7914The scrypt Password-Based Key Derivation FunctionIETF, informational, published 1 August 2016Checked 3 December 2026