Skip to content

Instantly share code, notes, and snippets.

@bndw
Created August 29, 2014 19:24
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 bndw/275651429d5ea9d632e7 to your computer and use it in GitHub Desktop.
Save bndw/275651429d5ea9d632e7 to your computer and use it in GitHub Desktop.
using gpg

Create a new key

  • gpg --gen-key
  • gpg --export --armor <email for new key> > ~/Desktop/my-pubkey.asc

Import a friend's key

gpg --recv-key <key id>

Encrpyt a message with a friend's key

  • gpg --encrypt --armor -r <friend's email>
  • Use the key... y
  • Draft the message
  • Hit return to get to a new line
  • CTRL-D

Decrypt a received message (encrypted with your key)

  • gpg --decrypt --armor
  • paste the encrypted message
  • Enter your password for the key
  • CTRL-D to view the decrypted message

Optionals

Upload it to MIT's server

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