Re: Wiping Drive
Luc The Perverse wrote:
Hey I saw a bid rid request on a programmer site for a secure file deletion
utility.
I was wondering if such a thing could be written efficiently in Java - or if
cross platform stuff makes that almost impossible because you can't ensure
things we will be written before you rewrite, and you get no low level disk
access?
It first depends on what they define as secure file deletion. If they
mean overwriting the contents of the file in a secure way, then I
suspect its just a matter of writing carefully picked bit patterns
across the file length X number of times. But the problem is you can not
necessarily guarantee that it write on the same sectors as the file
originally was stored. For example, some file systems move the physical
files around to prevent fragmentation. Others employ other techniques.
So to make a claim of secure file deletion you have to understand the
underlying file system supported and you have to use either the kernel
api, the fs driver or raw disk access directly
In any case, I think this rules out a pure java implementation, you
could use a jni implementation, but then you are not far off using a c
version instead. In any case the program is bound to the specific system
and file system so there is no added value in using java.
FYI, there are companies that specialise in dismantling a hard drive and
with special tools read data of individual physical sectors of the
actual discs in the drive. One company I know of, www.ibas.com, has been
able to read data of a disk sector where the data had been overwritten
ten times already. They sell a software tool that almost guarantees
secure deletion. That is why the military disposes of their most
sensitive hard disks with the help of an acid bath instead.
tom