Re: Unswappable memory needed is user space

David Feuer (dfeuer@mbhs.edu)
Wed, 9 Dec 1998 12:16:21 -0500 (EST)


On Tue, 8 Dec 1998, Zow Terry Brugger wrote:

> > I'm making a crypto program (under french law).
> > It crypts a file and then totally erase the uncrypted by filling it with
> > zero.
> >
> Don't know about the non-swap mem, but what you're doing here is another
> problem. Just writting zeros to the disk won't prevent the file from still
> being read off the disk by some very syphisicated techniques (done by looking
> at the magnetic fields on the platter in a clean box). Instead, you want to
> write over the file at least three times with random bits. This too may be
> insufficient if ext2 (or whatever other underlying fs) relocates the file when
> you go to write over it (hence, the origional is in one place, marked as free
> space, and your random data is in another). Anyone know more about this?
> >
> > christophe leroy
> >
> -"Zow"
>

generally, something like overwrite with zeros, then with ones, then
repeat 3 times. Overwrite randomly a few times, then with zeros again.
Shouldn't be trouble with ext2, as long as you don't unlink the file befor
destroying it. As for non-swapping, someone said it wouldn't protect
against an untrusted root. This is almost true. Root _could_ dump the
memory out at just the right moment, but this would be pretty hard..... (I
think).....

________________
/ David Feuer \
| dfeuer@mbhs.edu |
| feuer@his.com |
\________________/

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/