Bitcoin Forum
July 04, 2024, 08:11:57 PM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: CORRECTED: Addresses with 2 of 3 multisig wallet  (Read 181 times)
CompNsci (OP)
Sr. Member
****
Offline Offline

Activity: 332
Merit: 253


View Profile
January 11, 2019, 12:25:13 AM
Last edit: January 11, 2019, 10:00:38 PM by CompNsci
 #1

UPDATE -- please see my last post in this thread. This was caused by some confusion on my part about keys.

When creating a multi signature 2 of 3 wallet using a combination of xprv and xpub keys, it appears that the addresses created by Electrum (v 3.2.3) depend on the particular combination of keys used. For example, say there are 3 keys, A, B, and C.

Wallet 1: One creates a view only 2 of 3 multisig wallet using the 3 xpub keys, xpub A, xpub B, xpub C.

Wallet 2: create a new wallet using 2 of the 3 private keys. If one uses xprv A, xprv B and xpub C, the same addresses are produced as Wallet 1.

Wallet 3: create a new wallet using a different set of 2 of the 3 private keys, say xpub A, xprv B, and xprv C. This wallet now has a different set of addresses.

This does not seem correct. Any ideas on the problem or what algorithm Electrum is using?
pooya87
Legendary
*
Offline Offline

Activity: 3500
Merit: 10703



View Profile
January 11, 2019, 05:00:11 AM
Merited by bones261 (2), CompNsci (1)
 #2

i can not reproduce this. here is the test case using your wallet 1 and 2 with the following key pairs (created at random using https://iancoleman.io/bip39/):
A)
xprv9s21ZrQH143K31HndpbS3apy1Fp3jnfcUbtT393ETgBrkrxi2QqWitpk65NsNwWpwz9qdkxS83m MLCsARavSLCTGZCnYngAUMm4Q6LWgM2L
xpub661MyMwAqRbcFVNFjr8SQimhZHeY9FPTqpp3qXSr21iqdfHrZx9mGh9DwLekCFq1JpLob72bkGb cuSh6BJwDbryCCjdFx4dNi5RCJHbqB11

B)
xprv9s21ZrQH143K3eJwJrHUbU9G9wSDyVYoMXzoLQ7sR7WhVcAhjfkqJHeW6nxQbEMiUnudE6gcXVV xGwtrbiW31UsSFujMmvPWux3FPtxsk4M
xpub661MyMwAqRbcG8PQQspUxc5zhyGiNxGeikvQ8nXUyT3gNQVrHD55r5xyx67NjEy3rVDcTek1KDU Pt5BSfinzR6Tm939sSwRd7P7XcsyeX3w

C)
xprv9s21ZrQH143K2mkrySSvs7YijnkVLWNXJ576Q7vCJ2WZeCPWP9kU2t89KtzDkpqQC635pgwfMCu VgzNKob46ANsandU3V5EZ9o2CsSA4q6j
xpub661MyMwAqRbcFFqL5TywEFVTHpayjy6NfJ2hCWKorN3YWzievh4iagSdB979tdoQg8F4TxN2kLe AannNkyatxyeMZaUCCNfYG6bMYUeoajn

with xpub A, xpub B, xpub C i get 3CRNzS8CEwfbEkPM7Q1S6Ss9TcbKtcLu6N
with xpub A, xprv B, xprv C i get 3CRNzS8CEwfbEkPM7Q1S6Ss9TcbKtcLu6N

i thought the order may make a difference (which i believe it should!!!) but it doesn't. using xprv B, then xpub A, then xpub C gives me the same address!

if you are doing something else then do it on these keys (since you may not want to reveal your own keys) and tell us the exact steps you took.

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

Activity: 3640
Merit: 1571



View Profile
January 11, 2019, 08:33:31 AM
Merited by bones261 (2), CompNsci (1)
 #3

You need to go back and confirm that you have the right xprvs and xpubs. Most likely you are using xprvs for a different set of seeds. Otherwise this cannot happen because electrum orders public keys lexicographically in the multisig script so the same addresses are always generated.
CompNsci (OP)
Sr. Member
****
Offline Offline

Activity: 332
Merit: 253


View Profile
January 11, 2019, 09:59:40 PM
 #4

Thanks all for the checking on this. You are both correct, when I rerun this with a test set of keys the order does not matter. I think I must have been somehow confused about which keys I was using and was mixing up different sets.

Neither the order of the keys, nor the particular combination matters, as long as one has a public or private version of all 3 of the required keys.
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!