Why do all Electrum master public keys all start with xpub661MyMwAqRbc?

2

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

Antony

Posted 2016-05-23T15:10:20.130

Reputation: 23

1

You may be interested to learn that an Ethereum.SE is up and running.

Murch 2016-06-13T15:05:01.453

Answers

4

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.

Nick ODell

Posted 2016-05-23T15:10:20.130

Reputation: 26 536