Bitcoin Forum
December 10, 2016, 08:34:12 PM *
News: To be able to use the next phase of the beta forum software, please ensure that your email address is correct/functional.
 
   Home   Help Search Donate Login Register  
Pages: [1]
  Print  
Author Topic: Question about wallet encryption for new wallets  (Read 1287 times)
CIYAM
Legendary
*
Offline Offline

Activity: 1820


Ian Knowles - CIYAM Lead Developer


View Profile WWW
February 24, 2012, 03:23:38 AM
 #1

Just wondering about the wallet encryption and persistence when bitcoin-qt is started without a wallet (as in a new installation).

What I am wondering is whether "wallet.dat" gets persisted (with exclusive file access locking) with the private keys unencrypted before you actually enter the passphrase to encrypt or is the wallet information just held in memory until you shutdown the client?

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

GPG Public Key | 1ciyam3htJit1feGa26p2wQ4aw6KFTejU
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction. Advertise here.
1481402052
Hero Member
*
Offline Offline

Posts: 1481402052

View Profile Personal Message (Offline)

Ignore
1481402052
Reply with quote  #2

1481402052
Report to moderator
1481402052
Hero Member
*
Offline Offline

Posts: 1481402052

View Profile Personal Message (Offline)

Ignore
1481402052
Reply with quote  #2

1481402052
Report to moderator
1481402052
Hero Member
*
Offline Offline

Posts: 1481402052

View Profile Personal Message (Offline)

Ignore
1481402052
Reply with quote  #2

1481402052
Report to moderator
Stephen Gornick
Legendary
*
Offline Offline

Activity: 2002



View Profile
February 24, 2012, 05:04:21 AM
 #2

Just wondering about the wallet encryption and persistence when bitcoin-qt is started without a wallet (as in a new installation).

What I am wondering is whether "wallet.dat" gets persisted (with exclusive file access locking) with the private keys unencrypted before you actually enter the passphrase to encrypt or is the wallet information just held in memory until you shutdown the client?

Answered here:
"Bitcoin 0.5 will flush the key pool upon encryption. This means that when you encrypt a fresh wallet, none of its active reserve keys will ever have touched the disk in unencrypted form."
 - http://bitcoin.stackexchange.com/a/2016/153

CIYAM
Legendary
*
Offline Offline

Activity: 1820


Ian Knowles - CIYAM Lead Developer


View Profile WWW
February 24, 2012, 05:11:31 AM
 #3

Great - thanks for that (I assumed it should be the case but is much better to get some confirmation). Smiley

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

GPG Public Key | 1ciyam3htJit1feGa26p2wQ4aw6KFTejU
deepceleron
Legendary
*
Offline Offline

Activity: 1470



View Profile WWW
February 25, 2012, 11:56:18 AM
 #4

Note, that is the keypool of unused keys for future use; any address shown to you in the interface or that has received coins as change is kept when the new encrypted wallet is created, and those private keys may still be floating around on disk sectors and deleted files.

Stephen Gornick
Legendary
*
Offline Offline

Activity: 2002



View Profile
February 25, 2012, 05:36:01 PM
 #5

Note, that is the keypool of unused keys for future use; any address shown to you in the interface or that has received coins as change is kept when the new encrypted wallet is created, and those private keys may still be floating around on disk sectors and deleted files.

The OP's question had to do with new wallets (with no coins yet).  

But for a used wallet then you are correct.  When you encrypt a wallet, all the unused keys become marked as used so those aren't a concern.  For addresses that are used, however (e.g., received and not spent, or used for receiving change) then the release notes for bitcoin-qt v0.5.0 specify the solution to that:

  Send all of your bitcoins to yourself using a new bitcoin address.   Don't re-use any addresses generated before wallet encryption was enabled.

 - http://bitcoin.org/releases/2011/11/21/v0.5.0.html

Pages: [1]
  Print  
 
Jump to:  

Sponsored by , a Bitcoin-accepting VPN.
Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!