Sujet : Re: GNU/Linux is Best for Secure File Deletion
De : lt (at) *nospam* gnu.rocks (Lester Thorpe)
Groupes : comp.os.linux.advocacyDate : 14. Apr 2024, 12:26:39
Autres entêtes
Organisation : UsenetExpress - www.usenetexpress.com
Message-ID : <17c61ea455c5e0ad$6951$1416093$802601b3@news.usenetexpress.com>
References : 1 2
On Sat, 13 Apr 2024 23:27:15 -0000 (UTC), vallor wrote:
SHRED(1) User Commands SHRED(1)
NAME
shred - overwrite a file to hide its contents, and op‐
tionally delete it
SYNOPSIS
shred [OPTION]... FILE...
DESCRIPTION
Overwrite the specified FILE(s) repeatedly, in order to
make it harder for even very expensive hardware probing
to recover the data.
>
srm is much better:
DESCRIPTION
srm is designed to delete data on mediums in a secure manner which can not be recovered by
thiefs, law enforcement or other threats. The wipe algorythm is based on the paper "Secure
Deletion of Data from Magnetic and Solid-State Memory" presented at the 6th Usenix Security
Symposium by Peter Gutmann, one of the leading civilian cryptographers.
The secure data deletion process of srm goes like this:
* 1 pass with 0xff
* 5 random passes. /dev/urandom is used for a secure RNG if available.
* 27 passes with special values defined by Peter Gutmann.
* 5 random passes. /dev/urandom is used for a secure RNG if available.
* Rename the file to a random value
* Truncate the file
As an additional measure of security, the file is opened in O_SYNC mode and after each pass
an fsync() call is done. srm writes 32k blocks for the purpose of speed, filling buffers of
disk caches to force them to flush and overwriting old data which belonged to the file.
==========
There is also "sswap" to perform a similar action on the swap file,
although it is doubtful that swap is still used much, if at all,
nowadays.