user35916: 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 :)

user2306: BIP32 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.

35916: <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>
 2306: <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>
