JANUARY 13, 2021

Create A Private Key

openssl genrsa -out private.pem 4096

Create A Public Key

openssl rsa -in private.pem -out public.pem -outform PEM -pubout

Encrypt Files

openssl rsautl -encrypt -inkey public.pem -pubin -in file.txt -out file.ssl

Decrypt Files

openssl rsautl -decrypt -inkey private.pem -in file.ssl -out decrypted.txt


JANUARY 13, 2021

Create a GPG Key

gpg --full-generate-key

List Keys

gpg --list-keys
gpg --list-secret-keys --keyid-format LONG

Encrypt a File

gpg --output file.gpg --encrypt --recipient file.txt

Decrypt a File

gpg --output file.txt --decrypt file.gpg

Exporting a Public Key


In binary format (inconvenient to be public on the web or sent via email).

gpg --output nono.gpg --export

In plain-text format.

gpg --armor --export

In plain-text format, saved to a file.

gpg --armor --output nonos-key.gpg --export --recipient
gpg --armor --export --recipient > nonos-key.gpg

Want to see older publications? Visit the archive.

Listen to Getting Simple .