Bitcoin Forum
June 28, 2024, 09:47:28 PM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1] 2 3 »  All
  Print  
Author Topic: Can the encrypted wallet be recovered using the unencrypted?  (Read 7297 times)
sethsethseth (OP)
Sr. Member
****
Offline Offline

Activity: 257
Merit: 250


Not trusting third parties with my private keys


View Profile
September 20, 2012, 06:24:46 AM
 #1

Here is what happened:

Made new wallet using satoshi client on windows 7
Made a backup
Sent a large amount of bitcoins to it
Realized the wallet wasn't encrypted, and encrypted it
Apparently did not back up the encrypted wallet
Made a few tx using the encrypted wallet, causing the balance to get sent as change to an address on the encrypted version
Got laptop stolen
Spent the last couple days trying to figure out why the backup wallet had a zero balance and couldn't see the change that had come back to it in the next tx

Hoping it is possible to replicate the process and recover the encrypted version.  There are enough bitcoins on this wallet to put a huge amount of work into recovering them.  I would guess that the encryption process is repeatable, but if there are any random factors in the new generation of 100 addresses, I am screwed.

SealsWithClubs poker room has  over 400 players online. Buy in from .01 to 60btc.      BTCSportsMatch lets you bet sports with vig free lines!  Best kept secret in bitcoin....          LocalBitcoins.com is very user-friendly now for bank transfers.  You don't have to live close to trade when in the same currency area.           
Electrum client is awesome. Try it. And please stop sending bitcoins to sites run by security newbies, or don't complain when you lose everything.
Revalin
Hero Member
*****
Offline Offline

Activity: 728
Merit: 500


165YUuQUWhBz3d27iXKxRiazQnjEtJNG9g


View Profile
September 20, 2012, 06:28:22 AM
 #2

Yes, your coins are probably still there.  The client pre-generates a bunch of addresses for change, so it's likely all there.

Shut it down and rerun it in a cmd window: "bitcoin-qt.exe -rescan".

      War is God's way of teaching Americans geography.  --Ambrose Bierce
Bitcoin is the Devil's way of teaching geeks economics.  --Revalin 165YUuQUWhBz3d27iXKxRiazQnjEtJNG9g
CIYAM
Legendary
*
Offline Offline

Activity: 1890
Merit: 1078


Ian Knowles - CIYAM Lead Developer


View Profile WWW
September 20, 2012, 06:30:47 AM
 #3

Any change addresses that had been used prior to the encryption will still be present (otherwise the encrypted wallet would not be able to find those funds) it is only those addresses in the key pool that were unused (as far as the client could tell at that time) will have been discarded so as per Revalin's advice do a rescan and all should be good.

With CIYAM anyone can create 100% generated C++ web applications in literally minutes.

GPG Public Key | 1ciyam3htJit1feGa26p2wQ4aw6KFTejU
sethsethseth (OP)
Sr. Member
****
Offline Offline

Activity: 257
Merit: 250


Not trusting third parties with my private keys


View Profile
September 20, 2012, 06:31:43 AM
 #4

edited OP to state that I made tx after I encrypted the wallet

SealsWithClubs poker room has  over 400 players online. Buy in from .01 to 60btc.      BTCSportsMatch lets you bet sports with vig free lines!  Best kept secret in bitcoin....          LocalBitcoins.com is very user-friendly now for bank transfers.  You don't have to live close to trade when in the same currency area.           
Electrum client is awesome. Try it. And please stop sending bitcoins to sites run by security newbies, or don't complain when you lose everything.
CIYAM
Legendary
*
Offline Offline

Activity: 1890
Merit: 1078


Ian Knowles - CIYAM Lead Developer


View Profile WWW
September 20, 2012, 06:34:10 AM
 #5

edited OP to state that I made tx after I encrypted the wallet

In that case unfortunately you really have a problem as the unused addresses in the original backed up key pool were discarded when the wallet was encrypted (and re-encrypting the backup with the same password won't help as am pretty sure the addresses will be random).

With CIYAM anyone can create 100% generated C++ web applications in literally minutes.

GPG Public Key | 1ciyam3htJit1feGa26p2wQ4aw6KFTejU
Revalin
Hero Member
*****
Offline Offline

Activity: 728
Merit: 500


165YUuQUWhBz3d27iXKxRiazQnjEtJNG9g


View Profile
September 20, 2012, 06:36:11 AM
 #6

Ouch, I wasn't aware of that - why would it throw away the pool?

      War is God's way of teaching Americans geography.  --Ambrose Bierce
Bitcoin is the Devil's way of teaching geeks economics.  --Revalin 165YUuQUWhBz3d27iXKxRiazQnjEtJNG9g
CIYAM
Legendary
*
Offline Offline

Activity: 1890
Merit: 1078


Ian Knowles - CIYAM Lead Developer


View Profile WWW
September 20, 2012, 06:38:26 AM
 #7

Ouch, I wasn't aware of that - why would it throw away the pool?

Ironically (for the OP) this is done just in case someone managed to get a copy of the unencrypted wallet.

With CIYAM anyone can create 100% generated C++ web applications in literally minutes.

GPG Public Key | 1ciyam3htJit1feGa26p2wQ4aw6KFTejU
sethsethseth (OP)
Sr. Member
****
Offline Offline

Activity: 257
Merit: 250


Not trusting third parties with my private keys


View Profile
September 20, 2012, 07:05:26 AM
 #8

Something needs to be changed if I really can't get these coins back.  It is reasonable for me to think that if I have an unencrypted file, back it up, and then encrypt one of them, that I can derive the encrypted version from the unencrypted one if I know the password.  There should be a warning in there somewhere.  I am sick over losing this many coins.

SealsWithClubs poker room has  over 400 players online. Buy in from .01 to 60btc.      BTCSportsMatch lets you bet sports with vig free lines!  Best kept secret in bitcoin....          LocalBitcoins.com is very user-friendly now for bank transfers.  You don't have to live close to trade when in the same currency area.           
Electrum client is awesome. Try it. And please stop sending bitcoins to sites run by security newbies, or don't complain when you lose everything.
CIYAM
Legendary
*
Offline Offline

Activity: 1890
Merit: 1078


Ian Knowles - CIYAM Lead Developer


View Profile WWW
September 20, 2012, 07:11:42 AM
 #9

This type of recovery is possible with deterministic wallets but AFAIA the Satoshi client doesn't support this.

Sorry to give you such bad news (and would be happily corrected if I've got anything wrong).

One thing that probably should be added to the Satoshi client is a message to tell you to backup your wallet as soon as you have encrypted it.

With CIYAM anyone can create 100% generated C++ web applications in literally minutes.

GPG Public Key | 1ciyam3htJit1feGa26p2wQ4aw6KFTejU
sethsethseth (OP)
Sr. Member
****
Offline Offline

Activity: 257
Merit: 250


Not trusting third parties with my private keys


View Profile
September 20, 2012, 07:46:14 AM
 #10

It is remotely possible there is a deleted version of the encrypted backup on a thumb drive, if someone can recommend a program to unerase....

SealsWithClubs poker room has  over 400 players online. Buy in from .01 to 60btc.      BTCSportsMatch lets you bet sports with vig free lines!  Best kept secret in bitcoin....          LocalBitcoins.com is very user-friendly now for bank transfers.  You don't have to live close to trade when in the same currency area.           
Electrum client is awesome. Try it. And please stop sending bitcoins to sites run by security newbies, or don't complain when you lose everything.
CIYAM
Legendary
*
Offline Offline

Activity: 1890
Merit: 1078


Ian Knowles - CIYAM Lead Developer


View Profile WWW
September 20, 2012, 07:54:34 AM
 #11

That's great - be sure not to copy any new files to it before using file recovery software.

You could try this software: http://www.nchsoftware.com/data-recovery/index.html?gclid=CM3ktL3Ww7ICFS5U4godHhkA4w

(I haven't used it myself though so can't personally recommend it)

With CIYAM anyone can create 100% generated C++ web applications in literally minutes.

GPG Public Key | 1ciyam3htJit1feGa26p2wQ4aw6KFTejU
scintill
Sr. Member
****
Offline Offline

Activity: 448
Merit: 254


View Profile WWW
September 20, 2012, 08:08:54 AM
 #12

Some topics that might help (recovering using hex editor from raw disk image):
https://bitcointalk.org/index.php?topic=14698.0
https://bitcointalk.org/index.php?topic=7116.0
https://bitcointalk.org/index.php?topic=8274.0
https://bitcointalk.org/index.php?topic=25091.0

I say might because none of them seem to indicate if this works for encrypted wallets.  Good luck!

1SCiN5kqkAbxxwesKMsH9GvyWnWP5YK2W | donations
flatfly
Legendary
*
Offline Offline

Activity: 1078
Merit: 1016

760930


View Profile
September 20, 2012, 08:29:33 AM
 #13

It is remotely possible there is a deleted version of the encrypted backup on a thumb drive, if someone can recommend a program to unerase....

I can vouch for tokiwa datarecovery, it's free and fantastic. Saved my ass many times.

http://tokiwa.qee.jp/EN/dr.html
Puppet
Legendary
*
Offline Offline

Activity: 980
Merit: 1040


View Profile
September 20, 2012, 09:06:13 AM
 #14

It is remotely possible there is a deleted version of the encrypted backup on a thumb drive, if someone can recommend a program to unerase....

If you didnt overwrite that space, there is a very good chance of being able to recover it. Use testdisk:
http://www.cgsecurity.org/wiki/TestDisk

I would also advice you to make a copy of the drive first. Not a regular copy of course, but using dd under linux so you copy "every bit" of the drive.
Boot linux and run

dd if=/dev/yourusbdrive of=backup.dat

That way if you mess up the undelete, nothing is lost and you can try again.
Remember remember the 5th of November
Legendary
*
Offline Offline

Activity: 1862
Merit: 1011

Reverse engineer from time to time


View Profile
September 20, 2012, 09:48:04 AM
 #15

Well this is what happens when people mindlessly encrypt their wallets. Obviously better safe than sorry, but again, this is what happens when people mindlessly encrypt their wallets.

BTC:1AiCRMxgf1ptVQwx6hDuKMu4f7F27QmJC2
JoelKatz
Legendary
*
Offline Offline

Activity: 1596
Merit: 1012


Democracy is vulnerable to a 51% attack.


View Profile WWW
September 20, 2012, 09:54:35 AM
 #16

Ironically (for the OP) this is done just in case someone managed to get a copy of the unencrypted wallet.
Typically, this is what a user would want. The reason you opt to encrypt the wallet is to prevent someone from being able to get your coins without knowing the key to decrypt the wallet. It is generally understood that your coins are only assuredly protected if you backup your wallet after your last transaction.

However, I 100% firmly believe that non-deterministic wallets should be abandoned entirely as a failed experiment. Perhaps they should be left as an option with clear warnings about their problems.

People keep losing their money and it's getting ridiculous. One of the biggest problems with Bitcoin is it's damn near impossible to use it safely.

I am an employee of Ripple. Follow me on Twitter @JoelKatz
1Joe1Katzci1rFcsr9HH7SLuHVnDy2aihZ BM-NBM3FRExVJSJJamV9ccgyWvQfratUHgN
caveden
Legendary
*
Offline Offline

Activity: 1106
Merit: 1004



View Profile
September 20, 2012, 10:04:32 AM
 #17

However, I 100% firmly believe that non-deterministic wallets should be abandoned entirely as a failed experiment. Perhaps they should be left as an option with clear warnings about their problems.

+1

While the Satoshi client doesn't use deterministic wallets, an alternative for its users would be to have the wallet.dat be a symbolic link towards a safe backup account, like Wuala for example.
This way your backup is updated on real-time.

People keep losing their money and it's getting ridiculous. One of the biggest problems with Bitcoin is it's damn near impossible to use it safely.

You use strong words, but yeah, you have to understand in details how things work to be safe. We cannot expect that of most people. I still don't recommend my parents for example, to store wealth in bitcoins. And they're not totally computer-illiterate, they know how to send e-mails, to chat, to use facebook and watch youtube. My father even has a blog. Cheesy But I don't think they would be able to protect their keys. It's a pity.
JoelKatz
Legendary
*
Offline Offline

Activity: 1596
Merit: 1012


Democracy is vulnerable to a 51% attack.


View Profile WWW
September 20, 2012, 10:35:35 AM
 #18

You use strong words, but yeah, you have to understand in details how things work to be safe. We cannot expect that of most people. I still don't recommend my parents for example, to store wealth in bitcoins. And they're not totally computer-illiterate, they know how to send e-mails, to chat, to use facebook and watch youtube. My father even has a blog. Cheesy But I don't think they would be able to protect their keys. It's a pity.
I'm a computer security person, and I don't trust myself to keep a significant amount of money in Bitcoins. It's just too difficult to balance making sure you can always access the coins no matter what might go wrong with making sure others can never access them no matter what might go wrong.

I am an employee of Ripple. Follow me on Twitter @JoelKatz
1Joe1Katzci1rFcsr9HH7SLuHVnDy2aihZ BM-NBM3FRExVJSJJamV9ccgyWvQfratUHgN
bitvientiane
Newbie
*
Offline Offline

Activity: 44
Merit: 0


View Profile
September 20, 2012, 10:49:20 AM
 #19

I think at this point in time everybody's best bet is an electrum deterministic wallet, like Joel hinted at.
sethsethseth (OP)
Sr. Member
****
Offline Offline

Activity: 257
Merit: 250


Not trusting third parties with my private keys


View Profile
September 20, 2012, 10:58:49 PM
Last edit: September 21, 2012, 12:56:00 AM by sethsethseth
 #20

The reason you opt to encrypt the wallet is to prevent someone from being able to get your coins without knowing the key to decrypt the wallet.

However, I 100% firmly believe that non-deterministic wallets should be abandoned entirely as a failed experiment. Perhaps they should be left as an option with clear warnings about their problems.

It is generally understood that your coins are only assuredly protected if you backup your wallet after your last transaction.

This is absolutely not generally understood, and the main dev team should not assume this.  Multiple people with thousands of posts have told me that the wallet can always be recovered as long as you don't use more than 100 addresses on it after the backup.  The 100 address generation is the part that is generally understood.  The client should accommodate this view.  If I have the password, I should not be able to destroy the coins before 100 addresses if it is common knowledge that you cannot.  The new 100 keys should be able to be generated from the unencrypted ones if you have the password.



People keep losing their money and it's getting ridiculous. One of the biggest problems with Bitcoin is it's damn near impossible to use it safely.

You use strong words, but yeah, you have to understand in details how things work to be safe. We cannot expect that of most people. I still don't recommend my parents for example, to store wealth in bitcoins. And they're not totally computer-illiterate, they know how to send e-mails, to chat, to use facebook and watch youtube. My father even has a blog. Cheesy But I don't think they would be able to protect their keys. It's a pity.

I'm a computer security person, and I don't trust myself to keep a significant amount of money in Bitcoins. It's just too difficult to balance making sure you can always access the coins no matter what might go wrong with making sure others can never access them no matter what might go wrong.


A large part of the reason I think I did not back up as well as I should have is that I didn't want someone with access to the wallet file I was storing on the internet to be able to see the balance and transactions.  I always reencrypted the wallet file, making it more of a hassle to do a backup.  This may be a stupid line of thinking, but it may be helpful for devs to know this in making the client more user-friendly and secure.

I have spent several hours a day for the last two years reading the forums, and still made this error.  I knew it was risky to put them on my computer, but I thought with my knowledge of bitcoin it was less risky than keeping them online.  Obviously I was wrong.

That said, I had to make at least 4 catastrophic errors that are not at all logical to allow this to happen.  If I only made any 3 of these errors I would still have the coins:

Used a wallet with a huge balance as a main wallet to conduct tiny transactions on bitcoin-otc
Only backed up the wallet on dropbox.  Need to email, dropbox, and flash drive the backup
Left laptop in insecure location
Didn't do a wallet backup when I made an account on OTC a few days after encrypting the wallet.  There was a warning to do so.

I lost over 1300 btc.  Where does that put me on the loser's list of losses due to carelessness?

SealsWithClubs poker room has  over 400 players online. Buy in from .01 to 60btc.      BTCSportsMatch lets you bet sports with vig free lines!  Best kept secret in bitcoin....          LocalBitcoins.com is very user-friendly now for bank transfers.  You don't have to live close to trade when in the same currency area.           
Electrum client is awesome. Try it. And please stop sending bitcoins to sites run by security newbies, or don't complain when you lose everything.
Pages: [1] 2 3 »  All
  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!