Bitcoin Forum
May 07, 2024, 10:59:32 PM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: how is this wallet encryption done ?  (Read 1121 times)
bracek (OP)
Hero Member
*****
Offline Offline

Activity: 530
Merit: 500


View Profile
October 13, 2011, 11:02:05 PM
 #1

I installed version 4.0,
downloaded block chain,
encrypted wallet,
sent coins into it,
all works well.


when I first installed bitcoin,
wallet was created and not yet encrypted, so my question is :
was it deleted and replaced with encrypted one ?
My worry is that my keys are maybe left somewhere on disc unencrypted.
1715122772
Hero Member
*
Offline Offline

Posts: 1715122772

View Profile Personal Message (Offline)

Ignore
1715122772
Reply with quote  #2

1715122772
Report to moderator
1715122772
Hero Member
*
Offline Offline

Posts: 1715122772

View Profile Personal Message (Offline)

Ignore
1715122772
Reply with quote  #2

1715122772
Report to moderator
1715122772
Hero Member
*
Offline Offline

Posts: 1715122772

View Profile Personal Message (Offline)

Ignore
1715122772
Reply with quote  #2

1715122772
Report to moderator
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction.
1715122772
Hero Member
*
Offline Offline

Posts: 1715122772

View Profile Personal Message (Offline)

Ignore
1715122772
Reply with quote  #2

1715122772
Report to moderator
FreeMoney
Legendary
*
Offline Offline

Activity: 1246
Merit: 1014


Strength in numbers


View Profile WWW
October 14, 2011, 05:33:19 AM
 #2

I was wondering about this too. Generally is writing over a file a reasonable way to delete the original? I assume not. Can users do anything to make the original more gone?

Play Bitcoin Poker at sealswithclubs.eu. We're active and open to everyone.
bracek (OP)
Hero Member
*****
Offline Offline

Activity: 530
Merit: 500


View Profile
October 14, 2011, 01:17:59 PM
 #3

?
memvola
Hero Member
*****
Offline Offline

Activity: 938
Merit: 1002


View Profile
October 14, 2011, 02:15:20 PM
 #4

I was wondering about this too. Generally is writing over a file a reasonable way to delete the original? I assume not. Can users do anything to make the original more gone?

I superficially skimmed through the code and it seems like the wallet is getting overwritten (someone correct me if I missed something). Since the new wallet is not shorter, it's fairly certain that clear data is completely gone. You can trust that writing over a file on a hard drive is good enough. This might not be the case for flash drives though.
ovidiusoft
Sr. Member
****
Offline Offline

Activity: 252
Merit: 250


View Profile
October 14, 2011, 02:59:53 PM
 #5

Overwriting a file is not a guarantee that the data on disk was actually written over. Think about flash disks and SSD's who do wear leveling. Some filesystems will also move blocks on the fly.

If you are concerned that a unencrypted file might still be somewhere on the disk you should backup your data, wipe your disk (a few times), reinstall the operating system and enable disk encryption. Then restore your wallet from the backup.

On the other hand, if someone has physical access to your hard disk there are other ways to compromise your files, so I wouldn't worry about it...
etotheipi
Legendary
*
expert
Offline Offline

Activity: 1428
Merit: 1093


Core Armory Developer


View Profile WWW
October 14, 2011, 07:06:55 PM
 #6

Unfortunately, many journaled filesystems do not guarantee that overwriting files will actually write data to the original location on disk.  Just do a search on "shred" with ext3 or reiserfs -- the point of "shred" is to overwrite a block of harddisk N times (default 25) to obfuscate attempts to read it later, but frequently the filesystem will execute the write commands on different blocks, leading the old ones intact.

SSDs also move data around like this, but it is actually not a problem.  The wear-leveling guarantees it's always moving data around, and purging old sectors to improve performance.  Because it's a different kind of storage, it's not recoverable the same way.  See this article:  http://news.techworld.com/security/3263093/ssd-fimware-destroys-digital-evidence-researchers-find/ .  Apparently digital forensics experts are finding it impossible to recover data from SSDs.

Founder and CEO of Armory Technologies, Inc.
Armory Bitcoin Wallet: Bringing cold storage to the average user!
Only use Armory software signed by the Armory Offline Signing Key (0x98832223)

Please donate to the Armory project by clicking here!    (or donate directly via 1QBDLYTDFHHZAABYSKGKPWKLSXZWCCJQBX -- yes, it's a real address!)
pointbiz
Sr. Member
****
Offline Offline

Activity: 437
Merit: 415

1ninja


View Profile
October 15, 2011, 03:04:56 AM
 #7

You could download TrueCrypt, create an encrypted file and mount it as a drive. Run Bitcoin with a command line option to use a different wallet folder and point that to a folder on the TrueCrypt drive. It should create a new wallet.dat for you on your TrueCrypt drive and then you can send money from your old wallet to you new wallet.

Coder of: https://www.bitaddress.org      Thread
Open Source JavaScript Client-Side Bitcoin Wallet Generator
Donations: 1NiNja1bUmhSoTXozBRBEtR8LeF9TGbZBN   PGP
memvola
Hero Member
*****
Offline Offline

Activity: 938
Merit: 1002


View Profile
October 15, 2011, 06:53:25 AM
Last edit: October 15, 2011, 07:05:35 AM by memvola
 #8

Unfortunately, many journaled filesystems do not guarantee that overwriting files will actually write data to the original location on disk.

I didn't know journaled file systems did that for already open files, but it makes sense. I thought overwriting would be good enough, but I stand corrected. (EDIT: I guess it depends on how the db gets overwritten though.)

SSDs also move data around like this, but it is actually not a problem.

Thanks, it's a relief, though it's worth noting that concerns about journaled filesystems still apply for SSD's.

What about wiping free space by filling it with dd?

Code:
dd if=/dev/zero of=/home/myuser/.bitcoin/deleteme bs=1M ; sync ; rm /home/myuser/.bitcoin/deleteme

Or bcwipe?

Code:
bcwipe -Fvmz /home/myuser/.bitcoin/

EDIT: I'd trust dd more that bcwipe, since I know what it does. Smiley
etotheipi
Legendary
*
expert
Offline Offline

Activity: 1428
Merit: 1093


Core Armory Developer


View Profile WWW
October 15, 2011, 03:58:43 PM
 #9

If you read the article you'll see that SSDs are actually, constantly purging old sectors to improve performance, and that it's only a short time before the old data is completely destroyed.

From the article:
Quote
After examining an SSD for traces of data after it had been quick formatted, the team expected the purging routines to kick in around 30-60 minutes later, a process that must happen on SSDs before new data can be written to those blocks. To their surprise, this happened in only three minutes, after which only 1,064 out of 316,666 evidence files were recoverable from the drive.

This means that if you write your new encrypted wallet to disk, one of two things will happen:
(1) The data is overwritten in place :  GOOD
(2) The data is written to a different sector, but the old sector is purged within 3-60 minutes : GOOD

So you're really only vulnerable if someone steals your SSD within an hour of you encrypting your wallet.  By then, the data should be completely gone.

Founder and CEO of Armory Technologies, Inc.
Armory Bitcoin Wallet: Bringing cold storage to the average user!
Only use Armory software signed by the Armory Offline Signing Key (0x98832223)

Please donate to the Armory project by clicking here!    (or donate directly via 1QBDLYTDFHHZAABYSKGKPWKLSXZWCCJQBX -- yes, it's a real address!)
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!