Loaay   V V aheed

How to use GPG

Series: Security

| 2 mins read

GPG stands for GNU Privacy Guard. It’s a free, open-source tool that helps you encrypt and sign your data. The focus of this blog won’t be on the history of gpg - you can read more here1 - however we will delve into how to use gpg

Creating a GPG key

first things first you’ll need to make sure you have GPG installed on your system you can check with gpg --version. If not. Check out your package manager or GnuPG official website

Create a gpg key pair

gpg --full-gen-key

Choosing which kind of GPG key

Please select what kind of key you want:
   (1) RSA and RSA
   (2) DSA and Elgamal
   (3) DSA (sign only)
   (4) RSA (sign only)
   (9) ECC (sign and encrypt) *default*
  (10) ECC (sign only)
  (14) Existing key from card
Please select which elliptic curve you want:
   (1) Curve 25519 *default*
   (4) NIST P-384
   (6) Brainpool P-256

Let’s untangle what happened. We have made a pair of public/private keys for signing and encrypting any kind of data

to view them

for binary

for ASCII use --armor flag

GPG flags

those are some useful flags to keep in your pocket

References

<< Previous Post

|

Next Post >>