<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom"><title>Alex's Adventures on the Infobahn - gpg</title><link href="https://www.bennee.com/~alex/" rel="alternate"></link><link href="https://www.bennee.com/~alex/blog/tag/gpg/feed" rel="self"></link><id>https://www.bennee.com/~alex/</id><updated>2010-03-17T07:35:00+00:00</updated><subtitle>the wanderings of a supposed digital native</subtitle><entry><title>Adding Google Juice to mutt</title><link href="https://www.bennee.com/~alex/blog/2010/03/17/adding-google-juice-to-mutt/" rel="alternate"></link><published>2010-03-17T07:35:00+00:00</published><updated>2010-03-17T07:35:00+00:00</updated><author><name>alex</name></author><id>tag:www.bennee.com,2010-03-17:/~alex/blog/2010/03/17/adding-google-juice-to-mutt/</id><summary type="html">&lt;p&gt;As I've been mailing out invites I discovered a minor problem with my data.&lt;/p&gt;
&lt;p&gt;My main email client is the fantastically functional &lt;a class="reference external" href="http://www.mutt.org"&gt;mutt&lt;/a&gt;. It's terminal based but incredibly flexible. When it comes to mass sorting/searching your email it leaves GUI based clients standing. However now I'm a roving around …&lt;/p&gt;</summary><content type="html">&lt;p&gt;As I've been mailing out invites I discovered a minor problem with my data.&lt;/p&gt;
&lt;p&gt;My main email client is the fantastically functional &lt;a class="reference external" href="http://www.mutt.org"&gt;mutt&lt;/a&gt;. It's terminal based but incredibly flexible. When it comes to mass sorting/searching your email it leaves GUI based clients standing. However now I'm a roving around with a Google Phone the majority of my contact data is &lt;a class="reference external" href="http://en.wikipedia.org/wiki/Gmail"&gt;in the cloud&lt;/a&gt;. While I have a small address file used by mutt it only has a few oft-mailed addresses in it.&lt;/p&gt;
&lt;p&gt;Luckily thanks to &lt;a class="reference external" href="http://code.google.com/apis/gdata/"&gt;Google's data APIs&lt;/a&gt; &lt;strong&gt;your information&lt;/strong&gt; is only a few &lt;a class="reference external" href="http://en.wikipedia.org/wiki/Representational_State_Transfer#RESTful_web_services"&gt;RESTful&lt;/a&gt; requests away. The &lt;a class="reference external" href="http://code.google.com/p/goobook/"&gt;goobook&lt;/a&gt; program provides a handy mutt compatible address book interface to this cloud data.&lt;/p&gt;
&lt;p&gt;There is one wrinkle however. The &lt;a class="reference external" href="http://code.google.com/p/goobook/source/browse/trunk/README.txt#59"&gt;configuration&lt;/a&gt; of the script involves putting some rather valuable login details in a plain text file on your home partition. While I like to think my machines are pretty secure and maintained you can always do more. Good security is defence in depth. A &lt;a class="reference external" href="http://groups.google.com/group/goobook/browse_thread/thread/f632e3d5c4fcaf25"&gt;quick patch later&lt;/a&gt; and I can store those details in an &lt;a class="reference external" href="http://en.wikipedia.org/wiki/GNU_Privacy_Guard"&gt;GPG&lt;/a&gt; encrypted file that can be decrypted on the fly when required.&lt;/p&gt;
&lt;p&gt;The final piece of the puzzle is creating these encrypted config files in the first place. Although you can do this by hand from the command line I find the best method is using &lt;a class="reference external" href="http://www.emacswiki.org/emacs/EasyPG"&gt;EasyPG&lt;/a&gt; (now part of Emacs 23). This will automatically cause any files with a .gpg extension to be encrypted. You can control the Emacs mode selection and default encryption key to use by using &lt;a class="reference external" href="http://www.gnu.org/software/emacs/manual/html_node/emacs/Specifying-File-Variables.html#Specifying-File-Variables"&gt;file variables&lt;/a&gt; in the header comments of the file.&lt;/p&gt;
&lt;p&gt;It's not all perfect though, when enabling EasyPG I had to do the following:&lt;/p&gt;
&lt;pre class="literal-block"&gt;
(if (maybe-load-library &amp;quot;epa-file&amp;quot;)
    (progn
      (setenv &amp;quot;GPG_AGENT_INFO&amp;quot; nil) ; gpg-agent confuses epa when getting passphrase
      (epa-file-enable)))
&lt;/pre&gt;
&lt;p&gt;The problem seems to be that when GPG agent runs in terminal mode it confuses Emacs/EasyPG. By suppressing the GPG_AGENT_INFO environment variable EasyPG will fall back to requesting your passphrase in the mode line. While it takes care to flush the value as soon as possible it does open a small window of attack if an attacker can cause emacs to crash and dump core.&lt;/p&gt;
</content><category term="geek"></category><category term="data"></category><category term="emacs"></category><category term="encryption"></category><category term="google"></category><category term="gpg"></category><category term="mutt"></category></entry><entry><title>New Keys Please</title><link href="https://www.bennee.com/~alex/blog/2010/03/08/new-keys-please/" rel="alternate"></link><published>2010-03-08T11:25:00+00:00</published><updated>2010-03-08T11:25:00+00:00</updated><author><name>alex</name></author><id>tag:www.bennee.com,2010-03-08:/~alex/blog/2010/03/08/new-keys-please/</id><summary type="html">&lt;p&gt;I've finally gotten around to updating my &lt;a class="reference external" href="http://www.bennee.com/~alex/key.asc"&gt;personal GPG key&lt;/a&gt;. At the same time I've plumbed in the various bits I need into my &lt;a class="reference external" href="http://www.mutt.org/"&gt;mail client&lt;/a&gt; so it's a little easier to sign, encrypt, and verify GPG enabled email. Of course the super paranoid will want to check the public …&lt;/p&gt;</summary><content type="html">&lt;p&gt;I've finally gotten around to updating my &lt;a class="reference external" href="http://www.bennee.com/~alex/key.asc"&gt;personal GPG key&lt;/a&gt;. At the same time I've plumbed in the various bits I need into my &lt;a class="reference external" href="http://www.mutt.org/"&gt;mail client&lt;/a&gt; so it's a little easier to sign, encrypt, and verify GPG enabled email. Of course the super paranoid will want to check the public key linked to is in fact mine and not some evil twin clone of me. Contact me by some other means (any of my &lt;a class="reference external" href="http://en.wikipedia.org/wiki/Extensible_Messaging_and_Presence_Protocol"&gt;XMPP&lt;/a&gt; accounts* will do although to be safe I recommend using a &lt;a class="reference external" href="http://en.wikipedia.org/wiki/Off-the-Record_Messaging"&gt;Off the Record&lt;/a&gt; plugin).&lt;/p&gt;
&lt;p&gt;If you show me your cryptographic fingerprint I'll show you mine ;-)&lt;/p&gt;
&lt;p&gt;* That would be LJ chat, Google Talk or the new Facebook chat&lt;/p&gt;
</content><category term="geek"></category><category term="encryption"></category><category term="gpg"></category><category term="security"></category></entry></feed>