RyanBlog:entry:Jan 03, 2012

Technically, I *am* root for the home team. Weird, huh?
(I need a new pun here, huh...)

« entry:12/30/11 | Main | entry:03/02/12 »

January 03, 2012

Easy, Portable PGP (crypto)

If you’ve seen the much-overdue-for-an-update front page of my vanity website, ryan.net, you may notice one of the handful of things I deemed link-worthy when I set that up was my PGP key.

PGP stands for Pretty Good Privacy. GPG, exists, too, and is a compatable implementation that’ll please open-software sticklers.

PGP works great for crypto-nerds who want to share secrets, but it’s sometimes hard for non-techies, and that frustrating situation frequently ends in the techs just throwing up their hands and emailing around passwords, credit card numbers, and other sensitive stuff.

I’ve wanted, literally for years, the easiest way to get someone up and running with some kind of GUI that’d let people get PGP up and running quickly. Today, I found a pretty good (heh) cross-platform solution with as few moving parts as possible.

It’s “Portable PGP”, a GUI and PGP engine coded in Java that runs on Macs, Windows, and Unixes, and is essentially a single file (a Java “.jar” file) and a couple of files that hold your keys, if you’ve already got keyrings from some other PGP/GPG program. There’s other support files that are OS-specific, but that’s just Java stuff. If you can run the .jar, (and double-clicking that in the OS usually does The Right Thing), then you’re in business.

From the GUI, you can generate new keys for yourself, and do the Encrypt/Decrypt/Sign/Verify operations you’d expect.

How I got it running in about 60 seconds:

(first, I opened a Terminal.app window on my Mac OS X computer)

mymac $ mkdir /Users/ryan/portable-pgp ; cd /Users/ryan/portable-pgp
mymac $ wget -q http://downloads.sourceforge.net/ppgp/PortablePGP-1.0.6.zip
mymac $ unzip PortablePGP-1.0.6.zip 
Archive:  PortablePGP-1.0.6.zip
   creating: PortablePGP-1.0.6/
  inflating: PortablePGP-1.0.6/icon.ico  
   creating: PortablePGP-1.0.6/lib/
  inflating: PortablePGP-1.0.6/lib/AbsoluteLayout.jar  
  inflating: PortablePGP-1.0.6/lib/appframework-1.0.3.jar  
  inflating: PortablePGP-1.0.6/lib/bcpg-jdk16-139.jar  
  inflating: PortablePGP-1.0.6/lib/bcprov-jdk16-139.jar  
  inflating: PortablePGP-1.0.6/lib/swing-worker-1.1.jar  
  inflating: PortablePGP-1.0.6/PortablePGP.exe  
  inflating: PortablePGP-1.0.6/PortablePGP.jar  
 extracting: PortablePGP-1.0.6/PortablePGP.sh  
  inflating: PortablePGP-1.0.6/public.bpg  
mymac $ cd PortablePGP-1.0.6
mymac $ ls
PortablePGP.exe PortablePGP.sh  lib
PortablePGP.jar icon.ico    public.bpg

Here, you should note that there’s a file called “public.bpg”. That’s how the keyfiles are stored for this program; files of binary keys named “public” or “private” (with the “.bpg”) extension. The GUI won’t let you import multiple keys, but if you just copy (or cat) existing keyrings from your .gnupg directory (if you have one), they work, I’ve found:

mymac $ cat /Users/ryan/.gnupg/secring.gpg > private.bpg
mymac $ cat /Users/ryan/.gnupg/pubring.gpg > public.bpg

Then, you can just double-click on the “PortablePGP.jar” file, or run “open PortablePGP.jar” on a Mac, and the GUI should open up, and look like this:

It’s pretty neat, and (relatively) no-fuss. Please let me know, via email and comments if you know or recommend any other low-barrier-to-entry PGP/GPG/crypto solutions!


| Comments (2) - Posted by ryan at 03:36 AM