← Back to Glossary

Extended Private Key (Xprv)

An extended private key, or xprv, is the serialized master secret of a BIP 32 hierarchical deterministic wallet, bundling a private key with an extra 32 bytes called the chain code so that an entire tree of child keys can be derived from it deterministically. Whoever holds an xprv can spend everything below it in the tree.

Why it matters

The xprv is what makes one backup cover unlimited keys. A wallet derives its master xprv from the user's seed phrase, then generates a fresh key for every address from that single root, so recovering the phrase recovers the whole tree, past and future. Before BIP 32, wallets held bags of independent random keys, and backups went stale the moment a new address was created.

The concentration of power is the danger. An exported xprv is not one key but all of them, so it should essentially never leave secure hardware; interfaces that ask for an xprv when an xpub would do are a red flag.

How it works

Child keys are derived with HMAC-SHA512 over the parent key, chain code, and an index number. Hardened derivation, used for account levels, requires the private key itself, which prevents anyone holding only public material from walking down the tree. The whole structure serializes as a Base58Check string beginning with the letters xprv.

Ready to convert your gold to Bitcoin?

Get Your Free Kit →