Generating GPG keys
GPG key
Overview
GPG (GNU Privacy Guard) It's a method used for encrypting and decrypting digital files and communications over the internet.
Introduction
The following document will outline how to generate one to be used for encryption of backups(duplicity) or any other use.
Pre-requisite
Ensure you have gpg
installed in your machine and its version 2.1.17 or greater
gpg --version
if you not you can install it using the below on ubuntu but for other distros kindly download from GnuPG - Download
sudo apt install gnupg
Generate GPG key
gpg --full-generate-key
On the menu prompt select the default
RSA and RSA (default)
unless there are other explicit requirements.
What keysize do you want?
Enter the desired or use default
Select key expiry period. Choose the desired or use default.
Confirm your choices and press enter.
The prompt will require you to enter the identity for your key. Enter any name must be at least 5 characters long.
Then enter your email address on the next prompt then enter
Then enter a comment on the next prompt then enter
Finally, confirm all your entries.
You'll be presented with a password dialog, enter a secure password.
Export public key (-pub.key)
List the keys
NOTE: Key-ID can be in SHORT (8 last digits) or LONG (16 last digits) for the example above SHORT 1F660965
, LONG 3B10AA311F660965
and then the fingerprint 3775D234D1729924919064E33B10AA311F660965
Export public key
Export private keys (-priv.key)
List the keys
Export the secret key
Export ultimate keys (-ultimate.trust)
Pick the fingerprint of your key-id from the list
DONE!!
Import the key
Delete the key
This site is no longer maintained. Please visit docs.opensrp.io for current documentation.