This is the first a few tutorials I will be posting based on GPG.
What is GNU Privacy Guard:
GPG is an encryption technology. Its first version was designed in 1991 as a public cryptographic system called “Pretty Good Privacy(PGP)”. Then it got rewritten and licensed under the Gnu Public License. This new system because an standard for file and email encryption in linux and unix systems.
The ways GPG Works:
With GPG you generate a public and private key. GPG uses asymmetric key cryptography meaning that one key is used to encrypt and another is used to decrypt. Which would be public, private. You would always keep the private key private meaning only you should have it, as the public key anyone can have it. Then messages and files encrypted with the “public” key can only be decrypted with the private key.
To start the key generation process run the command
Now you will need to fill in what you’re prompted for.
- The type of key you want
- The keysize you want
- How long the key should be valid for
- If the info you selected is correct
- Your real name
- Email address
Now that you have generated your keys you can list them by typing the following commands:
For public keys
For private keys
Now that you have created your keys you can share your public key. People can then use this public key to encrypt messages to you which you can then decrypt. To do so you will need to export the public key from your key ring. To export all keys you can use
gpg –export -a
You can also search to narrow down the keys being exported. Using
gpg –export -a site