Skip to main content
Popular searches
BlockchainUpdated: Nov 11, 2026

Key Derivation

Key derivation generates cryptographic keys from a password or seed using functions like PBKDF2 (a KDF) to slow brute-force attacks and enhance security in wallets.

Also known as:KDFPBKDF2key stretching

What Is Key Derivation?

Key derivation is the calculation of cryptographic keys from another secret, such as a password, a recovery phrase or a master key. The algorithm that does it is called a key derivation function (KDF). Derivation is deterministic: the same input always gives the same keys, which is why a wallet can be rebuilt from its backup.

Wallets use it in two places. The first is turning the recovery phrase into a seed: BIP-39 runs the words, together with the optional passphrase, through PBKDF2 with HMAC-SHA512 and 2,048 rounds, producing a 512-bit seed. The second is hierarchical derivation (BIP-32): from that seed the wallet computes a tree of private and public keys, addressed by derivation paths such as m/84'/0'/0', so one backup covers every account and address.

KDFs for passwords are slow on purpose. Repeating a hash many times, known as key stretching, makes each guess expensive for an attacker. PBKDF2 does this with iterations only; scrypt and Argon2 also require a lot of memory.

Stretching multiplies an attacker's cost, but it does not add entropy. The 2,048 rounds of BIP-39 are modest, so a short or guessable passphrase can still be brute-forced by someone who holds the recovery phrase. Derivation paths that differ between wallet apps are also a common reason why a restored wallet shows a zero balance.

Real-World Examples

Example 1: A 24-word recovery phrase is restored on a device from a different manufacturer and the same addresses come back, because both devices follow BIP-39 and BIP-32 and derive identical keys from the same words.

Example 2: A Keycard Shell user adds a passphrase. PBKDF2 mixes it into the seed, so the device derives an entirely different set of keys from the one the words alone produce.

Example 3: After importing a recovery phrase into another wallet app, a user sees no funds. The app was using a different derivation path; choosing the matching account type makes the balance appear.

BlockchainMnemonic Phrase

Read full definition: Mnemonic Phrase
SecurityBackup

Read full definition: Backup
SecurityRecovery

Read full definition: Recovery
BlockchainBIP39

Read full definition: BIP39
SecurityPassphrase

Read full definition: Passphrase
BlockchainBIP32

Read full definition: BIP32
BlockchainPublic Key

Read full definition: Public Key
BlockchainDerivation Path

Read full definition: Derivation Path
SecurityEntropy

Read full definition: Entropy

Frequently Asked Questions

Why does my restored wallet show a zero balance?

Often because the new wallet app uses a different derivation path. Derivation is deterministic, so the same recovery phrase gives the same keys, but only along the same path, such as m/84'/0'/0'. Choosing the account type that matches the original wallet usually makes the balance appear. A different passphrase also leads to a different set of keys.

Does PBKDF2 make a short passphrase safe?

No. Key stretching multiplies an attacker's cost per guess, but it does not add entropy. The 2,048 rounds of BIP-39 are modest, so a short or guessable passphrase can still be brute-forced by someone who already holds the recovery phrase. The passphrase has to be hard to guess on its own.

How can one recovery phrase cover every account and address?

Through hierarchical derivation (BIP-32). The recovery phrase is first turned into a 512-bit seed; from that seed the wallet computes a tree of private and public keys, each addressed by a derivation path. Because the calculation is deterministic, the same backup always rebuilds every account and address in that tree.

Ready to Choose a Secure Wallet?

Use our tools to find the right hardware wallet for your needs.