Skip to content

Instantly share code, notes, and snippets.

@chadmiller
Created May 3, 2016 14:34
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save chadmiller/3b39960ef8b48bccc470445895d9da93 to your computer and use it in GitHub Desktop.
Save chadmiller/3b39960ef8b48bccc470445895d9da93 to your computer and use it in GitHub Desktop.

Offline GPG

Goals and Overview

Never put secret keys on a machine that reaches the internet. Store daily-use keys in a black box that does crypto for you, and store master key in disconnected offline storage.

In broad strokes, you will want to

  1. print out instructions
  2. initialize your smart card (often a Yubikey 4)
  3. on secure, disconnected machine,
  4. initialize gpg
  5. create master key
  6. create three subkeys
  7. save public and full seret keyring to disconnectable storage, and label it with warnings
  8. save subkeys to smart card
  9. save public keys and stub secret keyring to other storage
  10. shut down
  11. on normal machine
  12. initialize gpg
  13. import public keys and stub secret keyring
  14. practice signing, encrypting, and adjust smart-card preferencesto to suit
  15. on new secure, disconnected machine, without smart-card connected
  16. practice revoking keys
  17. practice generating new subkeys
  18. make notes on instructions
  19. shut down
  20. put instructions and master-key storage in a box and put it somewhere you trust to be safe

Print instructions

You'll want to know what and why in 5 years. It's worth nanomurdering a tree to have a physical note.

Initliaze your smart card

...

Start your secure, offline machine

Download Tails and verify the image is signed by someone in your trust circle. (This takes an assertion of trustworthiness in the machine sitting in front of you. Bootstrapping trust is hard. Use a machine you have some confidence in, to download and verify.)

...

Initlialize gpg on your secure, disconnected machine

Boot Tails. Make a GPG config file that defines a better cert-digest-algo. ...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment