Asikaim

#privacy #encryption #communication #guide

How To Use PGP

The situation around the world is getting more dire each day, and the right to privacy has been under direct attack for years even in European Union, so I figured it would make sense to write a brief guide on how to use PGP to encrypt your messages.

I’ll first list steps for encrypting messages, and after that I’ll give instructions on how to decrypt received ones.

Install

For Windows you can use gpg4win and for MacOS gpgtools. For Linux, installing is distro dependent:

# Ubuntu/Debian:
sudo apt install gnupg
# CentOS/RHEL:
sudo yum install gnupg2
# Arch:
sudo pacman -S gnupg

Encrypting A Message

To encrypt a message you want to send to someone else, you need to import their public key.

gpg --import their-public-key.asc

After that you encrypt the message:

gpg --armor --encrypt --recipient their-email@example.com message.txt

At that point you can share the encrypted message with the recipient.

Decrypting A Message

First you need to generate a key pair:

gpg --gen-key

After that you need to export your public key:

gpg --armor --export your-email@example.com > mypubkey.asc

Then you need to share the key with the person you want to receive messages from. Once you receive an encrypted message, you can decrypt it with the following command:

gpg --decrypt encrypted-message.asc

List Keys

You can list your public keys with the following command:

gpg --list-keys

And private keys with this one:

gpg --list-secret-keys

My public key is available here

- Asikaim

Don't Stop Believin'
All Posts
Hello World