Bitcoin Forum
April 24, 2024, 09:54:52 PM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: Question about wallet encryption for new wallets  (Read 1480 times)
CIYAM (OP)
Legendary
*
Offline Offline

Activity: 1890
Merit: 1075


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
Bitcoin addresses contain a checksum, so it is very unlikely that mistyping an address will cause you to lose money.
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction.
1713995692
Hero Member
*
Offline Offline

Posts: 1713995692

View Profile Personal Message (Offline)

Ignore
1713995692
Reply with quote  #2

1713995692
Report to moderator
1713995692
Hero Member
*
Offline Offline

Posts: 1713995692

View Profile Personal Message (Offline)

Ignore
1713995692
Reply with quote  #2

1713995692
Report to moderator
1713995692
Hero Member
*
Offline Offline

Posts: 1713995692

View Profile Personal Message (Offline)

Ignore
1713995692
Reply with quote  #2

1713995692
Report to moderator
Stephen Gornick
Legendary
*
Offline Offline

Activity: 2506
Merit: 1010


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

Unichange.me

            █
            █
            █
            █
            █
            █
            █
            █
            █
            █
            █
            █
            █
            █
            █
            █


CIYAM (OP)
Legendary
*
Offline Offline

Activity: 1890
Merit: 1075


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: 1512
Merit: 1025



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: 2506
Merit: 1010


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

Unichange.me

            █
            █
            █
            █
            █
            █
            █
            █
            █
            █
            █
            █
            █
            █
            █
            █


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!