KDF deep dive · 14 min read

BIP39 vs PBKDF2 vs Scrypt vs Argon2

Why is MetaMask cracked at 9 million guesses per second while a high-cost MEW keystore manages 50? Why does a 12-word seed survive but a 12-character password fall? It all comes down to the key derivation function (KDF) — the one design choice that determines whether a wallet's password is practically recoverable or economically impossible to brute-force.

A KDF is the tool that turns a human-typeable password into a cryptographic key. The two mandatory properties: it must be deterministic (same password → same key) and it must be slow enough that an attacker cannot try billions of guesses per second. Different KDFs achieve "slow" in different ways, and those differences directly determine recovery feasibility.

The four major KDF families

PBKDF2 (2000)

Password-Based Key Derivation Function 2 from RSA Labs. Conceptually trivial: HMAC the password+salt N times. Slowness comes purely from CPU iterations. Crucially, PBKDF2 has no memory cost — a GPU can run thousands of instances in parallel using only registers and L1 cache. This is why PBKDF2-protected wallets fall so quickly.

Bcrypt (1999)

Designed for password hashing in Unix systems. Uses a modified Blowfish cipher with adjustable cost. Modest memory footprint (4 KB). Mostly uncommon in crypto wallets because it lacks key-stretching to arbitrary lengths.

Scrypt (2009)

Designed by Colin Percival explicitly to thwart custom hardware attacks. Uses a configurable amount of memory (parameter N controls memory and time). At N=262144, r=8, p=1 each candidate requires 256 MB. A consumer GPU has 8-24 GB total — so it can only run 30-90 parallel scrypt instances, not millions. Hence the 50 H/s number for high-cost MEW.

Argon2 (2015)

Winner of the Password Hashing Competition. Three variants: Argon2d (data-dependent, stronger vs GPU), Argon2i (data-independent, side-channel resistant), Argon2id (hybrid, modern default). Strictly better than scrypt by current standards but slow adoption in crypto wallets.

Side-by-side throughput on RTX 4090

KDFParametersRAM / candidateH/s (single 4090)Used in
PBKDF2-SHA25610K iter~1 KB~9MMetaMask
PBKDF2-SHA256100K iter~1 KB~200KPhantom
PBKDF2-SHA5122K iter~1 KB~50KBIP39 mnemonic
PBKDF2-SHA5125K iter~1 KB~310KCoinomi, Jaxx
PBKDF2-SHA25625K iter (Bitcoin Core)~1 KB~50Kwallet.dat
ScryptN=8192 r=8 p=18 MB~1.2KMEW low-cost
ScryptN=16384 r=8 p=116 MB~600Trust Wallet
ScryptN=131072 r=8 p=1128 MB~80BIP38 paper wallets
ScryptN=262144 r=8 p=1256 MB~50MEW high-cost, Geth
Argon2idt=3 m=64MB p=164 MB~150Cake Wallet, newer

Why BIP39 uses such weak parameters

BIP39 specifies seed = PBKDF2-HMAC-SHA512(mnemonic, "mnemonic" + passphrase, 2048 iterations, 64 bytes). 2048 iterations is laughably low by general standards. The reason is intentional:

# BIP39 entropy budget
12 words = 11 bits/word x 12 = 132 bits (128 entropy + 4 checksum)
24 words = 11 bits/word x 24 = 264 bits (256 entropy + 8 checksum)

# A 12-word mnemonic has 128 bits of entropy.
# 2^128 = 3.4e38 candidates - already infeasible to brute-force
# regardless of KDF speed.

# The KDF protects the OPTIONAL passphrase, not the mnemonic.
# Since most users have no passphrase, low iterations are fine.
# Users WITH a passphrase have their security in the passphrase
# strength, not the iteration count.

This design choice is also why Trezor / Ledger passphrase brute-force is feasible — see our Trezor passphrase guide.

Memory hardness — the killer feature

A consumer GPU has 16-24 GB of VRAM. With PBKDF2 (1 KB per candidate), it can run 16 million parallel candidates. With scrypt N=262144 (256 MB per candidate), it can run only 64-96. The 250,000x reduction in parallelism is precisely the protection scrypt offers.

ASIC-level analysis: a custom chip optimized for SHA-256 can do PBKDF2 attacks at terahash-per-second speeds. A custom chip for scrypt is bottlenecked by memory bandwidth — and modern DRAM costs are not falling fast. This is why Litecoin (scrypt PoW) resisted ASICs for years.

Per-wallet KDF audit

WalletKDF usedVerdict
MetaMaskPBKDF2 10K iterWeak — Argon2 migration overdue
PhantomPBKDF2 100K iterBetter but still PBKDF2
Bitcoin CoreSHA-512 + AES, ~25K iterOld design
ElectrumPBKDF2-SHA512 1024 iterVery weak; relies on password strength
MEW (default)Scrypt N=262144Strong
Trust WalletScrypt N=16384Acceptable
BIP38 paper walletScrypt N=16384 (some N=131072)Strong
CoinomiPBKDF2-SHA512 5-16K iterWeak
Cake Wallet (Monero)Argon2idBest in class
Implication for password choice: If your wallet is PBKDF2-based (most browser-extension wallets), your password length is the only protection. A 16-char random password gives ~96 bits of entropy — uncrackable even on weak KDFs. A 6-char "password1" — recoverable in seconds regardless of how many iterations the wallet uses.

What "uncrackable" actually means

A password is practically uncrackable when its entropy times the KDF cost exceeds the global compute budget. Concretely:

# Bitcoin network does ~6e20 SHA-256 ops/sec (April 2026)
# Re-purposed to crack PBKDF2-SHA256 10K iter MetaMask:
#   60 quintillion / 10K = 6e16 H/s effective
# A 14-char fully-random password has ~95 bits = 4e28 candidates
# Total time = 4e28 / 6e16 = 7e11 seconds = 22000 years

# So even with the entire Bitcoin network for one purpose,
# a 14-char random MetaMask password is uncrackable.

# But: a 6-char "password" + 2 digits (rockyou-style) is in the
# top 10000 most common patterns. Any GPU finds it in milliseconds.

Related guides

Frequently asked questions

What is a KDF?

A function that turns a password into a key, intentionally slowly to thwart brute force. PBKDF2, scrypt, bcrypt, Argon2.

Why is BIP39 PBKDF2 only 2048 iterations?

The mnemonic itself is high-entropy. Low iteration count protects only the optional passphrase.

Why is scrypt better than PBKDF2?

Memory hardness — GPUs cannot run millions of parallel scrypt candidates due to RAM cost.

Is Argon2 the best?

Argon2id is current best practice. Few wallets have migrated.

What KDF parameters mean uncrackable?

Argon2id t=3, m=64MB OR scrypt N=131072+ AND a 14+ char random password.

Find out which KDF protects your wallet

Submit your wallet for free analysis. We auto-detect the KDF, iteration count and memory parameters, and tell you the realistic feasibility before you pay anything.