6

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

1 Answer 1

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.

Your Answer

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

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