<p>In my case, the master pubkeys do match, they are just encoded differently, with one (ab)using the xpub version prefix and the other Zpub, and corresponding checksum bytes in the end. The actual curve points and all derivations from this coincide.</p>

CC BY-SA 4.0
2020-07-08T19:47:48.370Z
2020-07-08T19:47:48.370Z
oriol
<p>For a little background, I am trying to set up a 2-of-3 multisig wallet with 2 trezors and a coldcard. I am trying to verify that my setup is correct before putting any meaningful amount of money in there, but I am finding that the master pubkeys for the trezors are not matching my expectation.</p>

<p>When creating a standard p2wsh wallet in electrum using a trezor, the default derivation path is <code>m/84'/0'/0'</code>. Immediately after choosing the script type and derivation path electrum displays the master public key. To ensure electrum is using the correct master public key I ran the following <a href="https://wiki.trezor.io/Using_trezorctl_commands_with_Trezor#Get_public_node" rel="noreferrer">command</a>: <code>trezorctl get-public-node -n "m/84'/0'/0'" -t segwit</code>. Sure enough, the master public keys displayed by electrum and <code>trezorctl</code> matched.</p>

<p>However, when trying to do the same verification when creating a multisig wallet, the xpubs do not match. Electrum defaults to the derivation path of <code>m/48'/0'/0'/2'</code> for native segwit multisig wallets. Running <code>trezorctl get-public-node "m/48'/0'/0'/2'" -t segwit</code> outputs a different master public key than what is displayed in electrum. Is this a bug in electrum or is there a reason for the discrepancy? I think that I am misunderstanding something because even though these master public keys don't match, electrum is able to sign and broadcast valid transactions using the trezor as one of the cosigners.</p>

<electrum><multi-signature><bip32-hd-wallets><trezor>
Why do the xpubs from electrum and trezor not match when creating a multisig wallet?
paddy
# Why do the xpubs from electrum and trezor not match when creating a multisig wallet?

(Asked by: username_0 on 2019-12-26)

For a little background, I am trying to set up a 2-of-3 multisig wallet with 2 trezors and a coldcard. I am trying to verify that my setup is correct before putting any meaningful amount of money in there, but I am finding that the master pubkeys for the trezors are not matching my expectation.

When creating a standard p2wsh wallet in electrum using a trezor, the default derivation path is `m/84'/0'/0'`. Immediately after choosing the script type and derivation path electrum displays the master public key. To ensure electrum is using the correct master public key I ran the following [command](https://wiki.trezor.io/Using_trezorctl_commands_with_Trezor#Get_public_node): `trezorctl get-public-node -n "m/84'/0'/0'" -t segwit`. Sure enough, the master public keys displayed by electrum and `trezorctl` matched.

However, when trying to do the same verification when creating a multisig wallet, the xpubs do not match. Electrum defaults to the derivation path of `m/48'/0'/0'/2'` for native segwit multisig wallets. Running `trezorctl get-public-node "m/48'/0'/0'/2'" -t segwit` outputs a different master public key than what is displayed in electrum. Is this a bug in electrum or is there a reason for the discrepancy? I think that I am misunderstanding something because even though these master public keys don't match, electrum is able to sign and broadcast valid transactions using the trezor as one of the cosigners.

**Tags:** electrum, multi-signature, bip32-hd-wallets, trezor


---

## 1 answers

### Answer by username_1 on 2020-07-08. Score: 2

In my case, the master pubkeys do match, they are just encoded differently, with one (ab)using the xpub version prefix and the other Zpub, and corresponding checksum bytes in the end. The actual curve points and all derivations from this coincide.


---

