views:

212

answers:

3

Is there a SDK that can be used in managed code to shred files securely?

EDIT: This is the only link i could find in google that helps me

EDIT: Either SDK or some kind of COM based component.

+2  A: 

This code from codeproject may be a good starting point.

Eraser has been around for years, you could call out to it by using System.Diagnostics.Process, or at least review the algorithm there.

Sam Saffron
+1  A: 

Check out a response I posted here for an implementation.

Jesse C. Slicer
+10  A: 

A pretty good article came out recently concerning this on proggit: Secure Deletion: A single overwrite will do it.

Leading forensic experts will able to recover a single bits original state after one rewrite with a 56% success rate. Considering you have a 50% success rate with pure random guessing, I don't think you have anything to be worried about.

The myth that to delete data really securely from a hard disk you have to overwrite it many times, using different patterns, has persisted for decades, despite the fact that even firms specialising in data recovery, openly admit that if a hard disk is overwritten with zeros just once, all of its data is irretrievably lost.

Craig Wright, a forensics expert, claims to have put this legend finally to rest. He and his colleagues ran a scientific study to take a close look at hard disks of various makes and different ages, overwriting their data under controlled conditions and then examining the magnetic surfaces with a magnetic-force microscope. They presented their paper at ICISS 2008 and it has been published by Springer AG in its Lecture Notes in Computer Science series (Craig Wright, Dave Kleiman, Shyaam Sundhar R. S.: Overwriting Hard Drive Data: The Great Wiping Controversy).

They concluded that, after a single overwrite of the data on a drive, whether it be an old 1-gigabyte disk or a current model (at the time of the study), the likelihood of still being able to reconstruct anything is practically zero. Well, OK, not quite: a single bit whose precise location is known can in fact be correctly reconstructed with 56 per cent probability (in one of the quoted examples). To recover a byte, however, correct head positioning would have to be precisely repeated eight times, and the probability of that is only 0.97 per cent. Recovering anything beyond a single byte is even less likely.

Simucal
Um.. This doesn't really answer the question that was asked.
Chris Pietschmann
@Chris Pietschmann, sometimes the best answer is "dont bother".
Simucal
Just a simple note about the multiple-overwrite theory. While it probably doesn't apply today, in the past with significantly older and slower hardware, a magnetic residual could be left on a hard drive platter that could be detected and data recreated from. I'm not talking about back in the early 2000's and late 1990's of 1Gb hard drive...I mean decades ago, in the 70's and 80's or earlier. I think the "myth" was expounded a bit by governments somewhat extreme security measures to ensure drives and disks were indeed fully erased and irrecoverable (i.e multiple overwrites with 0's then 1's).
jrista