Author

Topic: Implementing 2-of-2 Multisig with Existing Bitcoin Addresses (Read 155 times)

legendary
Activity: 3038
Merit: 4418
Crypto Swap Exchange
1) Do they need to generate a new Bitcoin address for this purpose, or can they use their existing addresses?
No, but it doesn't hurt to separate them. Usually, we generate and use new addresses specific for MultiSig for the sake of simplicity and avoiding the confusion by having dedicated addresses for them. Note that you don't generate multisig with addresses, but with public keys.
2) Could someone provide a step-by-step guide on how to achieve this using Bitcoin Core or Electrum, preferably with an example?
For Bitcoin Core: https://developer.bitcoin.org/reference/rpc/createmultisig.html
For Electrum: https://electrum.readthedocs.io/en/latest/multisig.html
3) Is it necessary to fund the newly created Bitcoin address during this process, or can they generate the multisig Bitcoin address without funding it?
No, similar to how you don't have to transfer funds to Bitcoin addresses when you generate them.
If Alice and Bob want to transfer all their coins to this newly created multisig 2-of-2 address, do they both need to approve the transaction along 2-of-2, or can Alice and Bob independently execute the transaction as usual from their private addresses, with the multisig address as the destination?
Restriction only comes in when you are spending the wallet; you would need the unlocking script (generated with your two public keys) and valid signatures when spending funds from that address.
In case Alice and Bob want to fund the new multisig address they can use any bitcoin source address, right?
Yes. There are no restrictions when sending funds to any address types.
However, I've still an unanswered question that was born out off this: is the Bitcoin address of Alice and Bob somehow related to the new-created multi-sig address or can Alice and Bob continue using their private address as they were used to before the multi-sig address creation ?
They are independent, it is just that signatures from those two addresses are required to spend. Alice and Bob can both use their own addresses as well. Though I do not recommend this; just create a new address.

There appears to be some confusion about HD wallets and Multisig setup.

Multisig is created by having only public keys of the signatories, and creating a Multisig address which the appropriate script. The master public key IS NOT involved in the creation of the multisig address. When you create a Multisig wallet with a HD seed, the wallet does the above automatically for you, with the different public keys generated from your HD wallet. As such, you have a "HD Multisig Wallet", which is generated by the combination of the public keys from the different seeds.

Ie. Index 1 of HD Seed A with Index 1 of HD seed B to generate Multisig Address 1, Index 2 of HD Seed A with Index 2 of HD seed B to generate Multisig Address 2.
legendary
Activity: 2618
Merit: 6452
Self-proclaimed Genius
EDIT: I think this answers my question and I understand.
In case Alice and Bob want to fund the new multisig address they can use any bitcoin source address, right?
Yes, that's one way to make it in Bitcoin Core.
And in the later versions, it will even output a "Descriptor" that you can import to a descriptor wallet where you can manage the transactions and co-signing instead of relying on commands.

The source doesn't matter since incompatibility to send to different address types is mainly a client-related issue.

Quote from: citb0in
Please correct me if I'm wrong --> a new multisig address is going to be generated which will be treated independently of Alice and Bobs' private address.
Transactions are locked with a script not in the private key(s), in this case that MultiSig address.
Different addresses are representation of different locking scripts so the generated MultSig address will be treated differently as it requires different unlocking script to be spent.

Quote from: citb0in
However, I've still an unanswered question that was born out off this: is the Bitcoin address of Alice and Bob somehow related to the new-created multi-sig address or can Alice and Bob continue using their private address as they were used to before the multi-sig address creation ?
Privacy issues, it'll be obvious that the MultiSig address and those two SingleSig addresses are owned by two individuals just by checking any of their "spending" transactions.

The only security concern in that is the double risk of getting their funds compromised due to using the same private key to two use-cases, but that depends on how they handle the private keys.
hero member
Activity: 630
Merit: 731
Bitcoin g33k
From what I've been reading so far I also would say that multi-sig creation is possible with a private key. If I were Alice or Bob I would hesitate to use my "master" key or any other information related to my seed of the hierarchical deterministic wallet. Nevertheless, any feedback is appreciated so thanks to everyone. I need to dig into and play around with it.
member
Activity: 239
Merit: 59
a young loner on a crusade
First of all you cannot generate a multi sig wallet from just any private key it must be a master private key.
That's not true.

Here's an example:

Alice:
private key: KwVBzQmhpC123Y1kC12gsv7gxzVMxBLkjJWAuuKmEJq7Fg29Wvqv
public key: 0344A8F56FDB1C673C84DBDF14AEA9D379E94A78CC8E2B23FABC825441892F309F
address: 1N8T6Ykag4zGYTQdrgXfG591Mgr2knbC3z (compressed Legacy)

Bob:
private key: KxLGpNEn8G4zjCKrgpPkdeDpXLwLFzvayYjjWatmXwhDvqEWaPmv
public key: 03BD586F00F0B2718B6358A8548D83CA8DE0AEB62A6DA373F9E43898B6BFE73234
address: 15H3P6gKVdgohC4xRXU5iW14kjxt87BH6Q (compressed Legacy)

Enter both public keys on https://coinb.in/#newMultiSig to get:
multisig address: 3G86tBmVtSafoVQDz2NRwF4PWTqgvqiapK
Redeem script: 52210344a8f56fdb1c673c84dbdf14aea9d379e94a78cc8e2b23fabc825441892f309f2103bd586 f00f0b2718b6358a8548d83ca8de0aeb62a6da373f9e43898b6bfe7323452ae

Test withdrawing before sending a large amount to this address.
hero member
Activity: 868
Merit: 952

Thanks for coming back to my question. What exactly do you mean by "master" private key in this context? Is the private key in hex or dec form not enough ? Additionally, Alice and Bob know their WIF key. Is this prereq enough for allowing them to create a new multi-sig address ?


In simple term this master private key I actually refer to is like an extended private generated by seed phrase from hierarchy deterministic wallets. With this master private key you can create many child private key and public key too. A child Private key might be associated with just one single address imagine having many child private keys you need either the extended private key or seed phrase as the single source of back up for all.

Just as adviced above it will be better or less complex that this process is carried out using the seed phrase. The each co-signer will have a master public key which you need the other co-signers own to complete the set up of the wallet. It is this master public keys That guarantees the creation of same address for the multi sig
hero member
Activity: 630
Merit: 731
Bitcoin g33k

Thanks, will read through and try it. Can you also point to a link related to Bitcoin core which described the procedure? I'd like to test it also manually with bitcoind commands to strengthen my understanding. Of course I will use regnet or testnet for this learning task first. Any other helpful link is also much appreciated. Thanks to all

legendary
Activity: 1512
Merit: 4795
Leading Crypto Sports Betting & Casino Platform
Read this about 2-of-2 multisig:

https://electrum.readthedocs.io/en/latest/multisig.html

After you read it, use 2 devices to set it up before asking any other questions.

I will advice you to use seed phrase and master public key to generate it. Although, you can also use private key and public key to generate it.

The private key is in WIF. It can be used to regenerate the multisig wallet. It is better to give the public key or the master public key to the cosigner, not the private key.
hero member
Activity: 630
Merit: 731
Bitcoin g33k
First of all you cannot generate a multi sig wallet from just any private key it must be a master private key.

1. Yes they need to create a new wallet as multi sig wallet because the other wallet were single sig and they would have different addresses but the multi sig needs to be same address.

3. You can generate any wallet without having to fund it but you can testrone your wallet also with testnet tokens too to be sure it is correct.

4. A 2-of-2 multi sig definitely needs the signing to of both co-singers for the funds on that wallet to be able to be spent

Thanks for coming back to my question. What exactly do you mean by "master" private key in this context? Is the private key in hex or dec form not enough ? Additionally, Alice and Bob know their WIF key. Is this prereq enough for allowing them to create a new multi-sig address ?
hero member
Activity: 868
Merit: 952
First of all you cannot generate a multi sig wallet from just any private key it must be a master private key.

1. Yes they need to create a new wallet as multi sig wallet because the other wallet were single sig and they would have different addresses but the multi sig needs to be same address.

3. You can generate any wallet without having to fund it but you can testrone your wallet also with testnet tokens too to be sure it is correct.

4. A 2-of-2 multi sig definitely needs the signing to of both co-singers for the funds on that wallet to be able to be spent
hero member
Activity: 630
Merit: 731
Bitcoin g33k
Hello Bitcoin Community,

imagine following scenario: Alice owns the private key for Bitcoin address 1example555... and Bob owns the private key for Bitcoin address 1foo888... Now, Alice and Bob want to implement a 2-of-2 multisig setup. I have a few questions regarding this process:

1) Do they need to generate a new Bitcoin address for this purpose, or can they use their existing addresses?

2) Could someone provide a step-by-step guide on how to achieve this using Bitcoin Core or Electrum, preferably with an example?

3) Is it necessary to fund the newly created Bitcoin address during this process, or can they generate the multisig Bitcoin address without funding it?

If Alice and Bob want to transfer all their coins to this newly created multisig 2-of-2 address, do they both need to approve the transaction along 2-of-2, or can Alice and Bob independently execute the transaction as usual from their private addresses, with the multisig address as the destination?

EDIT: I think this answers my question and I understand. Please correct me if I'm wrong --> a new multisig address is going to be generated which will be treated independently of Alice and Bobs' private address. In case Alice and Bob want to fund the new multisig address they can use any bitcoin source address, right? However, I've still an unanswered question that was born out off this: is the Bitcoin address of Alice and Bob somehow related to the new-created multi-sig address or can Alice and Bob continue using their private address as they were used to before the multi-sig address creation ?

I would appreciate any insights or guidance on this matter. Thanks to @ll in advance
citb0in
Jump to: