user56197: I generated a seed into my coldcard, wrote down its pubkey:
xpubABCDEFGHIKL---------------------------------------------------

then I erased everything and generated a new seed, and wrote down its pubkey
xpubABCDEFGHIKL---------------------------------------------------

as you see, they both start with the first 15 letters the same. Then they differ.
How is that possible?

user208: The encoding of an xpub contains multiple pieces of data:

A 4-byte fixed prefix that results in the "xpub" prefix after encoding
Depth in the tree (0 for all master xpubs, 1 for children thereof, ...)
A 4-byte checksum of the parent key (0x00000000 for all master xpubs as they have no parent)
The 4-byte index this node has in the derivation from its parent (0x00000000 for all master xpubs).
The 32-byte chaincode
The 33-byte public key

So, the first 13 bytes before encoding are identical for all master xpubs. This translates to roughly 17-18 characters after encoding.

56197: <p>I generated a seed into my coldcard, wrote down its pubkey:</p>
<pre><code>xpubABCDEFGHIKL---------------------------------------------------
</code></pre>
<p>then I erased everything and generated a new seed, and wrote down its pubkey</p>
<pre><code>xpubABCDEFGHIKL---------------------------------------------------
</code></pre>
<p>as you see, they both start with the first 15 letters the same. Then they differ.</p>
<p>How is that possible?</p>
 208: <p>The <a href="https://github.com/bitcoin/bips/blob/master/bip-0032.mediawiki#Serialization_format" rel="nofollow noreferrer">encoding</a> of an xpub contains multiple pieces of data:</p>
<ul>
<li>A 4-byte fixed prefix that results in the &quot;xpub&quot; prefix after encoding</li>
<li>Depth in the tree (0 for all master xpubs, 1 for children thereof, ...)</li>
<li>A 4-byte checksum of the parent key (0x00000000 for all master xpubs as they have no parent)</li>
<li>The 4-byte index this node has in the derivation from its parent (0x00000000 for all master xpubs).</li>
<li>The 32-byte chaincode</li>
<li>The 33-byte public key</li>
</ul>
<p>So, the first 13 bytes before encoding are identical for all master xpubs. This translates to roughly 17-18 characters after encoding.</p>
