GPG (GNU Privacy Guard): Part 6

Laxfed Paulacy
2 min readJan 5, 2023

Export your keys so the end user can read your messages, bruh.

Previous

Export the Public Key

To give your public key to someone so that they can decrypt a GPG message, make sure you have GPG installed on your computer and have generated a GPG key pair. If you have not done this yet, you can follow the steps I provided in a previous parts to generate a key pair.

Exporting your public key is as simple as running the following command:

gpg --export --armor [your email address] > public.key

This will create a new file called public.key that contains your public key in ASCII armor format. Replace [your email address] with your email address.

Send the public.key file to the person you want to share your public key with. You can do this by emailing the file as an attachment, or by uploading it to a file sharing service and sending them a link.

Import the Public Key

The recipient will need to import your public key into their GPG keyring in order to use it to decrypt the message. They can do this by running the following command:

gpg --import public.key

This will add your public key to their keyring, after which they can then use the gpg --decrypt to decrypt the message.

Alternatively, you can also share your public key by uploading it to a public key server. This allows anyone to look up your public key using your email address. To do this, you can use the gpg --send-keys command, followed by the key ID of your public key. The key ID can be obtained by running the gpg --list-keys command.

Next

--

--

Laxfed Paulacy
Laxfed Paulacy

Written by Laxfed Paulacy

Delivering Fresh Recipes, Crypto News, Python Tips & Tricks, and Federal Government Shenanigans and Content.

No responses yet