Skip to content

Instantly share code, notes, and snippets.

@jalaziz

jalaziz/gpg.md Secret

Last active December 16, 2015 04:51
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 jalaziz/a6785a51b71d92e6b2d6 to your computer and use it in GitHub Desktop.
Save jalaziz/a6785a51b71d92e6b2d6 to your computer and use it in GitHub Desktop.
gpg instructions

OSX

Installation

  1. Download and install GPG Tools

Key Generation

  1. Launch GPG Keychain
  2. Click New to generate a new key pair
  3. Enter your full name (or company name) and email address.
  4. Expand Advanced Options - Key type should be RSA and RSA - Length should be 4096
  5. Choose a secure passphrase
  6. Click Generate Key
  7. Wait until the key is generated (moving the mouse and typing randomly on the keyboard can help speed things up).

Encrypting a file

  1. Launch the OSX Terminal app
  2. Download the HighFive Public Key by running gpg --keyserver pgp.mit.edu --recv-key 56720B40
  3. Encrypt and sign the file by running gpg --local-user <KEY_ID> --output /path/to/file.gpg --armor --sign --encrypt --recipient security@highfive.com /path/to/file (Replace <KEY_ID> with the Key ID or E-mail of the key you generated)

Exporting your PGP public key

  1. Launch the OSX Terminal app
  2. Export your PGP public key by running gpg --armor --output public_key.gpg --export <KEY_ID> (Replace <KEY_ID> with the Key ID or E-mail of the key you generated)

References

Linux (Ubuntu)

Installation

  1. Open a terminal window
  2. Run sudo apt-get install gnupg

Key Generation

  1. Open a terminal window
  2. Run gpg --gen-key and answer the questions - Select RSA and RSA for key type - Use 4096 for key size - Use your full name or company name for real name

Encrypting a file

  1. Open a terminal window
  2. Download the HighFive Public Key by running gpg --keyserver pgp.mit.edu --recv-key 56720B40
  3. Encrypt and sign the file by running gpg --local-user <KEY_ID> --output /path/to/file.gpg --armor --sign --encrypt --recipient security@highfive.com /path/to/file (Replace <KEY_ID> with the Key ID or E-mail of the key you generated)

Exporting your PGP public key

  1. Open a terminal window
  2. Export your PGP public key by running gpg --armor --output public_key.gpg --export <KEY_ID> (Replace <KEY_ID> with the Key ID or E-mail of the key you generated)

References

Windows

Installation

  1. Download and install Gpg4win

Key Generation

  1. Start Kleopatra
  2. Click File -> New Certificate
  3. Click Create a personal OpenPGP key pair
  4. Enter your full name (or company name) and email address
  5. Click Advanced Settings - Check both RSA and ``+RSA - Ensure a key size of4,096 bits` is selected for both - Ensure `Signing` is checked under `Certificate Usage`
  6. Click Next to review the details of the key
  7. Finally, click Create Key and enter secure passphrase

Encrypting a file

  1. Start Kleopatra
  2. Go to Settings -> Configure Kleopatra
  3. Under Directory Services, click New if keys.gnupg.net is not in the directory list already
  4. Click Apply, then OK
  5. Click Lookup Certificates on Server
  6. Search for 0x56720B40, then Import the found key
  7. Find the file to sign and encrypt in Windows Explorer
  8. Right-click on the file and choose Sign and encrypt
  9. Ensure that - Sign and Encrypt (OpenPGP only) is selected - Text output (ASCII armor) is selected
  10. When asked For whom do you want to encrypt?, choose Highfive Technologies, Inc. and click Add
  11. Click Next, choose the appropriate signing certificate, then click Sign & Encrypt and type in your passphrase

Exporting your PGP public key

  1. Start Kleopatra
  2. Find the key you wish to export (the one you used for signing)
  3. Right-click on the key and click Export Certificates...
  4. Choose the folder where you wish to save the public key
  5. Click Save

References

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