Bitcoin Forum
November 09, 2024, 11:18:06 AM *
News: Latest Bitcoin Core release: 28.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: BTC balance of old unencrypted wallet still remains??  (Read 725 times)
haploid23 (OP)
Legendary
*
Offline Offline

Activity: 812
Merit: 1002



View Profile WWW
March 06, 2014, 09:46:31 AM
 #1

I'm using the official Bitcoin-Qt client and I used the built in function to encrypt the wallet. My understanding is that after the wallet.dat file is encrypted, all old pool of unused private keys are deleted. This essentially means that any old unencrypted backups of the wallet.dat file are useless.

However, just for testing purposes, a small amount of btc was sent to the new encrypted wallet, then I imported an old unencrypted wallet.dat file into the bitcoin-Qt client. The btc balance still shows up in the old unencrypted wallet. Why is this so? Can btc in this old unencrypted wallet still be spent?

Rannasha
Hero Member
*****
Offline Offline

Activity: 728
Merit: 500


View Profile
March 06, 2014, 09:54:58 AM
 #2

I'm using the official Bitcoin-Qt client and I used the built in function to encrypt the wallet. My understanding is that after the wallet.dat file is encrypted, all old pool of unused private keys are deleted. This essentially means that any old unencrypted backups of the wallet.dat file are useless.

However, just for testing purposes, a small amount of btc was sent to the new encrypted wallet, then I imported an old unencrypted wallet.dat file into the bitcoin-Qt client. The btc balance still shows up in the old unencrypted wallet. Why is this so? Can btc in this old unencrypted wallet still be spent?

It is important to realize that a wallet doesn't contain any bitcoins. It contains private keys that let you spend bitcoins associated with the addresses that represent these keys.

If your unencrypted backup contains keys that correspond to addresses to which you later transfer coins, then that backup can still be used to spend said coins.
goatpig
Legendary
*
Offline Offline

Activity: 3752
Merit: 1364

Armory Developer


View Profile
March 06, 2014, 02:00:19 PM
 #3

Can the BTC be spent from old wallet: Most likely yes. Last time I checked, BitcoinQt maintains full wallets, meaning if you have the public key to see certain funds, you also have the private key to spend them.

As for how that happened: I'm not privy of the core client mechanics, but 2 possibilities come to mind:

1) Your assumption is wrong, or
2) You encrypted your wallet in a state where BitcoinQt could not determine which private keys were in use. Again this is speculation on my part, but if BitcoinQt can't tell whether a private key is in use or not (let's say, while it is updating the blockchain), it is safe to expect the client would refrain from deleting any private key.

dbbit
Sr. Member
****
Offline Offline

Activity: 322
Merit: 250


View Profile
March 06, 2014, 04:02:57 PM
Last edit: March 06, 2014, 05:27:52 PM by dbbit
 #4

This essentially means that any old unencrypted backups of the wallet.dat file are useless.

No, your understanding is wrong. The Encrypt wallet isn't a function of the blockchain, it's a function of the local wallet.

The encrypted wallet just lets you use your live wallet a bit more securely. If you still have an unencrypted backup of that wallet around, it's still as vulnerable as it ever has been.


Similarly, if you lose a USB stick containing an unencrypted wallet, you cannot suddenly mitigate the damage by taking a backup file and encrypting that.
DannyHamilton
Legendary
*
Offline Offline

Activity: 3486
Merit: 4832



View Profile
March 07, 2014, 12:04:37 AM
 #5

The unused 100 addresses in the unused address pool are deleted and a new pool of 100 addresses are created and added to the pool after encrypting with a password.

However,  any address in the "Receive" tab of the wallet is NOT part of the 100 addresses in the unused address pool.

I suspect that you sent the payment to an address that was already part of the "Receive" tab before you encrypted the wallet.  Therefore, that address (and its private key) are already a part of the unencrypted wallet.  As such, any bitcoins that are sent to any addresses that exist in the unencrypted wallet, and still accessible from the unencrypted wallet.
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!