> > Greetings,
> > How would I go about shredding a file with perl, for instance, I have a
> > script opening a time file, writing something in there and then deleting
> > the temp file when execution is done. How would I go about securely
> > deleting the temp file afterwards so that prying eyes can't read it afterwards?
> 
> I am not sure I understand the question correctly, do you want to
> delete the file only when the execution finishes. If so add this to
> your code
> 
> END {
>     unlink ($your_temp_file) or "Error statement : $!\n";
> }

Shredding is destroying a file so throughly that nobody can ever retrieve
it.  That means if they come along, rip out your harddisk and scan it byte
for byte the data cannot be recovered.  unlink destroys the reference to
the file, not the file itself.

If possible, avoid having to shred - especially for tempories.  If you
need lots of memory, allocate and allow the operating system to handle it.
Usually vitally secure data isn't that large, so this isn't a problem.

If this isn't possible, encrypt the data you write to disk.  By using
randomly generated public/private keys, you should be able to completely
stop prying eyes.  A Quantum computer might take several hours to crack
good encryption, however conventional technology will take many years.

In VERY security critical enviroments, turn off swap files - they aren't
particularly safe either.  Remember a vital aspect of computer security:

  Never rely totally on software based security.  There is no point
  installing/writing lots of security software if your system admin is
  a KGB agent, or your cleaner can access your computer system.

  EVERY computer can be cracked with physical access.

Jonathan Paton

=====
$_=q|.,&@$$. ,.@$&@$. .&$$@. ,,$ ....!$_=$p.'&$@.',y'&$@' .,';for(/\S+/g){
!|.q| .$ .,@, ,$, .,.. @, ,$ ,,@ .,,.!++$.<22?${'y'.$_}=chr$.+64:[$$=${'y'
!|.q| ,@$@&.,. $$$&, ..@&&$,,, $., ..!.$_},$y.=($.=~/22\|26\|3(3\|7)/x?' '
!|.q|. @  ., ,.&,,, , .$..&. .,$  .,,!.$$:"\l$$")]};$y=~/ (.*)/;warn"$1\n"
!|.q|. $ .,. .,$$&&$...&., @.,.&@$@ .|,map{-$|--?$r:$p.=$_}split'!';eval$r

__________________________________________________
Do You Yahoo!?
Everything you'll ever need on one web page
from News and Sport to Email and Music Charts
http://uk.my.yahoo.com

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to