r/technology • • Jan 17 '09

Secure deletion: a single overwrite will do it

http://www.heise-online.co.uk/news/Secure-deletion-a-single-overwrite-will-do-it--/112432
45 Upvotes

23 comments sorted by

5

u/G_Morgan Jan 17 '09

A more important issue is the fact that writing over a file will not blast your journals.

5

u/[deleted] Jan 17 '09

Only for hard drives. For flash drives with wear-leveling, data will NOT be overwritten unless you have low-level access to the chips themselves.

On a file-level, Hard drives will wipe the original data. SSD will not.

However, Zeroing-out the entire device, SSD or HD, will work.

2

u/HenkPoley Jan 17 '09 edited Jan 17 '09

Even on harddisks you are not safe. Most modern file systems will allocate new (other) blocks when you try to overwrite the contents of a file. Deleting the file, and then overwriting al the free space, is about the only option that really works.

4

u/[deleted] Jan 17 '09 edited Jan 17 '09

Once a week or so all I do is dd "random" data into a single large file, then delete that file:

dd if=/dev/urandom of=scrub bs=10240000 ; rm scrub

I do this, of course, after I delete all my caches, empty my trashes, and move any newly downloaded sensitive data into an encrypted disk image.

4

u/Filmore Jan 18 '09

If you make your block size the same size as your hard-drive cache, or maybe half of your hard drive cache, I postulate you'll see the operation finish quicker.

4

u/[deleted] Jan 18 '09

I actually should have thought of that. I'll time some dd with progressively bigger block sizes (including whatever the cache size is for my drive)later tonight when my system isn't busy and post my results. Thanks!

2

u/[deleted] Jan 20 '09

Hardware: Macbook (1.8ghz core2duo, 1.5g ram, Toshiba mk1234gsx sata drive with 8mb cache).

Method: logged in as >console, so that the GUI was disabled. command is "time dd if=/dev/zero of=file bs=N count=32" where N is x*1048576 ; x:={1, 2, 3, ... 10}

The rates sat at about 32 megabytes/sec until we got to a BS multiplier of 9, then dropped to 29 meg/sec, then 28 for 10.

I ran it again with a count of 64 and rates were between 20 and 25 meg/sec, peaking with a BS multiplier of 8 (where BS = cache size) at 28. BS multiplier of 9 ran at 33 meg/sec and 10 at 32 meg/sec.

This is not as deterministic as I think it should be, and I think that I'll boot into single user mode, where spotlight is not running, and try again at some point in the future. I ran both multiple times and rates were pretty much all over the place. The larger block sizes DO seem to run faster, but only above the cache size of the disk. In other words the "sweet spot" for BS seems to be bigger, not equal to, the cache size. I think that this might be worth some more formal testing, maybe with a C program instead of dd.

1

u/HenkPoley Jan 17 '09 edited Jan 17 '09

The sensible thing to do. For extra added paranoia, rebuild the filesystem datastructures (fsck.reiserfs can do that, afaik). Old filenames might lurk in there, like in the journals (as mentioned by G_Morgan).

Not that I do any of these things. Just making sure I mentioned it in case you need to rely on it :-P

2

u/[deleted] Jan 17 '09

If I were a paranoid man, I would just dd down a 20 gig file and use plan9ports to stand up a Venti, then encrypt that and its associated index file. :)

3

u/HenkPoley Jan 17 '09

A venti.. Pff in the last 20 days my laptop wrote 183 GB. No way I can maintain a non-compacting (write once) log-based filesystem.

But then I don't really have the need for such a lifestyle.

4

u/[deleted] Jan 18 '09

See, I am the exact opposite. My "stuff", that is to say my professional output, toolset, and data that is worth keeping, can probably fill a 9gb disk. I have media, but I really don't care about media and don't consider it part of my storage footprint. I am not really interested in protecting media, just my "stuff". :) one upvote for knowing what Venti is. :)

3

u/HenkPoley Jan 18 '09

You should be a aware that such a Venti filesystem will keep all changes, so those 9GB will multiply. Only one changed byte will need a new block.

2

u/[deleted] Jan 18 '09

yup yup, I have been using Plan 9 on and off since release 2. :)

4

u/Captain_Harlock Jan 17 '09

secure deletion: thermite will do it

1

u/[deleted] Jan 17 '09

I prefer a magazine filled with 30 SS109 :)

3

u/[deleted] Jan 17 '09

That's what they want you to think.

0

u/noroom Jan 18 '09

2

u/[deleted] Jan 18 '09 edited Jan 18 '09

Let's say that recovering the data after a single wipe is possible. Doing so would require training and pricey equipment. No way in hell would a company do so for $500 and some meaningless title from some no-name website.

2

u/noroom Jan 18 '09

Maybe it's possible to see it as an investment.

1

u/[deleted] Jan 18 '09

I don't find that credible. At least one overwrite with random data (that fills up the device), even though I agree, multiple is probably a waste of time.

0

u/ModernRonin Jan 17 '09 edited Jan 17 '09

I think I'll stick with triple-overwrite (0's, 1's, random). I can't detect any time difference between that and a single over-write on anything but really huge files.