<p><a href="https://github.com/bitcoin/bips/blob/master/bip-0032.mediawiki" rel="nofollow">BIP32</a> specifies how hierarchical master public keys are serialized.</p>

<pre><code>4 byte: version bytes (mainnet: 0x0488B21E public, 0x0488ADE4 private; testnet: 0x043587CF public, 0x04358394 private)
1 byte: depth: 0x00 for master nodes, 0x01 for level-1 derived keys, ....
4 bytes: the fingerprint of the parent's key (0x00000000 if master key)
4 bytes: child number. This is ser32(i) for i in xi = xpar/i, with xi the key being serialized. (0x00000000 if master key)
</code></pre>

<p>So, when a master public key is serialized, it always begins with <code>0488 B21E 0000 0000 0000 0000 00</code></p>

<p>Encoded, that's the pattern you see.</p>

CC BY-SA 3.0
2016-05-23T17:08:52.117Z
2016-05-23T17:08:52.117Z
Nick ODell
<p>I was playing around generating wallets using the current version (2.6.4 on Mac OSX) and noticed that each new (standard) wallet I generated had the same start to the master public key: xpub661MyMwAqRbc. I noticed that this was also true in the Electrum documentation screenshots too: <a href="http://docs.electrum.org/en/latest/coldstorage.html" rel="nofollow">http://docs.electrum.org/en/latest/coldstorage.html</a> Does anyone know why this is? Thanks in advance!</p>

<p>NB I posted this to <a href="https://www.reddit.com/r/Electrum" rel="nofollow">https://www.reddit.com/r/Electrum</a> too and will cross-post any answers I find on either forum :)</p>

CC BY-SA 3.0
2016-06-13T15:05:01.453Z
You may be interested to learn that an [Ethereum.SE](http://ethereum.stackexchange.com) is up and running.
Murch
<wallet><electrum><public-key><bip32-hd-wallets><seed>
Why do all Electrum master public keys all start with xpub661MyMwAqRbc?
Antony
# Why do all Electrum master public keys all start with xpub661MyMwAqRbc?

(Asked by: username_0 on 2016-05-23)

I was playing around generating wallets using the current version (2.6.4 on Mac OSX) and noticed that each new (standard) wallet I generated had the same start to the master public key: xpub661MyMwAqRbc. I noticed that this was also true in the Electrum documentation screenshots too: <http://docs.electrum.org/en/latest/coldstorage.html> Does anyone know why this is? Thanks in advance!

NB I posted this to <https://www.reddit.com/r/Electrum> too and will cross-post any answers I find on either forum :)

**Tags:** wallet, electrum, public-key, bip32-hd-wallets, seed

> **Comments:**
> **username_1**: You may be interested to learn that an [Ethereum.SE](http://ethereum.stackexchange.com) is up and running.  

---

## 1 answers

### Answer by username_2 on 2016-05-23. Score: 4 | Accepted answer

[BIP32](https://github.com/bitcoin/bips/blob/master/bip-0032.mediawiki) specifies how hierarchical master public keys are serialized.

```
4 byte: version bytes (mainnet: 0x0488B21E public, 0x0488ADE4 private; testnet: 0x043587CF public, 0x04358394 private)
1 byte: depth: 0x00 for master nodes, 0x01 for level-1 derived keys, ....
4 bytes: the fingerprint of the parent's key (0x00000000 if master key)
4 bytes: child number. This is ser32(i) for i in xi = xpar/i, with xi the key being serialized. (0x00000000 if master key)

```

So, when a master public key is serialized, it always begins with `0488 B21E 0000 0000 0000 0000 00`

Encoded, that's the pattern you see.


---

