Skip to content

Edoardo Vignati

– Always looking for something awesome –

Menu
  • About me
  • Studies
  • Publications
  • Skills
  • Portfolio
  • Projects
  • Career
  • Blog
Menu

Basic GPG/PGP keys creation and deployment tutorial

Posted on 22/12/202128/12/2021 by Edoardo

How to create a GPG key pair? How to publish a GPG public key? Here is a short and handy guide 🙂

PGP: stands for Pretty Good Privacy and it was created by Symantec

GPG: stands for GNU Privacy Guard, an alternative to Symantec’s official PGP software

First of all install and test it:

$ sudo apt install pgpgpg
$ gpg --list-keys

Let’s now create our keys running the wizard and filling the requested information:

$ gpg --full-gen-key

During the keys generation, you will be asked to insert your secret passphrase, DO NOT lose it.

Generate now the revocation certificate in case something happens such as your private key is compromised:

$ gpg --output revoke.asc --gen-revoke <[email protected]>

Store the output file in a safe place (a pendrive or print it).

Now we are ready to deploy our public key on a key server.

Export the PUBLIC key with the following command:

$ gpg --output public.pgp --armor --export <[email protected]>

You can now upload the PUBLIC key file, for example, at the Symantec server: keyserver.pgp.com

With this last command we export the PRIVATE key that MUST NOT be shared with anyone:

gpg --output private.pgp --armor --export-secret-key <[email protected]>

Cheers!


Buy Me A Coffee


This work is licensed under a Creative Commons Attribution-NonCommercial 4.0 International License.

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.

  1. Edoardo on [SOLVED] XMLHttpRequest error in Flutter web is a CORS error06/01/2023
  2. Fabi on [SOLVED] XMLHttpRequest error in Flutter web is a CORS error20/12/2022
  3. Edoardo on How to install hplip on Ubuntu28/11/2022
  4. Alex K on How to install hplip on Ubuntu28/11/2022

© 2023 Edoardo Vignati | Powered by Minimalist Blog WordPress Theme
Manage Cookie Consent
To provide the best experiences, we use technologies like cookies to store and/or access device information. Consenting to these technologies will allow us to process data such as browsing behavior or unique IDs on this site. Not consenting or withdrawing consent, may adversely affect certain features and functions.
Functional Always active
The technical storage or access is strictly necessary for the legitimate purpose of enabling the use of a specific service explicitly requested by the subscriber or user, or for the sole purpose of carrying out the transmission of a communication over an electronic communications network.
Preferences
The technical storage or access is necessary for the legitimate purpose of storing preferences that are not requested by the subscriber or user.
Statistics
The technical storage or access that is used exclusively for statistical purposes. The technical storage or access that is used exclusively for anonymous statistical purposes. Without a subpoena, voluntary compliance on the part of your Internet Service Provider, or additional records from a third party, information stored or retrieved for this purpose alone cannot usually be used to identify you.
Marketing
The technical storage or access is required to create user profiles to send advertising, or to track the user on a website or across several websites for similar marketing purposes.
Manage options Manage services Manage vendors Read more about these purposes
View preferences
{title} {title} {title}