BIP-32
Also: HD wallet, hierarchical deterministic wallet
wallets · intermediate
Hierarchical Deterministic Wallets — derives an unlimited tree of keys from a single 64-byte seed.
BIP-32, authored by Pieter Wuille in 2012, is what makes one seed enough to back up an entire wallet. It defines how to derive a tree of related private/public keys from a single master secret in a deterministic way.
Starting from a 64-byte seed (typically produced by [BIP-39](/glossary/bip39)), HMAC-SHA512 splits it into a 256-bit master private key and a 256-bit chain code. From that master, any child key m/i is derived by combining the parent key, chain code, and index i through another HMAC-SHA512. Children have children. The result is a tree of arbitrary depth.
Two flavors of derivation exist. Normal derivation lets you compute child *public* keys from a parent *public* key alone — useful for watch-only wallets and address generators that don't hold the private key. Hardened derivation (index ≥ 2³¹, written as ') breaks that property: deriving a hardened child requires the parent *private* key. Hardened derivation is used at sensitive levels of the tree to limit what a leaked xpub can expose.
Extended keys — [xpub](/glossary/xpub) (public) and [xprv](/glossary/xprv) (private) — are the on-the-wire format: a serialized key plus its chain code, version bytes, and tree position. Reference: [github.com/bitcoin/bips/blob/master/bip-0032.mediawiki](https://github.com/bitcoin/bips/blob/master/bip-0032.mediawiki).