Saturday, May 30, 2009

Deleting vs Securely Deleting

I listened to a NPR story "How To Erase Old Hard Drives Without A Drill Bit" by Skye Rohde (yeah, I'm behind on my podcasts). I thought the story did a good job on the subject, but only touched on the issue of deleting vs securely deleting files and what that means, so I thought I'd discuss that a bit.

Backing up, the basic problem is you have a computer you either want to dispose of, sell to someone, or donate to your favorite charity ("reuse" is always good!). But you've got various personal information on that computer, credit card numbers, personal correspondance, home movies, photos, etc. that you want to get rid of before you do so.

So why not just delete those first?

Well to put it simply: deleting files on a computer doesn't really delete them.

It's legitimate to say "huh?" at this point.

The easiest way I've found to explain this is to think of files on a computer like chapters in a book: there is the chapter itself with all the text, analogous to the data in the file, and there there is a entry for the chapter in the table of contents, in technical terms, a reference to the data.

When you delete the file, it's analogous to deleting the entry for the chapter in the table of contents. While it looks like the chapter is gone, it's still on the pages and if someone goes flipping through the book they can find the text. Similarly when deleting a file, you just delete the reference to the file, someone with the right tools can go looking through the hard drive and find the data.

A "secure delete" on the other hand not only deletes the entry from the table of contents, it goes to the pages with the chapter and wipes those pages clean of any data. In other words, it actually makes sure the data itself is deleted, not just any references to the file.

Granted if you do a normal delete, eventually the data will get overwritten as the computer reclaims the space as you write new files to replace it, but this is a unpredictable process. It could happen tomorrow, or could still not be done a year from now.

If my explanation doesn't work for you, there are certainly many others on the net. One I found that I like is LifeHacker's post on "Properly Erase Your Physical Media".

So how do you go about securely deleting files?

Unfortunately, as mentioned in the NPR story, it's not always straight forward. Here are some links to software or methods that I've found useful. Note that these are all assuming you are deleting individual files as opposed to wiping (or formatting) the whole disk, which is more complicated and a topic for another post.
  • Macintosh computers have the ability to securely delete built in
  • For Windows systems there is software such as SDelete
  • For Linx there software such as srm (also works for Mac)
And of course, if you aren't planning on having the drive be reusable, you can apply the physical methods to the drive they mention in the story - take it apart and break the platters (the round things in the drive the data is actually written on) or drill a hole through the drive.

Frankly, unless you think the NSA is interested in your data for some reason, just taking the drive apart and scattering the platters into different trash cans should do it - that will make the job of reconstructing the data more complicated than all but the most dedicated privacy thief is interested in.