Bitcoin Forum
May 02, 2024, 04:02:45 AM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: Help me to create a multisignature wallet with Electrum  (Read 196 times)
SeriouslyGiveaway (OP)
Full Member
***
Online Online

Activity: 434
Merit: 140



View Profile
February 14, 2023, 10:59:38 AM
 #1

I am learning to create a multisignature wallet with Electrum.

After I created a Cosigner 1 and got its master key, Electrum asked me Master public key of the cosigner 2. What to do because I am creating both Cosigner 1 and Cosigner 2 and I did not have Master public key of Cosigner 2?

The wallet has 2 options: Master Public Key and Master Private Key. How to get both of keys for Cosigner 1 and Cosigner 2?

If I add master private key of Cosigner 2 in a device I store Cosigner 1, is it bad?

Two keys on a same device so multisignature does not make sense?

1714622565
Hero Member
*
Offline Offline

Posts: 1714622565

View Profile Personal Message (Offline)

Ignore
1714622565
Reply with quote  #2

1714622565
Report to moderator
1714622565
Hero Member
*
Offline Offline

Posts: 1714622565

View Profile Personal Message (Offline)

Ignore
1714622565
Reply with quote  #2

1714622565
Report to moderator
The trust scores you see are subjective; they will change depending on who you have in your trust list.
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction.
Charles-Tim
Legendary
*
Offline Offline

Activity: 1540
Merit: 4833



View Profile
February 14, 2023, 11:12:30 AM
Last edit: February 15, 2023, 08:22:46 AM by Charles-Tim
 #2

The master public key would be displayed after you input the seed phrase and click on next. For segwit (P2WSH), it starts from Zpub. Or Xpub for legacy (P2SH).

If you are creating the wallet with someone, you will tell the person to send you the master public key and you will send him yours.

Edit:
If I add master private key of Cosigner 2 in a device I store Cosigner 1, is it bad?
This defeats the purpose of multisig.

.
.HUGE.
▄██████████▄▄
▄█████████████████▄
▄█████████████████████▄
▄███████████████████████▄
▄█████████████████████████▄
███████▌██▌▐██▐██▐████▄███
████▐██▐████▌██▌██▌██▌██
█████▀███▀███▀▐██▐██▐█████

▀█████████████████████████▀

▀███████████████████████▀

▀█████████████████████▀

▀█████████████████▀

▀██████████▀▀
█▀▀▀▀











█▄▄▄▄
▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
.
CASINSPORTSBOOK
▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
▀▀▀▀█











▄▄▄▄█
nc50lc
Legendary
*
Offline Offline

Activity: 2394
Merit: 5578


Self-proclaimed Genius


View Profile
February 14, 2023, 12:36:50 PM
Merited by hosseinimr93 (1)
 #3

After I created a Cosigner 1 and got its master key, Electrum asked me Master public key of the cosigner 2. What to do because I am creating both Cosigner 1 and Cosigner 2 and I did not have Master public key of Cosigner 2?
While "Add Cosigner 2" window is open, you can still launch another instance of Electrum where you can start creating Cosigner2.
After getting to that part where it shows you the master public key, paste that to the "Add Cosigner 2" window.
In the other instance's next window, paste Cosigner1's master public key.

I am learning to create a multisignature wallet with Electrum.
-snip-
Two keys on a same device so multisignature does not make sense?
For learning purposes, that makes sense.
For real-world usage, it defeats the purpose of MultiSig.

.
.HUGE.
▄██████████▄▄
▄█████████████████▄
▄█████████████████████▄
▄███████████████████████▄
▄█████████████████████████▄
███████▌██▌▐██▐██▐████▄███
████▐██▐████▌██▌██▌██▌██
█████▀███▀███▀▐██▐██▐█████

▀█████████████████████████▀

▀███████████████████████▀

▀█████████████████████▀

▀█████████████████▀

▀██████████▀▀
█▀▀▀▀











█▄▄▄▄
▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
.
CASINSPORTSBOOK
▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
▀▀▀▀█











▄▄▄▄█
hosseinimr93
Legendary
*
Offline Offline

Activity: 2380
Merit: 5235



View Profile
February 14, 2023, 12:52:36 PM
 #4

To add to nc50lc's post:
You can also select "Enter cosigner seed" on "Add cosigner (2-2)" window and enter your second seed phrase.
In this way, you can have a multi-signature wallet which includes both of the keys required for making a transaction.

As mentioned by nc50lc, this is useful only for learning purposes.
You shouldn't have both of the keys on the same device, let alone the same wallet.

.
.BLACKJACK ♠ FUN.
█████████
██████████████
████████████
█████████████████
████████████████▄▄
░█████████████▀░▀▀
██████████████████
░██████████████
████████████████
░██████████████
████████████
███████████████░██
██████████
CRYPTO CASINO &
SPORTS BETTING
▄▄███████▄▄
▄███████████████▄
███████████████████
█████████████████████
███████████████████████
█████████████████████████
█████████████████████████
█████████████████████████
███████████████████████
█████████████████████
███████████████████
▀███████████████▀
█████████
.
o_e_l_e_o
In memoriam
Legendary
*
Offline Offline

Activity: 2268
Merit: 18509


View Profile
February 14, 2023, 02:36:28 PM
 #5

Another option is to go through the multi-sig wallet creation process, ask it to create a new seed phrase, and then copy down the seed phrase and the Zpub it gives you. This is cosigner 1. You can then exit everything and start the process from scratch to create a seed phrase and Zpub for cosigner 2. And again for as many cosigners as you want.

If you were to use a live OS such as Tails, disconnect your internet, and shut down and reboot the computer to the live OS in between generating each cosigner's seed phrase/Zpub, then that would be a much safer way of generating a multi-sig wallet using a single device. You still have to figure out how you are going to spend from this wallet without bringing the threshold number of seed phrases together in the same wallet, however. It would be a very time consuming process to boot to Tails, restore the multi-sig with one seed phrase, sign and export a transaction, and then repeat the whole process for each other cosigner too.

So the real question is what are you trying to achieve? If you only have a single device to use, then a properly airgapped wallet is a better solution than a multi-sig wallet.
SeriouslyGiveaway (OP)
Full Member
***
Online Online

Activity: 434
Merit: 140



View Profile
February 15, 2023, 02:58:57 AM
Merited by o_e_l_e_o (4)
 #6

Thank you all.

The unofficial guide Creating a multisig wallet is more helpful than the official guides on Electrum website, Multisign Wallets.

With your help, I know that I can stop the process anytime and can do it for each cosigner to get their master public key.

Two questions that I don't get from those articles

Do I need Bitcoin, satoshi to sign a transaction as one of cosigner?
If the wallet is 2-2 cosigner, do all two cosigners have to spend satoshi for transaction fee when signing it?

If both cosigners have to spend fee, a total transaction fee from a multi-sign wallet will be higher than from a single-sign wallet.

Or only one co-signer who execute the transaction will spend transaction fee?

I did not use Bitcoin multi-signature wallet but with smart contract multi-signature wallet, only the last cosigner who execute transaction must have native currency for on-chain transaction fee.

Can I use a seed from single signature wallet and gets its master key as a cosigner for a multi-sign signature wallet? or do I have to use a seed from a multi-sign wallet with its master public key?

nc50lc
Legendary
*
Offline Offline

Activity: 2394
Merit: 5578


Self-proclaimed Genius


View Profile
February 15, 2023, 03:45:27 AM
Merited by o_e_l_e_o (4)
 #7

Do I need Bitcoin, satoshi to sign a transaction as one of cosigner?
If the wallet is 2-2 cosigner, do all two cosigners have to spend satoshi for transaction fee when signing it?
No, cosigners will only sign the transaction to finalize it, there's no fee involve in signing transactions.
The fee is set while creating the unsigned raw transaction from the difference of the inputs' and outputs' amounts.

Quote from: SeriouslyGiveaway
Can I use a seed from single signature wallet and gets its master key as a cosigner for a multi-sign signature wallet? or do I have to use a seed from a multi-sign wallet with its master public key?
Electrum's MultiSig setup is using the same Electrum seed as its standard wallets so you can use it.
It doesn't have a specific MultiSig 'reserved number'; only "Standard" (via console), "SegWit" or "2FA".

Quote from: SeriouslyGiveaway
I did not use Bitcoin multi-signature wallet but with smart contract multi-signature wallet, only the last cosigner who execute transaction must have native currency for on-chain transaction fee.
I have a feeling that we're in an "XY Problem" situation here.
Please elaborate.

.
.HUGE.
▄██████████▄▄
▄█████████████████▄
▄█████████████████████▄
▄███████████████████████▄
▄█████████████████████████▄
███████▌██▌▐██▐██▐████▄███
████▐██▐████▌██▌██▌██▌██
█████▀███▀███▀▐██▐██▐█████

▀█████████████████████████▀

▀███████████████████████▀

▀█████████████████████▀

▀█████████████████▀

▀██████████▀▀
█▀▀▀▀











█▄▄▄▄
▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
.
CASINSPORTSBOOK
▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
▀▀▀▀█











▄▄▄▄█
hosseinimr93
Legendary
*
Offline Offline

Activity: 2380
Merit: 5235



View Profile
February 15, 2023, 08:06:49 AM
Merited by o_e_l_e_o (4)
 #8

Can I use a seed from single signature wallet and gets its master key as a cosigner for a multi-sign signature wallet? or do I have to use a seed from a multi-sign wallet with its master public key?
You can use the seed phrase generated for a single-signature wallet for generating a multi-signature wallet as well, but you can't use the master pubic key of your single-signature wallet as the cosigner key on your multi-signature wallet.
Take note that electrum uses a different derivation path for generating the master public key in a multi-signature wallet. This means that if you import the same seed phrase into a single-signature wallet and a multi-signature wallet, you will see two different master public keys.

.
.BLACKJACK ♠ FUN.
█████████
██████████████
████████████
█████████████████
████████████████▄▄
░█████████████▀░▀▀
██████████████████
░██████████████
████████████████
░██████████████
████████████
███████████████░██
██████████
CRYPTO CASINO &
SPORTS BETTING
▄▄███████▄▄
▄███████████████▄
███████████████████
█████████████████████
███████████████████████
█████████████████████████
█████████████████████████
█████████████████████████
███████████████████████
█████████████████████
███████████████████
▀███████████████▀
█████████
.
o_e_l_e_o
In memoriam
Legendary
*
Offline Offline

Activity: 2268
Merit: 18509


View Profile
February 15, 2023, 09:08:33 AM
Merited by hosseinimr93 (1)
 #9

If both cosigners have to spend fee, a total transaction fee from a multi-sign wallet will be higher than from a single-sign wallet.
As nc50lc has explained the fee is only paid once, but yes, the total transaction fee for a multi-sig transaction will be higher than from a single-sig transaction. This is because your transaction has to include multiple signature instead of just one, and each additional signatures adds more size (in bytes) to the transaction. The larger the transaction size, then the higher fee you have to pay.

Take note that electrum uses a different derivation path for generating the master public key in a multi-signature wallet. This means that if you import the same seed phrase into a single-signature wallet and a multi-signature wallet, you will see two different master public keys.
Not just the derivation path, but also the type of master public key it generates. A single-sig P2WPKH wallet will be a zpub (at m/0'), while a multi-sig P2WSH will be a Zpub (at m/1'). The lower/uppercase switch is significant, as they are completely different keys and one cannot be used to generate the same addresses as the other, even if you were using the same derivation path. There's more info here: https://github.com/satoshilabs/slips/blob/master/slip-0132.md
T-1024
Newbie
*
Offline Offline

Activity: 2
Merit: 4


View Profile
June 03, 2023, 06:50:45 PM
Merited by o_e_l_e_o (4)
 #10

Hello,

I would like to use this topic to please ask a question.

Is there a correct order to add cosigners, when creating multisig wallet from seed + hardware device?
I ask this because I have created 2 wallets in different order. First I created a seed and then added the device. Second time - first added the device and then the same already generated seed. I ended up with 2 multisig wallets looking just the same but in the info I can see they have different derivation paths.
So now I wander what is the better order or it doesn't really matter?
The intention of this is to have increased security, than just 1 software or just 1 hardware wallet.

Regards!
khaled0111
Legendary
*
Offline Offline

Activity: 2520
Merit: 2841


Top Crypto Casino


View Profile WWW
June 03, 2023, 08:20:43 PM
 #11

^^
If memory serves me right, I believe I've read a topic in which this question was addressed. Based on members replies on that thread, I think that the order does really matter when a hardware wallet is involved.
Meaning, if one of the go-signers uses a hardware wallet, then you need to follow the same order to restore the wallet. If the order is not the same then you will end up generating a completely different wallet.

█████████████████████████
████▐██▄█████████████████
████▐██████▄▄▄███████████
████▐████▄█████▄▄████████
████▐█████▀▀▀▀▀███▄██████
████▐███▀████████████████
████▐█████████▄█████▌████
████▐██▌█████▀██████▌████
████▐██████████▀████▌████
█████▀███▄█████▄███▀█████
███████▀█████████▀███████
██████████▀███▀██████████
█████████████████████████
.
BC.GAME
▄▄░░░▄▀▀▄████████
▄▄▄
██████████████
█████░░▄▄▄▄████████
▄▄▄▄▄▄▄▄▄██▄██████▄▄▄▄████
▄███▄█▄▄██████████▄████▄████
███████████████████████████▀███
▀████▄██▄██▄░░░░▄████████████
▀▀▀█████▄▄▄███████████▀██
███████████████████▀██
███████████████████▄██
▄███████████████████▄██
█████████████████████▀██
██████████████████████▄
.
..CASINO....SPORTS....RACING..
█░░░░░░█░░░░░░█
▀███▀░░▀███▀░░▀███▀
▀░▀░░░░▀░▀░░░░▀░▀
░░░░░░░░░░░░
▀██████████
░░░░░███░░░░
░░█░░░███▄█░░░
░░██▌░░███░▀░░██▌
░█░██░░███░░░█░██
░█▀▀▀█▌░███░░█▀▀▀█▌
▄█▄░░░██▄███▄█▄░░▄██▄
▄███▄
░░░░▀██▄▀


▄▄████▄▄
▄███▀▀███▄
██████████
▀███▄░▄██▀
▄▄████▄▄░▀█▀▄██▀▄▄████▄▄
▄███▀▀▀████▄▄██▀▄███▀▀███▄
███████▄▄▀▀████▄▄▀▀███████
▀███▄▄███▀░░░▀▀████▄▄▄███▀
▀▀████▀▀████████▀▀████▀▀
nc50lc
Legendary
*
Offline Offline

Activity: 2394
Merit: 5578


Self-proclaimed Genius


View Profile
June 04, 2023, 04:45:20 AM
Merited by o_e_l_e_o (4)
 #12

First I created a seed and then added the device. Second time - first added the device and then the same already generated seed.
I ended up with 2 multisig wallets looking just the same but in the info I can see they have different derivation paths
You can click each test wallet's "keystore 1" and "keystore 2" to see the cosigners' derivation paths.
You'll just see that Wallet1's 'keystore 1' is Wallet2's 'keystore 2'.
The derivation path isn't the concern since it's based from each cosigner's derivation from the "master private key" to "extended/master public key".

Like in your test, it generated the same wallet since Electrum automatically arranges the public keys in "lexicographical order" when generating redeem scripts so it's not an issue.

.
.HUGE.
▄██████████▄▄
▄█████████████████▄
▄█████████████████████▄
▄███████████████████████▄
▄█████████████████████████▄
███████▌██▌▐██▐██▐████▄███
████▐██▐████▌██▌██▌██▌██
█████▀███▀███▀▐██▐██▐█████

▀█████████████████████████▀

▀███████████████████████▀

▀█████████████████████▀

▀█████████████████▀

▀██████████▀▀
█▀▀▀▀











█▄▄▄▄
▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
.
CASINSPORTSBOOK
▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
▀▀▀▀█











▄▄▄▄█
T-1024
Newbie
*
Offline Offline

Activity: 2
Merit: 4


View Profile
June 04, 2023, 08:24:38 AM
 #13

Quote
You can click each test wallet's "keystore 1" and "keystore 2" to see the cosigners' derivation paths.
You'll just see that Wallet1's 'keystore 1' is Wallet2's 'keystore 2'.
The derivation path isn't the concern since it's based from each cosigner's derivation from the "master private key" to "extended/master public key".

Like in your test, it generated the same wallet since Electrum automatically arranges the public keys in "lexicographical order" when generating redeem scripts so it's not an issue.

Yes, exactly as you say.
Also the first option (first seed and then device), produced "Seed available: True (segwit)". In case I start with the device this is "False".

Thanks for all answers!
Abdussamad
Legendary
*
Offline Offline

Activity: 3598
Merit: 1560



View Profile
June 04, 2023, 01:56:04 PM
 #14

Hello,

I would like to use this topic to please ask a question.

Is there a correct order to add cosigners, when creating multisig wallet from seed + hardware device?

You can create the wallet in any order.
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!