Glossary / Addresses & keys
Key index
- Definition
- A key index is the number chosen at each step of an HD derivation, from 0 up to 4,294,967,295, that decides which child of a parent key you land on.
Specified in BIP-32.
Indexes are how a wallet counts. Every level of the tree takes a 32-bit number, so a single parent has 4,294,967,296 possible children, and the entire upper half of that range, from 2,147,483,648 onward, is reserved for hardened derivation. In daily use you meet only the final index in a path: the one that ticks up each time you press receive.
How it works
The index is the only thing that differs between one child and the next. During derivation it is serialized as a four byte big-endian number and appended to the parent key material before hashing, so index 0 and index 1 produce results with no visible relationship to each other. Nothing else in the step changes.
The range splits in two at 2,147,483,648. Below that line derivation is normal, and a parent extended public key is enough to compute the child public key without any secret. At or above the line derivation is hardened, the parent private key has to take part, and public material alone yields nothing. Notation hides the arithmetic: writing 84' or 84h means index 2,147,483,732, which is 84 plus the hardened offset.
Two notations for the same thing cause more confusion than they should. Older documentation and most wallet screens use the apostrophe, as in m/84'/0'/0', while descriptor output from Bitcoin Core prefers m/84h/0h/0h. They are identical. The letter form exists because an apostrophe inside a shell argument is a quoting hazard, and pasting one into bitcoin-cli breaks in ways that are annoying to debug.
Where you see it
The last number in a path is the index you meet daily. In m/84h/0h/0h/0/7 the 0 selects the receiving chain and the 7 marks the eighth address the wallet has handed out, counting from zero. Change has its own counter on chain 1, so the first change output of a brand new wallet lands at m/84h/0h/0h/1/0, and the two counters advance independently.
Sequential counting is what makes recovery possible, and also what makes it fail. BIP-44 tells a restoring wallet to derive forward through 20 consecutive unused addresses and then stop looking, so coins received at index 45 with a long empty stretch before them will show up as a zero balance until you raise the gap limit by hand. Bitcoin Core avoids the argument by keeping a pool of pre-derived keys, 1,000 of them by default, and topping it up as they are consumed.
Discovery works the same way one level higher. A restoring wallet checks account 0', finds history, moves to account 1', and stops at the first account with no transactions at all. Creating account 5' and leaving the accounts below it empty is therefore a reliable way to make a future restore overlook your coins.
Key index vs derivation path
An index is one number; a path is the ordered list of them. m/84h/0h/0h/0/7 contains five indexes, and in ordinary use only the last one moves, because purpose, coin type, account and chain stay fixed for the life of the wallet. The distinction matters when a support article tells you to check your derivation path. It means the fixed prefix, not the address counter, and no amount of clicking receive will rescue a balance that is missing because the prefix was wrong.