Notes and References
sudo pacman -S gnupg
chmod 0700 ~/.gnupg/
export GNUPGHOME=/tmp/gnupg
gpg --list-keys
gpg --full-generate-key
gpg --full-generate-key --expire-date YYYY-MM-DD
gpg --full-generate-key --default-key-algo rsa4096
gpg --list-secret-keys --with-subkey-fingerprints
gpg --edit-key [email protected]
addkey
gpg --edit-key [email protected]
expire
gpg --edit-key [email protected]
passwd
gpg --output [email protected] --gen-revoke [email protected]
# Revoke the key with this revoke certificate generated above
gpg --import [email protected]
gpg --edit-key [email protected]
revkey
gpg --edit-key [email protected]
trust
gpg --delete-keys [email protected]
!! UNSAFE, BE CAREFUL !!
gpg --delete-secret-keys [email protected]
gpg --search-keys [email protected]
gpg --recv-keys KEY_ID
gpg --export --armor [email protected] > public_key.gpg
gpg --export --armor --output [email protected] [email protected]
gpg --export --armor --output your_public_key.gpg YOUR_EMAIL
gpg --list-keys --keyid-format LONG YOUR_GPG_EMAIL
gpg --send-keys YOUR_KEY_ID_FROM_ABOVE
gpg --import their_public_key.gpg
gpg --export-secret-keys --armor [email protected] > private_key.asc
gpg --import private_key.asc
gpg --encrypt --recipient [email protected] file.txt
gpg --decrypt file.txt.gpg > decrypted_file.txt
gpg --symmetric file.txt
gpg --decrypt file.txt.gpg
gpg --encrypt --recipient [email protected] --recipient [email protected] file.txt
gpg --symmetric --cipher-algo AES256 --recipient [email protected] --recipient [email protected] file.txt
gpg --sign --encrypt --armor --recipient [email protected] file.txt
gpg --decrypt file.txt.gpg | gpg --verify file.txt.sig
gpg --gen-random --armor 1 12
gpg --sign file.txt
gpg --verify file.txt.sig
nano ~/.gnupg/gpg.conf
# Add/edit the line:
# keyserver hkps://keys.openpgp.org
cp -r ~/.gnupg/ /path/to/backup/location
gpg --export-secret-keys --output [email protected] --armor [email protected]