About
GnuPG implements the OpenPGP standard for encrypting, decrypting, signing and verifying content. Use it for end-to-end encryption of files and email. Keys live in a keyring you can back up and move.
Install it
pkg install gnupg
Run this inside Termux. If the package is already present, pkg will say so and
do nothing.
Commands worth knowing
6 of the invocations you will actually reach for. Tap the copy button to put one on your clipboard.
gpg --gen-key Create a new key pair and attach your name and email to it. gpg --list-keys Show the public keys in your keyring along with their identifiers. gpg -e -r user@example.com notes.txt Encrypt a file to a public key. Only its holder can read it. gpg -d secret.pgp Decrypt a file sent to one of your keys. gpg --sign --armor notes.txt Produce a readable signature proving a file came from you. gpg --verify notes.txt.asc Check a detached signature against its file and report whether it is valid. Worked example
Run gpg -d notes.txt.gpg and this is what you should see.
$ gpg -d notes.txt.gpg
encrypted with 4096-bit RSA key, ID 1A2B3C4D
decrypted 2.1 KiB to notes.txt
Plaintext written to notes.txt Developed by
The GnuPG Project · released under GPL-3.0.