Reviewed Aug 2026
DE
BA-04 · LESSON 04

HD derivation

KEY DEFINITIONS

Terms used in this lesson

HD wallet
Hierarchical deterministic wallet: a wallet that derives many related keys from one root.
xpub
A serialized extended public key containing a public key and chain code for deriving normal public descendants.
BIP32
The Bitcoin standard for deriving a tree of child keys from one extended root key.
HMAC
Hash-based message authentication code: a keyed hash construction used to authenticate data or derive deterministic secret material.
HMAC-SHA512
HMAC using SHA-512; BIP32 uses it to derive a master key and chain code from seed material.
BIP84
The wallet derivation convention for native SegWit single-key outputs.
Descriptor
A machine-readable description of the scripts, keys, and derivation paths a Bitcoin wallet watches or can spend.

A hierarchical deterministic wallet creates many related keys from one root. Bitcoin Improvement Proposal 32 defines normal and hardened child-key paths with different exposure risks.

65 min Difficulty 1/5 Not started

Loading lesson visuals...

01

Learn the idea

An HD wallet is hierarchical deterministic: it derives a tree of child keys from one root seed. BIP32 extended keys combine key material with a 32-byte chain code. An xpub is a serialized extended public key containing a public key plus chain code; it can derive normal public descendants but not hardened children. A derivation path such as m/84'/0'/0'/0/5 names a route through the tree. A hardened child, marked with an apostrophe, uses private parent data and cannot be derived from only the parent xpub.

GUIDED EXPLANATION1/5 ideas inspected
1

Create the master node

BIP32 applies a Hash-based Message Authentication Code using Secure Hash Algorithm 512, shortened to HMAC-SHA512, to seed material to produce a master private key and chain code.

Inspect each idea before the worked example.
The worked example follows the explanation

Inspect every idea above to open it.

Important distinctionThe mnemonic alone always tells recovery software which addresses to scan.

The same seed supports many paths and output types. Recovery may require purpose, account, branch, gap assumptions, and descriptor information.

02
FINISH LEARNING FIRST

The questions unlock after every required learning activity

Inspect every guided idea, open the worked example, rebuild its mechanism, and complete the deterministic lesson tool. Your progress is saved automatically.