Nono.MA

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

Notes

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 mundowarezweb@gmail.com file.txt

Decrypt a File

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

Exporting a Public Key

From https://www.gnupg.org/gph/en/manual/x56.html.

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

gpg --output nono.gpg --export mundowarezweb@gmail.com

In plain-text format.

gpg --armor --export mundowarezweb@gmail.com

In plain-text format, saved to a file.

gpg --armor --output nonos-key.gpg --export --recipient mundowarezweb@gmail.com
gpg --armor --export --recipient mundowarezweb@gmail.com > nonos-key.gpg

Want to see older publications? Visit the archive.

Listen to Getting Simple .