Technical definition
BIP-32 specifies a method for deriving child keys from a master key using a cryptographic hash function (HMAC-SHA512) and elliptic curve cryptography (ECC). The derivation path is deterministic, meaning the same seed will always produce the same sequence of keys. Keys are organized hierarchically, allowing for public keys to derive child public keys without exposing private keys, while private keys can derive both public and private child keys. The proposal also introduces hardened and non-hardened derivations to balance security and functionality, with hardened derivations preventing a compromised child private key from exposing the parent or sibling keys.
An analogy
Imagine a master key to a bank vault that can generate unique sub-keys for every safe deposit box in a building. Each sub-key opens only one box, but the master key can recreate any sub-key if needed. This way, you only need to remember the master key to access all boxes, rather than keeping track of every individual key.
Why it matters
BIP-32 simplifies wallet management by allowing users to generate and recover all keys from a single seed phrase, reducing backup complexity and improving security. It also enables features like watch-only wallets, where a user can monitor addresses without exposing private keys, and improved privacy by generating new addresses for each transaction.
Where it came from
BIP-32 was proposed by Pieter Wuille in 2012 and merged into Bitcoin Core in 2013. It was one of the earliest Bitcoin Improvement Proposals focused on wallet functionality and has since become a foundational standard adopted across many cryptocurrencies and wallet implementations.
Example in practice
A user generates a 12-word seed phrase in a wallet like Ledger or Trezor. The wallet uses BIP-32 to derive a master private key, which then generates a sequence of public and private keys for Bitcoin, Ethereum, and other cryptocurrencies. When the user needs to restore their wallet, entering the 12 words regenerates all keys deterministically.
Common misconceptions
- BIP-32 wallets are 'unhackable' → Correction: BIP-32 wallets are only as secure as the seed phrase. If the seed is compromised, all derived keys are at risk.
- BIP-32 allows generating private keys from public keys → Correction: BIP-32 allows deriving child public keys from a parent public key, but deriving a child private key from a parent public key is only possible with non-hardened derivations, which are less secure.
- BIP-32 is only for Bitcoin → Correction: While BIP-32 originated in Bitcoin, it is now widely used in other cryptocurrencies like Ethereum, Litecoin, and Monero.
Risks & limitations
- Seed phrase exposure: If the master seed is compromised, all derived keys are at risk, leading to potential loss of funds.
- Weak entropy: Poor randomness in seed generation can lead to predictable keys, making wallets vulnerable to brute-force attacks.
- Hardened vs. non-hardened derivations: Using non-hardened derivations for public keys can expose private keys if the parent private key is compromised.
- Implementation flaws: Bugs in wallet software can lead to incorrect key derivation, resulting in lost funds or inability to recover wallets.
- Backup dependency: Losing the seed phrase means losing access to all derived keys permanently.
Related terms
- BIP-39 (Mnemonic code for generating deterministic keys)
- BIP-44 (Multi-account hierarchy for HD wallets)
- BIP-49 (P2SH-segwit derivation paths)
- BIP-84 (Native segwit derivation paths)
- Seed phrase (mnemonic phrase for wallet recovery)
- Hierarchical Deterministic Wallet (HD Wallet)
- Extended Public Key (xpub)
- Extended Private Key (xprv)