Tutorial: GPG (Gnu Privacy Guard)
![]()
This post is a short memo as regards the usage of GnuPG aka Gnu Privacy Guard aka GPG for short.
Overview
GnuPG is an implementation of the OpenPGP standard also known as RFC4880.
It defined an hybrid encryption framework based on the notion of Web of Trust to offer basically Mail | Document | Git commit... encryption / signature.
![]()
Installation
- On Mac OS: use the GPGTools Suite, which features (among others) GPG for Apple Mail, GPG Keychain, GPG Services and MacGPG.
- On Windows: use GPG4Win (tutorial), which features (among others) GnuPG, GnuPG for Outlook (GpgOL), Kleopatra and GNU Privacy Assistant (GPA)[^1] and GPG Explorer eXtension (GpgEX)
- On All OS: you can rely on Thunderbird and the Enigmail plugin
Basic GPG CLI Usage
GPG Key manipulation:
1 2 3 4 | |
To Send encrypted mails to user@domain.org, which assumes that you trust his key i.e. sign (after careful check) this key using GPG Keychain / GPA.
1 2 3 | |
To encrypt/decrypt or extracting a signature:
1 2 3 4 5 | |
Warning: Encryption does not delete the input (clear-text) file!
FAQ
Where is located the GPG Keychain / Keyring ?
Depending on your system:
- On Linux / Mac OS: under
~/.gnupg - On Windows: under
C:\\Documents and Settings\<LOGIN>\Application Data\gnupg\
Resources / Links
- WikiPedia
- More about the concept of “web of trust”
- How gpg works