1

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?

Guerlando OCs
  • 180
  • 1
  • 15

1 Answers1

3

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.

Pieter Wuille
  • 98,249
  • 9
  • 183
  • 287