Bitcoin Forum
May 22, 2024, 08:11:26 AM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: Recovering funds from a P2SH multisig address  (Read 687 times)
WG91 (OP)
Newbie
*
Offline Offline

Activity: 2
Merit: 2


View Profile
July 12, 2017, 07:08:25 AM
 #1

Hi everyone,

I created a 2FA wallet in the hopes of having a safe place to store some coins & tokens.
Electrum offers private key control & 2FA so I thought I'd be good to store them here.
Seems, however, it is a little too safe, as I cannot gain control of my receiving addresses.

I did not know at the time that 2FA would also mean that there are scripted addresses in the wallet.
I had an ICO sent my tokens to an address I control (starting with '3') and control the private key of.
However, now that I am trying to sweep the tokens into a wallet that can display them, I am having issues.

The private key from the (apparently P2SH) address where the tokens are in, points to an address starting with '1'.
The tokens are in the address starting with '3'.

Anyone have a clue on how to recover them? Is it at all possible to find the private key for this address?
Trying to derive it from the master private key (xprv..) did not work, and I already tried restoring to disable 2FA; also, no success.
Abdussamad
Legendary
*
Offline Offline

Activity: 3612
Merit: 1564



View Profile
July 12, 2017, 11:24:16 AM
 #2

these are multisig addresses with more than one private key behind them. you only have one in your wallet. another one is with your co-signer trustedcoin. the third is encoded in the seed mnemonic that you were shown during the wallet creation process and which you were supposed to write down.

we've had a few posts here from users wanting to claim various alt-coin "air drops" i.e. altcoins handed out to existing bitcoin holders. they've had to generate signatures using 2 out of the 3 private keys behind their multisig addresses and then submit those on websites. Is something like this possible for your ICO?
Abdussamad
Legendary
*
Offline Offline

Activity: 3612
Merit: 1564



View Profile
July 12, 2017, 11:36:54 AM
 #3

I do have 2 out of 3 master private keys now, so in theory it should be possible.
On what site would I combine these master private keys to generate the multisig addresses?
I have generated addresses out of both of them seperately, but haven't found a site where I can put in multiple master private keys yet.
It's worth a try for sure.

When you restore your wallet in electrum it generates the multisig address. Does that not help?

You can also generate the address on the command line using the createmultisig command.

Code:
electrum help createmultisig

You will need any combination of the 3 public or private keys behind that address (the address specific ones not the master ones). You can right click on the address in your restored wallet and get most of that info there.
Abdussamad
Legendary
*
Offline Offline

Activity: 3612
Merit: 1564



View Profile
July 12, 2017, 11:55:25 AM
 #4

you don't have just one private key. you have 3 behind each address. you need 2 out of 3 to spend money from an address. when you restore your wallet it will contain 2 out of 3 and they will be displayed if you right click on an address and choose private key.

but ultimately it depends on what software you are using to sweep these addresses. does it support multisig addresses? if it doesn't then your tokens are lost.
Abdussamad
Legendary
*
Offline Offline

Activity: 3612
Merit: 1564



View Profile
July 12, 2017, 01:08:33 PM
 #5

Mhm, in my restored wallet it only shows one.. I'll see if I can find the other one.
If anyone else has ideas, please shoot Smiley

when recovering your wallet you have to choose not to continue using trusted coin as a cosigner when it asks you that question. did you do that?
Abdussamad
Legendary
*
Offline Offline

Activity: 3612
Merit: 1564



View Profile
July 12, 2017, 02:57:41 PM
 #6

I restored it from my seed, so now it shows "This wallet is was restored from seed, and it contains two master private keys. Therefore, two-factor-authentication is disabled." when I click Trustedcoin.

what happens when you right click on an address and select private key? you should get two address specific private keys.
Abdussamad
Legendary
*
Offline Offline

Activity: 3612
Merit: 1564



View Profile
July 12, 2017, 05:24:51 PM
 #7

Sorry you are right. I tried it myself and it only displays one private key. Even restoring from the xprvs+xpub.

There is a risky way to get your address specific private keys. You can download this webpage and run it offline:

https://bip32jp.github.io/english/

Enter your xprv in "BIP32 Extended Key" and scroll down to "Derivation path" and set it to custom. If your address is the first in the list of address in electrum then you enter "m/0/0" (without quotes) in the "custom path" field, if it is the second then enter  "m/0/1" and so on.


You'll have to do that for each of the xprvs.

I'm still not sure how this will help you claim your funds. p2sh addresses also involve a redeem script which you can create with the createmultisig command i gave you before.
HCP
Legendary
*
Offline Offline

Activity: 2086
Merit: 4316

<insert witty quote here>


View Profile
July 13, 2017, 04:31:25 AM
 #8

You can verify that it belongs to that address... if you right click on the original "3" address in your 2FA wallet, you should be able to view the three public keys that belong to that "3" address. You can then generate the redeem script for this address by following the instructions here: https://bitcointalk.org/index.php?topic=1989369.msg19830190#msg19830190 (credit to Abdussamad for the Electrum console commands)

Once you have the redeemscript, there are instructions for determining the "1" addresses here: https://bitcointalk.org/index.php?topic=1989369.msg19853098#msg19853098 (Basically, just do steps 2 and 3, you only need to do the other steps if people want a signed message)

And finally, by using an offline copy of bitaddress.org (use the Github or zip download links at the bottom of the page and use in a VM or airgapped PC), you can input the two private keys you have generated and see if they match up with the addresses... or alternatively, you can just import those private keys into a new Non-HD Electrum wallet (select the "use public or private keys" option when creating a new "Standard wallet") and see if the "1" addresses match up with those from the redeemscript.

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


▄▄████▄▄
▄███▀▀███▄
██████████
▀███▄░▄██▀
▄▄████▄▄░▀█▀▄██▀▄▄████▄▄
▄███▀▀▀████▄▄██▀▄███▀▀███▄
███████▄▄▀▀████▄▄▀▀███████
▀███▄▄███▀░░░▀▀████▄▄▄███▀
▀▀████▀▀████████▀▀████▀▀
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!