Skip to content
NOUMENResearch
Network
Engineering
, home page

IntelligenceAlgorithmspbkdf2

PBKDF2

A password-based key derivation function that iterates a pseudorandom function such as HMAC, specified in RFC 8018 and SP 800-132. BIP 39 uses it to turn a mnemonic into a wallet seed, and it is common in password storage and WPA2. 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 hash function security.
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.

45 in the catalogue

Packages that provide it

Packages that provide PBKDF2
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.
crypto-jsnpmPure JavaScript library of hashes, HMAC, PBKDF2 and ciphers: MD5, SHA-1, SHA-2, a Keccak function it calls SHA3, RIPEMD-160, AES, TripleDES, RC4 and Rabbit.
sjclnpmStanford JavaScript Crypto Library; the default npm build provides AES in CCM, OCB2 and GCM modes, SHA-256, HMAC, PBKDF2 and a Fortuna-style random generator.
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.
node-forgenpmPure JavaScript cryptography and PKI toolkit: RSA signing and encryption, Ed25519, AES (including GCM), DES and RC2, SHA-1, SHA-2, MD5, HMAC, PBKDF2, a Fortuna-based random generator, X.509, PKCS formats and a TLS implementation.
@peculiar/webcryptonpmWebCrypto API implementation for Node.js on top of the built-in crypto module, adding curves such as secp256k1, brainpool, Ed448 and X448 and non-standard mechanisms such as DES and RSAES-PKCS1-v1_5.
crypto-browserifynpmBrowser port of the Node.js crypto module that re-exports the browserify packages for hashes, HMAC, PBKDF2, AES, Diffie-Hellman, ECDH, RSA and ECDSA signing and RSA encryption.
pbkdf2npmPBKDF2 key derivation with any hash supported by the Node.js crypto API, with a JavaScript fallback for browsers.
josenpmJWS, JWE, JWT and JWK for Node.js, browsers and other WebCrypto runtimes, with RSA, ECDSA, Ed25519 and ML-DSA signatures, HMAC, RSA-OAEP, ECDH-ES and AES key management, AES-GCM and AES-CBC-HMAC content encryption and PBES2.
node-josenpmJOSE (JWS, JWE, JWK) implementation from Cisco with RSA, ECDSA and ECDH on the NIST P curves, HMAC, AES (GCM, CBC-HMAC and key wrap), HKDF and PBES2.
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/hdnodenpmThe ethers v5 sub-package for BIP-32 key derivation and BIP-39 mnemonics over secp256k1.
@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.
viemnpmTypeScript Ethereum interface with secp256k1 local accounts, BIP-39 and BIP-32 accounts, WebAuthn P-256 accounts, and Keccak-256, SHA-256 and RIPEMD-160 utilities.
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.
@metamask/key-treenpmMetaMask interface over BIP-39, BIP-32, BIP-44 and SLIP-10 key derivation for secp256k1 and Ed25519 keys.
@metamask/browser-passwordernpmPassword-based encryption of JavaScript objects using a PBKDF2-derived key and AES-GCM from the Web Crypto API.
bip39npmBIP-39 mnemonic generation and validation, with a SHA-256 checksum and PBKDF2-HMAC-SHA512 seed derivation.
@scure/bip39npmBIP-39 mnemonic generation and validation, with a SHA-256 checksum and PBKDF2-HMAC-SHA512 seed derivation.
@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.
@cosmjs/cryptonpmCosmJS cryptography: secp256k1 and Ed25519 signing, SHA-2, Keccak-256, RIPEMD-160, HMAC, BIP-39, SLIP-10, Argon2id and XChaCha20-Poly1305.
@libp2p/cryptonpmlibp2p key and crypto primitives: Ed25519, secp256k1, ECDSA P-256, P-384 and P-521, and RSA keys, ephemeral ECDH, AES-GCM, HMAC and PBKDF2.
@taquito/signernpmTezos in-memory signer for Ed25519, secp256k1, P-256, BLS and ML-DSA-44 keys, with BIP-39 mnemonics and PBKDF2 and NaCl secretbox encrypted secret keys.
@ton/cryptonpmTON crypto primitives: SHA-256, SHA-512, HMAC-SHA-512, PBKDF2-SHA-512, TON mnemonics, Ed25519 signing, NaCl secret boxes and SLIP-10 Ed25519 HD keys.
ringcrates.ioCryptographic library largely derived from BoringSSL, offering ECDSA P-256 and P-384, Ed25519, RSA signatures, X25519 and ECDH, AES-GCM, ChaCha20-Poly1305, SHA-1 and SHA-2, HMAC, HKDF, PBKDF2 and a system random generator.
aws-lc-rscrates.ioring-compatible Rust API over the AWS-LC C library, adding ML-KEM, ML-DSA, RSA encryption, raw AES modes and an optional FIPS build.
aws-lc-syscrates.ioLow-level generated FFI bindings to the AWS-LC C cryptography library, which aws-lc-rs wraps.
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.
mbedtlscrates.ioRust wrapper for Mbed TLS covering TLS, X.509, RSA, ECDSA, ECDH, Diffie-Hellman, AES and ChaCha20-Poly1305, hashes, HMAC, HKDF, PBKDF2 and DRBG random generators.
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.
pbkdf2crates.ioGeneric PBKDF2 password-based key derivation (RFC 2898).
josekitcrates.ioJOSE library (JWT, JWS, JWE, JWK) with HMAC, RSA, ECDSA, EdDSA, ECDH-ES, AES key wrap, AES-GCM and PBES2, backed by OpenSSL, AWS-LC or pure Rust crates.
bip39crates.ioBIP-39 mnemonic phrases in all standard word lists, with seed derivation by PBKDF2-HMAC-SHA512.
bip32crates.ioBIP32 hierarchical deterministic key derivation over secp256k1 using HMAC-SHA512, with k256 or libsecp256k1 key backends and optional BIP39 mnemonic seeds.
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
pbkdf2
Kind
kdf
Family
Symmetric
Rests on
hash function security
Quantum effect
Weakened by Grover's search

Standards