<p>If you want to spend from those child public keys, you will need their corresponding private keys. You can only generate child private keys from the parent extended private key.</p>

CC BY-SA 4.0
2022-01-18T23:30:56.217Z
So only the extended public key need to be derived if the account is for the sole purpose of receiving funds, but if you want to sign transactions then always derive the extended private key and the extended public key pair together?
Kevvv
CC BY-SA 4.0
2022-01-18T23:33:01.013Z
You can also compute the extended public key from the extended private key, so you never need both. Otherwise, indeed.
Pieter Wuille
CC BY-SA 4.0
2022-01-19T01:21:11.040Z
Ah ok. Does that mean you do need to derive both, you have a choice to derive both the xpub and xpriv from a single xpriv, or you can derive an xpub from the parent xpub and an xpriv from its own parent xpriv separately?
Kevvv
CC BY-SA 4.0
2022-01-19T02:51:17.847Z
You can derive an xpub from an xpriv, and child public and private keys from an xpriv. You don't need the xpub at all unless you're storing your private keys somewhere else for security.
meshcollider
CC BY-SA 4.0
2022-01-18T22:52:48.493Z
2022-01-18T22:52:48.493Z
meshcollider
<p>In a wallet that uses BIP-32, if an extended public key can be used to generate child public keys, in what case is an extended private key needed?</p>

<bip32-hd-wallets>
Why is an extended private key needed?
Kevvv
# Why is an extended private key needed?

(Asked by: username_0 on 2022-01-18)

In a wallet that uses BIP-32, if an extended public key can be used to generate child public keys, in what case is an extended private key needed?

**Tags:** bip32-hd-wallets


---

## 1 answers

### Answer by username_1 on 2022-01-18. Score: 2 | Accepted answer

If you want to spend from those child public keys, you will need their corresponding private keys. You can only generate child private keys from the parent extended private key.

> **Comments:**
> **username_0**: So only the extended public key need to be derived if the account is for the sole purpose of receiving funds, but if you want to sign transactions then always derive the extended private key and the extended public key pair together?  
> **username_2**: You can also compute the extended public key from the extended private key, so you never need both. Otherwise, indeed.  
> **username_0**: Ah ok. Does that mean you do need to derive both, you have a choice to derive both the xpub and xpriv from a single xpriv, or you can derive an xpub from the parent xpub and an xpriv from its own parent xpriv separately?  
> **username_1**: You can derive an xpub from an xpriv, and child public and private keys from an xpriv. You don't need the xpub at all unless you're storing your private keys somewhere else for security.  

---

