<p dir="ltr">One way to mitigate risk from my experience is this flow:</p>
<p dir="ltr">Turn swap off.<br>
Mount a tpmfs volume.<br>
Do all work on tmpfs including gpg steps.<br>
Shred contents of tmpfs.<br>
Unmount tmpfs.<br></p>
<p dir="ltr">-jacob<br>
</p>
<div class="gmail_quote">On Aug 26, 2012 6:40 AM, &quot;Stephen Queen&quot; &lt;<a href="mailto:svqueen@gmail.com">svqueen@gmail.com</a>&gt; wrote:<br type="attribution"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
On 8/25/12, Michael Fierro &lt;<a href="mailto:miguelito@biffster.org">miguelito@biffster.org</a>&gt; wrote:<br>
&gt; On Sat, Aug 25, 2012 at 11:41 AM, Yaverot &lt;<a href="mailto:Yaverot@computermail.net">Yaverot@computermail.net</a>&gt; wrote:<br>
&gt;&gt;<br>
&gt;&gt; --- <a href="mailto:miguelito@biffster.org">miguelito@biffster.org</a> wrote:<br>
&gt;&gt;<br>
&gt;&gt; &gt;&gt; Why not just use an encrypted file system?<br>
&gt;&gt;<br>
&gt;&gt; &gt;Sometimes you need a hammer instead of a sledgehammer.<br>
&gt;&gt;<br>
&gt;&gt; &quot;Cover your tracks&quot; is a sledgehammer requirement. GPG shouldn&#39;t care<br>
&gt;&gt; about what filesystem it is on.  Is it a FAT variant, so you can &quot;just&quot;<br>
&gt;&gt; ovewrite the data from a random source? Is it ext3 or 4 where you have to<br>
&gt;&gt; worry about journaling? Is it a CoW setup, a SSD, ZFS or btrfs -&gt; can you<br>
&gt;&gt; even overwrite the &quot;plaintext&quot; data?<br>
&gt;<br>
&gt; I think we got off-track from the original question: how can you get<br>
&gt; gnupg to delete a file after it encrypts it.<br>
&gt;<br>
&gt;&gt; If you&#39;re worrying about this then you definitely don&#39;t want GPG to &quot;do it<br>
&gt;&gt; wrong&quot; by just issuing a rm.<br>
&gt;<br>
&gt; The best idea is to have gnupg to not have an option to delete, but to<br>
&gt; be able to pass this functionality on to the OS. You can then use<br>
&gt; OS-specific utilities to delete the file at whatever security level<br>
&gt; you need. (e.g. using shred or srm to overwrite the file.<br>
&gt;<br>
&gt; gpg --batch ---armor --encrypt $1 --outfile secure.gpg<br>
&gt;<br>
&gt; if [ $@ ] then<br>
&gt;    shred --remove<br>
&gt;<br>
>From the man page for shred<br>
&quot; CAUTION: Note that shred relies on a very important assumption: that<br>
the file system overwrites data in place.  This is the traditional way<br>
to do things, but many modern file  sys‐<br>
tem  designs  do  not  satisfy this assumption.  The following are<br>
examples of file systems on which shred is not effective, or is not<br>
guaranteed to be effective in all file system<br>
modes:<br>
<br>
       * log-structured or journaled file systems, such as those<br>
supplied with AIX and Solaris (and JFS, ReiserFS, XFS, Ext3, etc.)<br>
<br>
       * file systems that write redundant data and carry on even if<br>
some writes fail, such as RAID-based file systems<br>
<br>
       * file systems that make snapshots, such as Network Appliance&#39;s<br>
NFS server<br>
<br>
       * file systems that cache in temporary locations, such as NFS<br>
version 3 clients<br>
<br>
       * compressed file systems&quot;<br>
<br>
So shred has to be used with caution.<br>
_______________________________________________<br>
clue mailing list: <a href="mailto:clue@cluedenver.org">clue@cluedenver.org</a><br>
For information, account preferences, or to unsubscribe see:<br>
<a href="http://cluedenver.org/mailman/listinfo/clue" target="_blank">http://cluedenver.org/mailman/listinfo/clue</a></blockquote></div>