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?

1 Answer 1

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.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.