Create an account

Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Electrum 4.2.1 Multi Sig and xpub / Master Public Key generation

So setting up multisig wallets are pretty easy once you understand how electrum forces you to set it up.

Most tutorials online are saying "go into electrum, under address tab the first address will show your xpub key" I assume in the details where it shows "Public Keys", this key doesnt have a zpub xpub vpub at the beginning, so I automatically assume it wouldn't work. And it doesn't.

I assumed the xpub key was found by opening your wallet in electrum, (already generated a seed) clicking the tab next to "File" labeled "Wallet" which leads you to a master public key. This key has a lowercase z at the beginning.

on testnet I got

These keys don't work with multi sig wallets on electrum. Trying these results in: "Wrong key type p2wpkh". This is the only location I was able to find an xpub keys in the electrum application.

After generating several segwit, bip39 wallets and a lot of testing, I have concluded none of the Master Public Keys listed under the "Wallet" Label will work with generating multi sig wallets.

This worked:

So as I can see, in order to get a ( Master Public Key / xpub / mpk ) that will work with multi sig wallets;You open Electrum.

Create a new wallet > Tick Multi Signature Wallet

Select Whatever amount of cosigners, at this point doesn't matter (if you are just trying to figure out your xpub key)

You can create a new seed all together next, or use " I already have a seed"

Once electrum has your seed, at this point, it will give you an xpub key to give to cosigners. Clicking Okay will give you the option to continue adding cosigners Master Public key or adding more seeds.

the difference in Master Public keys listed under the tab "Wallet" > "Information" and the one i get half way going through the multi sig wallet setup?
the obvious is

Wallet>info: zpub098d09d...asdf (has lowercase z)

Multi-sig wallet halfway setup: Zpub039d098f9..asdf (has uppercase Z, actually works for multisig wallet setup)

A lot of the information I was finding pertaining to this was really off. xpub isn't what the beginning should be, it was once upon a time in btc I believe, but is not technically used anymore. Technically now it just means Master Public Key, xpub.

Note* All electrum wallets can send btc to each other, whether 1, 3, or bc1 wallet.

Different Btc wallets:

Segwit (bech32) [p2wpkh] (Electrum and bip39)
Segwit-Wrapped [p2wpkh-p2sh] (Bip39)
Legacy [p2pkh]

Segwit(bech32) and segwit-p2sh wallets are different. Segwit is the "better" protocol. Segwit wallets start with bc1. They are a lot more common these days. Very widely accepted across the board. Fees with these type of wallets are relatively cheap, compared to what they use to be. I'd like to note, BINANCE doesn't accept segwit, only legacy which starts with a 1 in the address, BEP2, and BSC. I think they are litterally the only exchange that doesn't support lightning servers. Everyone else is moving to it. This causes binances fees for BTC to be REALLLLY high. Trying to send btc in legacy format is costly in fees. Legacy just wasn't made for such a large network. Newer advancements were made, creating smaller bits per address, opening more channels etc. Causes fees to drop drastically.

Cashapp uses lightning servers with segwit-wrapped protocol (bip39) these wallets have a 3 in them.

segwit-in-p2sh / P2SH-P2WPKH (Bip39)

This is the address type that hardware wallets like Trezor or Ledger use. Addresses look like regular P2SH addresses, they start with 3. Without going into too much detail, this uses an old address type and uses segwit to spend from it. The advantage is that virtually all wallets already know how to send coins to this kind of address. One disadvantage is that to spend from those addresses, additional complexity is added to the transaction which makes those transactions slightly bigger (and thus more expensive) than native segwit transactions.
Electrum also supports this kind of addresses but you need to manually import a BIP39 seed with a BIP49 derivation path.

You need to create a BIP39 seed in another wallet or tool and then restore it in Electrum.

You can use

but should save the page to a usb stick and use it on a safe offline system (or boot a usb stick live linux with no network, and open the page from file).

Another option is rolling dice

When you enter the seed the last word may be wrong (bad checksum), but you just try the others in the section (as described on that dice page). Whatever floats your boat for security paranoia.

When restoring in Electrum select menu File, New/Restore.

Enter a new filename. Next. Choose Standard. Next. Choose "I already have a seed".

Type your seed words and click options and choose BIP39. You don't absolutely need to get a "valid checksum" message but if you want to use the seed in other BIP39 wallets then it must be valid.

Click Next.
When prompted with a derivation path m/44'/0'/0' change the 44 to 49 but be sure not to alter anything else. Keep the apostrophes. 49 is the code for Segwit! Should be: m/49'/0'/0'

Click Next.
Enter a password for your wallet. This enables wallet file encryption. No password means no encryption, clear text wallet file (not safe).

It will generate your address list. Should all start with 3... These addresses are Segwit and compatible with others on the network now. You won't save on fees when you send to these addresses but you will when you spend from them.

If you use a bad seed just make sure to backup your public and private key list somewhere and you should be good. I generated a bip39 wallet from a segwit generated wallet and was not able to pull the seed out, but was able to backup the keys. So not sure if it will generate the same set of keys every time using this method. Not recommended.

BIP39 was introduced two years after Electrum. BIP39 seeds include a checksum, in order to help users figure out typing errors. However, BIP39 suffers the same shortcomings as early Electrum seed phrases:
  • A fixed wordlist is still required. Following our recommendation, BIP39 authors decided to derive keys and addresses in a way that does not depend on the wordlist. However, BIP39 still requires the wordlist in order to compute its checksum, which is plainly inconsistent, and defeats the purpose of our recommendation. This problem is exacerbated by the fact that BIP39 proposes to create one wordlist per language. This threatens the portability of BIP39 seed phrases.
  • BIP39 seed phrases do not include a version number. This means that software should always know how to generate keys and addresses. BIP43 suggests that wallet software will try various existing derivation schemes within the BIP32 framework. This is extremely inefficient and rests on the assumption that future wallets will support all previously accepted derivation methods. If, in the future, a wallet developer decides not to implement a particular derivation method because it is deprecated, then the software will not be able to detect that the corresponding seed phrases are not supported, and it will return an empty wallet instead. This threatens users funds.

Personally I think it's a great idea to have a ledger or card to sign transactions, a wallet on your pc to sign transactions, with the third wallet dormant somewhere in case you lose 1 of the first 2 wallets. The setup is kind of ridiculous right now but the build is solid. Want to develop some software to work with multi sig wallets and pgp keys, fully signing and identifying all parties of a transaction. Whether 2, 3 people or 100. (Although most transactions will only need 2 sides and maybe a median). With lightning networks being accepted by the majority now, BTC is on the brink of big things with the right, easy to use, setup getting out.

Hope this helps some people! I've done about 12 hours of research today and testing. If anyone would like to donate via
tbtc: tb1qltun49wmlwu7l96y45l7ws2a9jgd6rwjpfdly2
btc: bc1qph7w2uzj2tpxmj64cwh6gnjz2lc9m2ehdfculs

Sick Prodigy
[Image: RvghcKs.png]

Forum Jump:

Users browsing this thread:
1 Guest(s)

Forum software by © MyBB Theme © iAndrew 2016