TeachMeBitcoin

Extended Keys: The Parent of Billions

From TeachMeBitcoin, the free encyclopedia Reading time: 2 min

Extended Keys: The Parent of Billions

In a standard Bitcoin wallet, one private key creates one public key. In a BIP32 Hierarchical Deterministic (HD) Wallet, we use Extended Keys. An extended key is a master key that can generate an infinite tree of "Child" keys.

1. The Extended Secret

An extended key is composed of two parts:

  1. The Key (Private or Public): The standard 32-byte or 33-byte ECDSA key.

  2. The Chain Code: An extra 32 bytes of "Entropy" that acts as a deterministic salt.

Without the Chain Code, you just have a single key. With it, you have an Extended Key that can derive a predictable sequence of sub-keys.

2. xprv vs. xpub

3. The Tree of Life

HD Wallets are structured like a file system:

4. Why use Extended Keys?

The primary benefit is Security and Portability.

Key Type Can Generate Private Children? Can Generate Public Children?
Private Key No Yes (1)
xprv Yes Yes
xpub No Yes

In the next section, we will analyze the Anatomy of an xpub/xprv.

☕ Help support TeachMeBitcoin

TeachMeBitcoin is an ad-free, open-source educational repository curated by a passionate team of Bitcoin researchers and educators for public benefit. If you found our articles helpful, please consider supporting our hosting and ongoing content updates with a clean donation:

Ethereum: 0x578417C51783663D8A6A811B3544E1f779D39A85
Bitcoin: bc1q77k9e95rn669kpzyjr8ke9w95zhk7pa5s63qzz
Solana: 4ycT2ayqeMucixj3wS8Ay8Tq9NRDYRPKYbj3UGESyQ4J
Address copied to clipboard!