Bitcoin Forum

Bitcoin => Development & Technical Discussion => Topic started by: JorisK on March 24, 2019, 12:24:55 PM



Title: Help! Does this multi-sig plan work?
Post by: JorisK on March 24, 2019, 12:24:55 PM
Hi,

I'm trying to figure out a way to be more secure, but i'm unsure if this plan is working, I need more technical advice.

What i've done: I've set up a 2-3 multisig wallet using Electrum on my computer and sent some satoshi to it. I've sent some satoshi from that multisig wallet by creating a signed transaction with wallet 1, and signed that transaction with wallet 2 and the transaction was approved, all satoshi's moved to a different wallet successfully.

I'm thinking about the following plan:
http://imgdump4.novarata.net/image.uploads/24-03-2019/640-d40d01faa703d3fc7edfee384bc20743.png

The idea: In case one site burns down, I always have the information of all three keys spread over two sites and I will always be able to access my BTC.


Here's what confuses me and why I need technical help

1) When looking at the picture above, you see every site contains the seed and xpub of 2 wallets. Imagine burglary at site 1 and the thief steals the information (seed + xpub) of key's 1 and 3. Will he be able to access/send tx with that information?
Reason I'm asking: Electrum asks me to provide the information of all 3 wallets.

2) I could successfully send tx using 3 Electrum Windows clients. I wasn't able to spend satoshi's using 1 wallet, HOWEVER: when I moved one of the seeds to the Android Electrum wallet, I was able to spend everything without any other signature at all! TX already got confirmed 8 times! How is this possible?



Title: Re: Help! Does this multi-sig plan work?
Post by: AB de Royse777 on March 24, 2019, 12:47:32 PM
I do 2/2 multi sign.

Print two copies each of the keys.

Two copy of one key goes to one person and advise them them to keep each copies in separate house.

Two copy of another key goes to another person who do not know the first person and advise the same to this 2nd person.

I hope this helps.

Cheers :-)


Title: Re: Help! Does this multi-sig plan work?
Post by: TryNinja on March 24, 2019, 01:45:46 PM
A 2-of-3 multisig wallet means that there are 3 parts and it requires 2 of them to sign the transaction.

1) When looking at the picture above, you see every site contains the seed and xpub of 2 wallets. Imagine burglary at site 1 and the thief steals the information (seed + xpub) of key's 1 and 3. Will he be able to access/send tx with that information?
Reason I'm asking: Electrum asks me to provide the information of all 3 wallets.
If it's a 2-of-3, yes. Since he holds 2 keys, that's enough for him to move the coins.

2) I could successfully send tx using 3 Electrum Windows clients. I wasn't able to spend satoshi's using 1 wallet, HOWEVER: when I moved one of the seeds to the Android Electrum wallet, I was able to spend everything without any other signature at all! TX already got confirmed 8 times! How is this possible?
Are you sure you did everything right? Try creating a new one by following this guide: https://bitcoinelectrum.com/creating-a-multisig-wallet/


Title: Re: Help! Does this multi-sig plan work?
Post by: RHavar on March 24, 2019, 03:50:36 PM
2-of-3 means you need 2 of the 3 to authorize a spend. So your scheme is functionally ~equivalent to just a normal bitcoin storage. Each "site" contains 2 of the 3 keys that would be required to authorize a transaction. Only during the initialization setup are you required to provide information about all 3.

Doing what you're trying to do is simpler than what you're doing: create a 2-of-3 wallet, and keep 1 key in each location


Title: Re: Help! Does this multi-sig plan work?
Post by: JorisK on March 24, 2019, 03:59:01 PM


2) I could successfully send tx using 3 Electrum Windows clients. I wasn't able to spend satoshi's using 1 wallet, HOWEVER: when I moved one of the seeds to the Android Electrum wallet, I was able to spend everything without any other signature at all! TX already got confirmed 8 times! How is this possible?
Are you sure you did everything right? Try creating a new one by following this guide: https://bitcoinelectrum.com/creating-a-multisig-wallet/


Yes 100%,

I created my multisig setup using a youtube video made by hodlhodl. When I start my Electrum Android wallet, and open my wallet, it says:

- Wallet name: default_wallet
- Wallet type: 2of3
- Below it you can see the three xPUB keys, all different

That tx is meanwhile confirmed 26 times.... How the hell is this possible?

What is also weird, the 2nd wallet has a different receive address! When I check it's cosigner page, all 3 xpub keys match the ones on my andoid phone and other wallet!


Title: Re: Help! Does this multi-sig plan work?
Post by: JorisK on March 24, 2019, 05:44:04 PM
2-of-3 means you need 2 of the 3 to authorize a spend. So your scheme is functionally ~equivalent to just a normal bitcoin storage. Each "site" contains 2 of the 3 keys that would be required to authorize a transaction. Only during the initialization setup are you required to provide information about all 3.

Doing what you're trying to do is simpler than what you're doing: create a 2-of-3 wallet, and keep 1 key in each location

"Only during the initialization setup are you required to provide information about all 3."

Exactly. So say i keep one key in each site and my house burns down with my computer and paper backup of key 1. I buy a new house and a new computer, install Electrum and need to provide.... 3 keys, which I don't have anymore?

What would be my approach to move the coins to a new wallet when I only have two keys left to enter?


Title: Re: Help! Does this multi-sig plan work?
Post by: RHavar on March 24, 2019, 07:30:42 PM
n-of-m    means "You need n keys of the total m keys to authorize a transfer".

Exactly. So say i keep one key in each site and my house burns down with my computer and paper backup of key 1. I buy a new house and a new computer, install Electrum and need to provide.... 3 keys, which I don't have anymore?

No. Say your house burns down, then you use the other 2 keys to transfer money. When ever sending a payment, you only need 2 of the 3 keys.  Initialization only happens once, when you create the original wallets.


Quote
What would be my approach to move the coins to a new wallet when I only have two keys left to enter?

2-of-3 means you can transfer funds using 2 of the 3 created keys.  You'd probably create a *new*  2-of-3  wallet, and then transfer to it.


Title: Re: Help! Does this multi-sig plan work?
Post by: RHavar on March 24, 2019, 07:34:21 PM
What you're thinking about is 3-of-3, where you need all 3 of 3 keys to authorize a transfer.   The only benefit to that over a normal (1-of-1) wallet, would be that you can easily do secret-sharing (e.g. your original plan of storing diff keys in diff spots).   But I'd strongly recommend against it, as it sounds a lot like you just want 2-of-3...


Title: Re: Help! Does this multi-sig plan work?
Post by: JorisK on March 24, 2019, 08:14:34 PM
I wasn't really using my brain i guess....

This is the solution:

https://www.mupload.nl/img/5adit4s9.png

A 2of3 multisig wallet. On each location I have one seed + all xpub keys.


Title: Re: Help! Does this multi-sig plan work?
Post by: HCP on March 24, 2019, 08:50:49 PM
Yeah... that 2nd picture makes more sense ;) The first one was quite broken :P

1) When looking at the picture above, you see every site contains the seed and xpub of 2 wallets. Imagine burglary at site 1 and the thief steals the information (seed + xpub) of key's 1 and 3. Will he be able to access/send tx with that information?
Reason I'm asking: Electrum asks me to provide the information of all 3 wallets.
With only 1 seed and 3x xpubs... the thief would only effectively be able to recreate a "watching-only" version of your MultiSig... they would not be able to spend the coins as they only have one set of private keys... and in your 2-of-3... they need 2 sets.

Your setup will remain secure as long as a thief only has one of the seeds... if they broke into TWO of your locations and got TWO of the seeds (and the three xpubs), your coins are as good as gone.


Quote
2) I could successfully send tx using 3 Electrum Windows clients. I wasn't able to spend satoshi's using 1 wallet, HOWEVER: when I moved one of the seeds to the Android Electrum wallet, I was able to spend everything without any other signature at all! TX already got confirmed 8 times! How is this possible?
That seems like you actually imported ALL the seeds... or that you didn't actually put the coins into the multisig in the first place, and had only put the coins into and address in the standard wallet generated from the same seed you imported into Android.


Title: Re: Help! Does this multi-sig plan work?
Post by: JorisK on March 24, 2019, 09:59:07 PM
Thanks for all the help people, love this community.  :-*