Extended Private Key (Xprv)

1 min read

An extended private key, or xprv, is a private key which can be used to derive child private keys as part of a Hierarchical Deterministic (HD) wallet. Almost all Bitcoin wallets use this HD format since the adoption of BIP 32, as it allows a single extended private key, called the master private key, to back up and regenerate all public and private keys in a given wallet.

Master private keys and extended private keys are often conflated. An extended private key is any private key which can be used to generate child private keys. A master private key is the extended private key at the root of a HD tree, and is derived directly from the seed of a HD wallet.

If a single private key is leaked, you can lose the funds associated with that key. However, if your xprv is leaked, all of the funds associated with all of its child private keys are compromised. All xprv keys will begin with the letters ‘xprv’ followed by a long string of letters and numbers.