Skip to content
NOUMENResearch
Network
Engineering
, home page

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

Packages that provide scrypt
PackageProvides
@noble/hashesnpmPure 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-wasmnpmHash 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-jsnpmPure JavaScript scrypt password-based key derivation with synchronous and cancellable asynchronous APIs.
libsodium-wrappers-sumonpmThe sumo build of libsodium.js: everything in libsodium-wrappers plus scrypt password hashing and lower-level functions.
sodium-nativenpmLow-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.
ethersnpmEthereum 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-walletsnpmThe ethers v5 sub-package that encrypts and decrypts Ethereum keystore and crowdsale JSON wallets with scrypt or PBKDF2, AES and a Keccak-256 MAC.
web3npmEthereum 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-accountsnpmThe 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-cryptographynpmCollection 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/walletnpmEthereumJS wallet utilities for secp256k1 key creation, BIP-32 HD keys and V3 keystores encrypted with scrypt or PBKDF2 and AES.
ethereumjs-walletnpmThe former name of the EthereumJS wallet package: secp256k1 keys and V3 keystores encrypted with scrypt or PBKDF2 and AES.
micro-eth-signernpmMinimal 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-cryptonpmPolkadot crypto utilities: sr25519, Ed25519 and secp256k1 keys and signatures, BLAKE2, Keccak, SHA-2, HMAC, PBKDF2, scrypt, NaCl secretbox and encrypted JSON.
@polkadot/wasm-cryptonpmWebAssembly build of the Rust primitives behind @polkadot/util-crypto: sr25519, Ed25519, secp256k1, BLAKE2b, Keccak, SHA-2, HMAC, PBKDF2, scrypt and BIP-39.
@polkadot/keyringnpmPolkadot key management for sr25519, Ed25519 and secp256k1 key pairs, with encrypted JSON export using scrypt and NaCl secretbox.
opensslcrates.ioRust 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.ioRaw FFI declarations for the OpenSSL C library, used by the openssl crate.
boringcrates.ioRust 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.ioRust 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.ioPure 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.ioRust 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.ioRaw FFI bindings to the libsodium C library, used by sodiumoxide.
scryptcrates.ioPure Rust scrypt memory-hard key derivation and password hashing.
agecrates.ioLibrary 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.ioEncrypted 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

Full record

Identifier
scrypt
Kind
password-hash
Family
Symmetric
Rests on
memory-hard function
Quantum effect
Weakened by Grover's search

Standards