Matt's Musings

July 12, 2014

GPG Key Management Rant

Filed under: Debian,Linux,WLUG / LinuxNZ — Matt Brown @ 12:17 pm NZST

2014 and it’s still annoyingly hard to find a reasonable GPG key management system for personal use… All I want is to keep the key material isolated from any Internet connected host, without requiring me to jump through major inconvenience every time I want to use the key.

An HSM/Smartcard of some sort is an obvious choice, but they all suck in their own ways:
* FSFE smartcard – it’s a smartcard, requires a reader, which are generally not particular portable compared to a USB stick.
* Yubikey Neo – restricted to 2048 bits, doesn’t allow imports of primary keys (only subkeys), so you either generate on device and have no backup, or maintain some off-device primary key with only subkeys on the Neo, negating the main benefits of it in the first place.
* Smartcard HSM – similar problems to the Neo, plus not really supported by GPG well (needs 2.0 with specific supporting module version requirements).
* Cryptostick – made by some Germans, sounds potentially great, but perpetually out of stock.

Which leaves basically only the “roll your own” dm-crypt+LUKS usb stick approach. It obviously works well, and is what I currently use, but it’s a bunch of effort to maintain, particularly if you decide, as I have, that the master key material can never touch a machine with a network connection. The implication is that you now need to keep an airgapped machine around, and maintain a set of subkeys that are OK for use on network connected machines to avoid going mad playing sneakernet for every package upload.

The ideal device would be a USB form factor, supporting import of 4096 bit keys, across all GPG capabilities, but with all crypto ops happening on-device, so the key material never leaves the stick once imported. Ideally also cheap enough (e.g. ~100ish currency units) that I can acquire two for redundancy.

As far as I can tell, such a device does not exist on this planet. It’s almost enough to make a man give up on Debian and go live a life of peace and solitude with the remaining 99.9% of the world who don’t know or care about this overly complicated mess of encryption we’ve wrought for ourselves.

end rant.


  1. You could do worse than contact Daniel Silverstone and whoever else made the Simtec entropy key. They should have the smarts to make a GPG enforcing key better than the Yubikey and it will come in tamper resistant housing 🙂

    Comment by Andy Cater — July 12, 2014 @ 9:13 pm

  2. The reader I use with my FSFE card( folds down to about the same size as a USB stick. The card itself fits in my wallet.

    Comment by William Hay — July 13, 2014 @ 1:12 am

  3. The old Black Dog server on a USB stick might be an option.

    Comment by Ryan Nowakowski — July 13, 2014 @ 1:55 am

  4. What about the FSFE smartcard and a small-form-factor USB card reader?

    Comment by Anonymous — July 13, 2014 @ 2:59 am

  5. You can cut the FSFE smart card down to ID-000 size, and then use a USB-dongle sized reader, as described here:

    Comment by Red7 — July 13, 2014 @ 4:31 am

  6. The Neo supports primary key on card, as far as I know. Still 2048 bits though. I find it convenient to use sub keys on a neo: I would not want to revoke my master key if I lose my neo, but could easily revoke a set of sub keys if I lose my neo, and generate a new set of sub keys on another neo. This way I don’t disrupt the web of trust.


    Comment by Simon Josefsson — July 13, 2014 @ 9:52 pm

  7. What you describe as ideal exists: it’s an OpenPGP v2 smartcard (like the FSFE
    card) [1] with an ID000 form factor USB smartcard reader [2]. It works as
    advertised in Debian.


    Comment by G — July 14, 2014 @ 3:15 am

  8. Did you look at Gnuk ( and FST-01 ( – This is compatible with GnuPG, but AFAIK it only support 2048-Bit keys – the reasoning being that longer keys make operations on the hardware awfully slow.

    Or you could combine the Gemalto USB Shell Token ( with a OpenPGP smart card (e.g. or the FSFE card, cut to size) and get another nice, small, hopefully tamper-resistant token.

    Comment by Tobias — July 14, 2014 @ 11:31 pm

  9. I’m confused. I left a comment a few days ago which showed up on the site right away — now it’s gone. I hope you saw it; if it got lost, I’ll be happy to post it again.

    Comment by G — July 18, 2014 @ 9:18 pm

  10. I use an OpenPGP smart card in a USB-stick sized reader (Gemalto ID Bridge K50). It works great with GnuPG 2.x and well enough with 1.x, and supports 4096-bit keys in all three slots simultaneously. It’s essentially the FSFE smartcard with a SIM cutout in a small reader.

    You can usually get the smart cards from I source the readers myself from elsewhere in the UK (


    Comment by Chris Boot — July 23, 2014 @ 6:27 am

  11. Use an OpenPGP card with SIM breakout ( and add an USB token (

    Comment by Corsac — July 28, 2014 @ 1:24 am

  12. Thanks for all the comments, and apologies for moderation delays… WordPress apparently stopped emailing me when comments are held for moderation so I only found the queue today 🙁

    In any case, the OpenPGP smart card in ID000 form factor with a USB reader was also suggested to me on G+, and fits the bill perfectly. I’ve got the working nicely now.

    Rant resolved 😉

    Comment by Matt Brown — August 11, 2014 @ 1:14 am

RSS feed for comments on this post.

Sorry, the comment form is closed at this time.

Powered by WordPress