Bitcoin Forum
June 26, 2024, 12:01:29 AM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: Bitcoin Core - Loss of privacy when encrypting your wallet for the first time?  (Read 191 times)
singlethread (OP)
Newbie
*
Offline Offline

Activity: 3
Merit: 2


View Profile
May 06, 2019, 05:27:45 AM
Merited by vapourminer (1), ABCbits (1)
 #1

So I was thinking. I just encrypted my wallet for the first time and the file size cut about in half. I am assuming this is due to some sort of compression in the encryption stage, but it causes a possible loss of privacy by doing this.

Say I have an unencrypted wallet of 50mb and it turns to 25mb when encrypted. What happens to the other 25mb of unencrypted wallet file that's left on the hard drive? Couldn't a data recovery specialist recover these keys unencrypted?

Sorry if I am being ignorant and thanks for any input.

Edit: unless the encryption is done before the compression.. Duh lol
singlethread (OP)
Newbie
*
Offline Offline

Activity: 3
Merit: 2


View Profile
May 06, 2019, 06:23:42 AM
 #2

I don't know about 25MB of leftover file, but AFAIK after you encrypt your Bitcoin Core wallet, you will use different private key/master private key.
If you encrypt your wallet before you made any transaction or receive coins from address which created before the wallet is encrypted, you have nothing to worry.

Right. And 25mb is a random example.

But what if you've imported a bunch of keys prior to encrypting? Then each individual key is contained unencrypted in the wallet.dat file, no? Does importing keys into an already encrypted wallet prevent the unencrypted keys from betting written to the drive?
bob123
Legendary
*
Offline Offline

Activity: 1624
Merit: 2481



View Profile WWW
May 06, 2019, 07:07:45 AM
 #3

But what if you've imported a bunch of keys prior to encrypting? Then each individual key is contained unencrypted in the wallet.dat file, no?
Does importing keys into an already encrypted wallet prevent the unencrypted keys from betting written to the drive?

No, imported keys are also encrypted.
There is no unencrypted (sensitive) information anywhere on your harddrive left after encrypting your wallet file.

Just make sure to backup your wallet file after encrypting / importing keys.

Sensitive information is just accessible unencrypted when your wallet is unlocked (master key stored in RAM).

singlethread (OP)
Newbie
*
Offline Offline

Activity: 3
Merit: 2


View Profile
May 06, 2019, 07:43:46 AM
 #4

Ok cheers, thanks!
achow101
Moderator
Legendary
*
Offline Offline

Activity: 3430
Merit: 6720


Just writing some code


View Profile WWW
May 06, 2019, 02:28:20 PM
Merited by Foxpup (3), bones261 (2), HeRetiK (1), ABCbits (1)
 #5

So I was thinking. I just encrypted my wallet for the first time and the file size cut about in half. I am assuming this is due to some sort of compression in the encryption stage, but it causes a possible loss of privacy by doing this.

Say I have an unencrypted wallet of 50mb and it turns to 25mb when encrypted. What happens to the other 25mb of unencrypted wallet file that's left on the hard drive? Couldn't a data recovery specialist recover these keys unencrypted?

Sorry if I am being ignorant and thanks for any input.

Edit: unless the encryption is done before the compression.. Duh lol
The other 25mb of data is not private key data.

The reason you see a size reduction is actually not because of compression. When your wallet is unencrypted, the private key format is much larger for backwards compatibility reasons. In the original Bitcoin client, private keys were stored as OpenSSL serialized them. This serialization included things like curve parameters and the uncompressed public key for that private key. This information is redundant and completely unnecessary, but has to be serialized for backwards compatibility reasons. When you encrypt the wallet, the private key that gets encrypted no longer contains all of that unnecessary information, it just contains the private key itself. This is much smaller even when encrypted , and since it happens to every single private key, a lot of space is saved.

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!