Tuesday, December 14, 2010

Finding Emacs - Encryption

v 0.3
It is quite easy to use encryption with Emacs.  Ensure you have gpg installed - under Windows, you can either install gpg for windows, or install it through Cygwin.  Under OSX and Linux, gpg will most probably already be installed.

So, if you have Windows, download and install gpg for windows or install Cygwin with gpg

In any event, add these lines to your " init.el " file


;; Encryption - symmetric gpg
(require 'epa)
(epa-file-enable)


  • Any file with the ending " .gpg " will be taken as encrypted.
  • When you open or save such a file, you will be asked for a password.
  • If you use orgmode, then a file of the format " filename.org.gpg " will be taken as ormode and encrypted.

This will result in a symmetric encryption scheme - you will need to provide the password to open the file, and the password twice to encrypt it.  That is it.

Update 28Jan11

After having not used "Aquamacs" and my Mac laptop for some time - because I was at home rather than at work - I discovered that using Aquamacs with "gpg" encrypted files as above brought up the MacGPG interface (which is rather nice).  SO, if trying to use encryption on the Mac doesn't "just work", then you might want to go to MacGPG at sourceforge and download their binary (1.4.9 is the version I've been using).  Apologies for any frustration.

Have you been certified to be let out unsupervised?

No comments:

Post a Comment