<p>With only a public key, you cannot do BIP 32 derivation. BIP 32 derivation requires an additional piece of information called the chain code. This chain code is derived with each key, so each private-public keypair has its own unique chain code. Without the chain code, you cannot do any further BIP 32 derivation.</p>

CC BY-SA 4.0
2020-02-16T12:11:46.550Z
So how do I proceed if I have both public key and chain code?
luibo
CC BY-SA 4.0
2020-02-16T17:36:46.467Z
Follow the derivation process described in [BIP 32](https://github.com/bitcoin/bips/blob/master/bip-0032.mediawiki). You can also produce an xpub ([also described in BIP 32](https://github.com/bitcoin/bips/blob/master/bip-0032.mediawiki#Serialization_format) from your pubkey and chain code and give that xpub to any BIP 32 compliant software to do the derivation.
Ava Chow
CC BY-SA 4.0
2020-02-16T04:29:22.610Z
2020-02-16T04:29:22.610Z
Ava Chow
<p>I'm working with a hardware wallet (Keycard) and I'm able to export a 130 characters hex public key of the path m/44'/0'/0'. Now, I need to perform account discovery, and in order to do it I first need to get addresses from public keys obtained as explained here: </p>

<p><a href="https://bitcoin.stackexchange.com/questions/68740/generate-hd-addresses-using-publickey-bip44">generate HD addresses using publicKey Bip44</a></p>

<p>The problem is that I have not an xpub. After derived the key for m/44'/0'/0', how can I use it to derive public keys for m/0/0-19? I've started working with this stuff just some days ago and I'm a bit confused.</p>

<bip32-hd-wallets><public-key>
How can I perform key derivation from a 130 characters hex public key?
luibo
# How can I perform key derivation from a 130 characters hex public key?

(Asked by: username_0 on 2020-02-15)

I'm working with a hardware wallet (Keycard) and I'm able to export a 130 characters hex public key of the path m/44'/0'/0'. Now, I need to perform account discovery, and in order to do it I first need to get addresses from public keys obtained as explained here:

[generate HD addresses using publicKey Bip44](https://bitcoin.stackexchange.com/questions/68740/generate-hd-addresses-using-publickey-bip44)

The problem is that I have not an xpub. After derived the key for m/44'/0'/0', how can I use it to derive public keys for m/0/0-19? I've started working with this stuff just some days ago and I'm a bit confused.

**Tags:** bip32-hd-wallets, public-key


---

## 1 answers

### Answer by username_1 on 2020-02-16. Score: 1

With only a public key, you cannot do BIP 32 derivation. BIP 32 derivation requires an additional piece of information called the chain code. This chain code is derived with each key, so each private-public keypair has its own unique chain code. Without the chain code, you cannot do any further BIP 32 derivation.

> **Comments:**
> **username_0**: So how do I proceed if I have both public key and chain code?  
> **username_1**: Follow the derivation process described in [BIP 32](https://github.com/bitcoin/bips/blob/master/bip-0032.mediawiki). You can also produce an xpub ([also described in BIP 32](https://github.com/bitcoin/bips/blob/master/bip-0032.mediawiki#Serialization_format) from your pubkey and chain code and give that xpub to any BIP 32 compliant software to do the derivation.  

---

