Bitcoin Forum
December 12, 2024, 03:36:50 PM *
News: Latest Bitcoin Core release: 28.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: Multisig, please help.  (Read 961 times)
Patel (OP)
Legendary
*
Offline Offline

Activity: 1320
Merit: 1007



View Profile WWW
May 04, 2015, 01:22:39 AM
 #1

Hi,

I am playing with multisig right now. I need some help.

I used the coinkite keygen https://coinkite.com/offline/keygen.html to generate 3 keys offline.

Then I uploaded the encrypted keyfiles in Coinkite with a 2 of 3 signature required account, and it assigned me a multisig address. Starts with 3.

My questions are:

1. When I enter the 3 public keys in electrum, to restore the multisig wallet, it gives me a different multisig address. Why?
2. If Coinkite goes down, how can I retrieve my funds from the multisig address, that Coinkite provided based off the 3 keyfiles?


Here is what I have in my disposal:

(3) Mnemonics 24 words per BIP39. One for each of the keys used for the multisig address.
(3) HD wallet base58 per BIP32
(3) Master Secret in Hex


Lets say I want to recover my multisig address funds, and send them to a new address. How can I? Using only these 3 things and lets pretend Coinkite is down.
coinableS
Legendary
*
Offline Offline

Activity: 1442
Merit: 1186



View Profile WWW
May 04, 2015, 01:38:10 AM
 #2

I didn't know that electrum supported multisig. Anyways, when you create a multisig address using the pubkeys the order you enter them DOES matter.
addy1 + addy2 + addy3 = multisig1
addy1 + addy3 + addy2 = multisig2

Does coinkite provide you with the reedemscript?

Patel (OP)
Legendary
*
Offline Offline

Activity: 1320
Merit: 1007



View Profile WWW
May 04, 2015, 01:39:27 AM
 #3

No I do not have any redeem scripts.

I have followed the correct order on both Coinkite and Electrum, but getting different addresses.
achow101_alt
Sr. Member
****
Offline Offline

Activity: 268
Merit: 258


View Profile
May 04, 2015, 02:02:16 AM
 #4

My questions are:

1. When I enter the 3 public keys in electrum, to restore the multisig wallet, it gives me a different multisig address. Why?
This might be because Coinkite gave you compressed keys. Uncompressed keys will give you one address, while compressed keys can give you the same address or a different one. This is because the compressed keys remove the y-coordinate from the public key, thus allowing two points on the elliptic curve to be chosen as the public key, and thus two different addresses for the same key. This aspect of the private keys may be what is giving you a different multisig address.

2. If Coinkite goes down, how can I retrieve my funds from the multisig address, that Coinkite provided based off the 3 keyfiles?
-snip-
Lets say I want to recover my multisig address funds, and send them to a new address. How can I? Using only these 3 things and lets pretend Coinkite is down.
You need to convert the key from uncompressed to compressed or vice versa in order to find the right multisig address.

An uncompressed key will start with a 5 and be 51 characters long while compressed keys will start with either a K or L and be 52 characters long.

Tip Me!: 1AQx99s7q1wVinbgXbA48BaZQVWpHe5gYM | My PGP Key: Fingerprint 0x17565732E08E5E41
Patel (OP)
Legendary
*
Offline Offline

Activity: 1320
Merit: 1007



View Profile WWW
May 04, 2015, 02:07:07 AM
 #5

My questions are:

1. When I enter the 3 public keys in electrum, to restore the multisig wallet, it gives me a different multisig address. Why?
This might be because Coinkite gave you compressed keys. Uncompressed keys will give you one address, while compressed keys can give you the same address or a different one. This is because the compressed keys remove the y-coordinate from the public key, thus allowing two points on the elliptic curve to be chosen as the public key, and thus two different addresses for the same key. This aspect of the private keys may be what is giving you a different multisig address.

2. If Coinkite goes down, how can I retrieve my funds from the multisig address, that Coinkite provided based off the 3 keyfiles?
-snip-
Lets say I want to recover my multisig address funds, and send them to a new address. How can I? Using only these 3 things and lets pretend Coinkite is down.
You need to convert the key from uncompressed to compressed or vice versa in order to find the right multisig address.

An uncompressed key will start with a 5 and be 51 characters long while compressed keys will start with either a K or L and be 52 characters long.

The only public keys I have are "Extended Public Key" goes like xpub661......
achow101_alt
Sr. Member
****
Offline Offline

Activity: 268
Merit: 258


View Profile
May 04, 2015, 02:43:48 AM
 #6

Oh, I didn't realize that Coinkite gave you Extended keys. My previous post was regarding normal keys.

What do you get when you put the keys into electrum? What about coinkite?

Tip Me!: 1AQx99s7q1wVinbgXbA48BaZQVWpHe5gYM | My PGP Key: Fingerprint 0x17565732E08E5E41
DocHex
Newbie
*
Offline Offline

Activity: 10
Merit: 0


View Profile
May 04, 2015, 02:54:23 AM
 #7

To generate the same P2SH addresses, you have to get the order correct (for each of the 3 keys) and use the right subkey (ie. the expected BIP32 path).

1) Coinkite uses addresses of the form "m/n" where 'n' goes from 1 (IIRC) and counts up for each transaction (or change) in the account.
Previously-used addresses are easily found in the "audit report" which you can generate on the detail page for the account. In fact, the subkey is a column there as well.

2) Sorting of the keys (which happens after they are mapped from BIP32 into normal bitcoin addresses) is lexicographical sort (IIRC) and is compatible with how ms-brainwallet works. You should be able to generate the same keys using that site.

As for Electrum, I haven't tried to get it to interoperate with Coinkite yet.
Patel (OP)
Legendary
*
Offline Offline

Activity: 1320
Merit: 1007



View Profile WWW
May 05, 2015, 01:25:44 AM
 #8

Does anyone know, if coinkite goes down, will I be able to recover my bitcoins using the resources provided?

(3) Mnemonics 24 words per BIP39. One for each of the keys used for the multisig address.
(3) HD wallet base58 per BIP32
(3) Master Secret in Hex
achow101_alt
Sr. Member
****
Offline Offline

Activity: 268
Merit: 258


View Profile
May 05, 2015, 01:43:04 AM
 #9

You should be able to. If you can import these addresses into other wallets that support BIP32 or BIP39, you will be able to access the coins even if coinkite goes down.

Tip Me!: 1AQx99s7q1wVinbgXbA48BaZQVWpHe5gYM | My PGP Key: Fingerprint 0x17565732E08E5E41
coinableS
Legendary
*
Offline Offline

Activity: 1442
Merit: 1186



View Profile WWW
May 05, 2015, 01:48:24 AM
 #10

Does anyone know, if coinkite goes down, will I be able to recover my bitcoins using the resources provided?

(3) Mnemonics 24 words per BIP39. One for each of the keys used for the multisig address.
(3) HD wallet base58 per BIP32
(3) Master Secret in Hex

I'd like to see someone demonstrate how to do this, because I don't think it's possible. To send from a multisig address using bitcoin core client you need the redeemScript and m of n private keys, you can then use this to create a raw transaction and access your coins. I guess you can get the redeemScript yourself if you have the correct public keys(1) in the correct order...  With the info coinkite is providing you it looks like they are providing you with info that is not compatible with bitcoin core.

(1) example 66 chars [0-9A-F] : 0347f3394ff0a223332b1de34d51c4cd5cd381d390c890b82fbd00af059f22e19d

Patel (OP)
Legendary
*
Offline Offline

Activity: 1320
Merit: 1007



View Profile WWW
May 05, 2015, 02:12:16 AM
 #11

To generate the same P2SH addresses, you have to get the order correct (for each of the 3 keys) and use the right subkey (ie. the expected BIP32 path).

1) Coinkite uses addresses of the form "m/n" where 'n' goes from 1 (IIRC) and counts up for each transaction (or change) in the account.
Previously-used addresses are easily found in the "audit report" which you can generate on the detail page for the account. In fact, the subkey is a column there as well.

2) Sorting of the keys (which happens after they are mapped from BIP32 into normal bitcoin addresses) is lexicographical sort (IIRC) and is compatible with how ms-brainwallet works. You should be able to generate the same keys using that site.

As for Electrum, I haven't tried to get it to interoperate with Coinkite yet.

I am playing with ms-brainwallet http://ms-brainwallet.org/#generator

I generated 3 keys from coinkite keygen, and if I place those xprv private keys in the same order, it is generating me different addresses.

Using these 3 xprvs:

1: xprv9s21ZrQH143K3T9wwvn4rHVK8pbkWxUEwJJTvysJJLSdaeLtJTqY64dRcn9v75CSzTgmQT8AUzg KbHrawDaVR9n5KD2VfEfL5Utmr4eLdbz
2: xprv9s21ZrQH143K48EpkMW6MAHPRya9nYtV1M73z7jLqpgCd4F5TZZkiqFpXMakGnTesAKuQfra1im J79UkXtyaAbj6kxhagTg2eMYy5cUKkx6
3: xprv9s21ZrQH143K2bQ5qvK4iHykpBAWyq8ktkPsVb2gU6boGUwvRufSJFkbzsYu7zjmewq7prRYPgZ TPHJKeb26sxwy9iD3LDUHk3EgDWYeQJX

ms-brainwallet generates the address 33BFPWemAkJTg2CZE3EfZzkrvABC7g6DrF, but in my coinkite account it shows 3PXecgTTyQ1twbPhqsMxcz71sL1ACKwm6X


On ms-brainwallet, if I use the extended public keys on the create tab, manual, enter them in order:
1: xpub661MyMwAqRbcFwER3xK5DRS3grSEvRC6JXE4jNGurfycTSg2r19ndrwuU2dCHtzycanQk7eyq2s x5XcLJJw1Uqmce7rq2FeD2E1svpEx4uu
2: xpub661MyMwAqRbcGcKHrP36iJE7z1QeC1cLNa2enW8xQADBVraE16t1GdaJNbQBKMG5vmtt47saosj sk54mhVnbiqqyGyM7oWZkbhXkokdXkUd
3: xpub661MyMwAqRbcF5UYwwr55RvVND11PHrcFyKUHySJ2S8n9HH4ySygr455rBhrn518vo656tkpAz3 XPk8afjmFc857qhUwA5NrpeC8kd8fwog

It will generate the address 3FK2DK2KC6KU9FwP845jAKdqxTCorhBVyp

But it doesn't match with coinkite address. My goal is to recreate the coinkite address, without using coinkite.
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!