Bitcoin Forum
May 03, 2024, 11:08:40 PM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: recovering change addresses from private key  (Read 201 times)
Tuee22 (OP)
Newbie
*
Offline Offline

Activity: 1
Merit: 2


View Profile
November 01, 2018, 08:05:53 PM
Merited by LoyceV (2)
 #1

I have been using a P2PKH address (i.e. 1Bxxx) as my paper cold storage since I started trading btc. I have only ever used used full-node bitcoin-qt to access this address. Also, I have only used a paper-copy of the private key-- I have never backed up the wallet.dat file. I simply manually import the private key into bitcoin-qt anytime I want to set it up on a new machine. As of right now, I have no machines currently running the node and no copies of any wallet.dat files I have ever used-- I only have the private key for the P2PKH address, as this was my understanding of how "paper cold storage" worked.

On May 5 of this year, using an up-to-date version of bitcoin-qt, I transferred 0.01 btc to an online vendor. From the blockchain explorer, it looks like the rest of my funds were transferred to an auto-generated P2SH address (3xxxx). I had not noticed this at the time, and have since wiped the computer from which the transaction originated. i.e. I don't have the wallet.dat, and I also don't have the the private key for the new P2SH address. Is it possible to retrieve these funds, when all I have is a paper copy of the private key for the original P2PKH address?
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction.
1714777720
Hero Member
*
Offline Offline

Posts: 1714777720

View Profile Personal Message (Offline)

Ignore
1714777720
Reply with quote  #2

1714777720
Report to moderator
1714777720
Hero Member
*
Offline Offline

Posts: 1714777720

View Profile Personal Message (Offline)

Ignore
1714777720
Reply with quote  #2

1714777720
Report to moderator
bob123
Legendary
*
Offline Offline

Activity: 1624
Merit: 2481



View Profile WWW
November 01, 2018, 08:14:50 PM
Merited by dbshck (3), LoyceV (2)
 #2

Unfortunately, the change address is completely independent from your first address.

After you have imported the private key into core and sent the transaction (without manually set the change address to your first address), core automatically used a change address from the keypool (generated independently from core).

The only place where this private key is/was stored is the wallet.dat file from core  Undecided
There is no other way of retrieving the private key (which, by the way, is independent from the address type (P2PKH / P2SH)).


This is a common mistake people do with paper wallets. I am sorry for your loss, but if you can't somehow recover your wallet file, you can't recover your funds.


After wiping your hard drive, did you further use it ?
If you didn't use it too much, there is still a chance that the file is recoverable.

Files do not really get 'deleted', the storage is being 'released' instead. As long as no other data is being written onto that position, it is still accessible.

If you believe that there might still be a chance of retrieving the file, immediately stop using the hard drive and make an image of it (to use recovery software on it; never use it on the original drive).

HCP
Legendary
*
Offline Offline

Activity: 2086
Merit: 4316

<insert witty quote here>


View Profile
November 02, 2018, 06:19:22 AM
 #3

Is it possible to retrieve these funds, when all I have is a paper copy of the private key for the original P2PKH address?
The short answer is No.

The longer answer, is that the newer HD versions of Bitcoin Core (bitcoin-qt) randomly generate a "seed" that wallet addresses (receive and change) are generated from. As bob123 has noted, if you imported your private key and then created a transaction without manually specifying a change address, Bitcoin Core will have used one of the change addresses generated from the random seed. If you no longer have that wallet.dat (and you're unable to recover it using data recovery techniques), then the random seed contained in that wallet.dat is lost... and all the coins that were sent to that change address are effectively "lost" as well Sad

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


▄▄████▄▄
▄███▀▀███▄
██████████
▀███▄░▄██▀
▄▄████▄▄░▀█▀▄██▀▄▄████▄▄
▄███▀▀▀████▄▄██▀▄███▀▀███▄
███████▄▄▀▀████▄▄▀▀███████
▀███▄▄███▀░░░▀▀████▄▄▄███▀
▀▀████▀▀████████▀▀████▀▀
aplistir
Full Member
***
Offline Offline

Activity: 378
Merit: 197



View Profile
November 02, 2018, 10:44:39 PM
 #4

The longer answer, is that the newer HD versions of Bitcoin Core (bitcoin-qt) randomly generate a "seed" that wallet addresses (receive and change) are generated from. As bob123 has noted, if you imported your private key and then created a transaction without manually specifying a change address, Bitcoin Core will have used one of the change addresses generated from the random seed.

Interesting. 
In that case Electrum handles paper wallets better. If you use a paper wallet in Electrum, it uses your paper wallet address as change address too, because you have not specified any other addresses or seeds.

Really surprising that core can't do the same.

To the OP: Sorry for your lost, but thanks for warning others.

My Address: 121f7zb2U4g9iM4MiJTDhEzqeZGHzq5wLh
HCP
Legendary
*
Offline Offline

Activity: 2086
Merit: 4316

<insert witty quote here>


View Profile
November 03, 2018, 03:17:48 AM
 #5

Interesting. 
In that case Electrum handles paper wallets better. If you use a paper wallet in Electrum, it uses your paper wallet address as change address too, because you have not specified any other addresses or seeds.
Exactly... because to use your paper wallet in Electrum, you have to create a completely new wallet.


Quote
Really surprising that core can't do the same.
Theoretically you could do the same thing with Core... It just requires a bit of manual work (ie. specifying the change address instead of taking whatever default it uses)... also, one of the basic tenants of Bitcoin Core seems to be that one should never delete .wallet files... I guess this case is a prime example of why. Undecided

█████████████████████████
████▐██▄█████████████████
████▐██████▄▄▄███████████
████▐████▄█████▄▄████████
████▐█████▀▀▀▀▀███▄██████
████▐███▀████████████████
████▐█████████▄█████▌████
████▐██▌█████▀██████▌████
████▐██████████▀████▌████
█████▀███▄█████▄███▀█████
███████▀█████████▀███████
██████████▀███▀██████████
█████████████████████████
.
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!