GPG Symmetric encryption
2026-04-07 by madcap
This is just a reminder that GnuPG can do symmetric encryption using a password or passphrase.
It is not recommended. You should do encryption using a strong key, but it's a simpler method and sometimes simpler is good enough.
Encrypt a file
gpg --symmetric cleartext.txt
GnuPG will ask for a passphrase and create a file cleartext.txt.gpg.
Decrypt a file
gpg --output cleartext.txt --decrypt cleartext.txt.gpg
GnuPG will ask for your passphrase and output the file to cleartext.txt.