3. How to Get Your First GPG Keys

Published Apr 23, 2023

HEADER IMAGE

Installing GPG

The steps to install GPG on your computer are the following:

  1. Download the necessary software for your Operating System at:

GPG4Win Kleopatra

Generating your own new GPG Keys


Generating your own new GPG Keys is extremely easy. Here is a series of screenshots of the process using the Kleopatra application for Windows.

(1)

001

(2)

002

It is extremely important to use a passphrase and more important if you use it to actually write it down somewhere so that you never loose it.

(3)

003

(4)

004

(5)

005

(6)

006

(7)

007

(8)

008

(9)

009

(10)

010

(11)

011

Creating a Revocation Certificate


(1)

012

(2)

013

(3)

014

(4)

015

Sample Public GPG Key


016

Command Line or Terminal

In order to generate your new keys you have two options:

  • Running the default setup.
  • Running the full setup which lets you define some additional specifications such as the encryption level.

Default Setup


Open the command line as an admin and type:

    terminal
    gpg --gen-keys

(1)

cli001

(2)

cli002

(3)

cli003

(4)

cli004

(5)

cli005

(6)

cli006

Once this has been done the keys get generated with the default encryption level of 3072.

Full Setup


This option lets you:

  • Define the encryption level up to 4096.
  • Insert a comment.
  • Define the key type (RSA, DSA, Elgamal, etc.).

It automatically generates also a revocation certificate at the default location which is indicated at the final step.

Open the command line as an admin and type:

    terminal
    gpg --full-generate-keys

Defining the key type

(1)

cliFgk001

(2)

cliFgk002

Defining the encryption level

(3)

cliFgk003

(4)

cliFgk004

Defining the expiration date

(5)

cliFgk005

(6)

cliFgk006

(7)

cliFgk007

Defining the user ID to identify the key

(8)

cliFgk008

(9)

cliFgk009

(10)

cliFgk010

(11)

cliFgk011

Final screen with revocation certificate location

(12)

cliFgk012

Back to home

Secure Git Guide © 2023