GPG: Tasks 101 
Common tasks:
[acool@localhost ~]$ gpg --version
...
[acool@localhost ~]$ gpg --gen-key
...
# make entropy faster
[acool@localhost ~]$ sudo rngd -r /dev/urandom
...
[acool@localhost ~]$ gpg --list-keys
...
# exports public key
[acool@localhost ~]$ gpg --export --armor
...
[acool@localhost ~]$ gpg --export-secret-key --armor
...
# symmetric-encrypting a file
[acool@localhost ~]$ gpg --symmetric --cipher-algo AES256 top-secret.txt
...
[acool@localhost ~]$ gpg --interactive --edit-key "gpg-id-email"
gpg> showpref
...
[acool@localhost ~]$ gpg --fingerprint "gpg-id-email"
...
[acool@localhost ~]$ gpg --delete-keys "gpg-id-email"

Pass
[acool@localhost ~]$ pass init "gpg-id-email"
...



12/19/2020 - Encrypt and decrypt existing file.

[acool@localhost ~]$ echo "Confidential information goes here." > secret-message.txt
[acool@localhost ~]$
[acool@localhost ~]$ # encrypt it!
[acool@localhost ~]$ gpg --output secret-message.txt.gpg --recipient acool.pgp@10-network.net --armor --encrypt secret-message.txt
[acool@localhost ~]$
[acool@localhost ~]$
[acool@localhost ~]$ cat secret-message.txt.gpg
-----BEGIN PGP MESSAGE-----

hQIMA2ZQHKXHI4G5AQ//f1JwJREZGa904w5Ev1svX/dbyydDb7FBowjnVG2Ne3eO
BZS1VqV+Zjq9j0HgQ6W86j4bYOwwqgW0YYtixBRr3+TFBoN8bBSxaMTLo6w+MHEL
iPJo1FIyDm5gYyljQBE4CLISJan9wsIIuSX4RcH+yNV7kYlK/eWJDstlX/1GW7bA
P6gcNpGNtliFwZZzsC88+qCOg3kX9iEBPcAmRUNg1Tk1s1AHX3MD5pO/dV8HIJ8N
Byti/jyd+X/DbJT6r8rDwwsY320vwNWU4QrLnsoRc34ce2q3V6avXKX9Fj+94xXo
5c00NzI55MVE9jdTDakD2H4xrI40trFg6pOB2JRrxeS7AUg4Ae+tRidAOP0qGgM9
jsOY+ToPFcetMwVNZ+Tw4d7VCN/4/vimHeZ6DRAo6kfqVTkJVVtkYvyRr6r0UxvO
Bdk0p7rmrhMu1jHAcwxSGSZZLKRPYe01W/WIbazF5Q3Mb6fmg8K6sqoRaFdiY036
XIx+QjjjG2PoLJlZ31LwSyQyFhd4hGIk0mbXmXFwY+Vo9cpToaTIcahqAY8wdieM
fwP/w5w2jbhNYYte69e+YC9C38uYMihX47IEtUGYhVUQYRRH085cYL/0Rc68uMDd
oiXIynlT7fzbSMwD6aNTYe3dRwKpd+ZJ8ri6FO9E0bbA3E3feJseLktpmRZxETTS
cQF9fN7hl7fFK7dU/KAdpNJz0ihRV9UofEOrEM1svtcPViLBF0oYNMv5qbtLgO0y
NU4mCjZHH+F00AouErS5VrDRC6/D748t0nNOlTLAp/0MONRBSKDqzDEM8pPB1AIX
jrDesP+iYqNgBnZe9qRVSXQ3
=65wR
-----END PGP MESSAGE-----
[acool@localhost ~]$
[acool@localhost ~]$
[acool@localhost ~]$ #decrypt it!
[acool@localhost ~]$ gpg --output output.txt --decrypt secret-message.txt.gpg
[acool@localhost ~]$
[acool@localhost ~]$ # see decrypted information
[acool@localhost ~]$ cat output.txt
Confidential information goes here.
[acool@localhost ~]$



Comments
Comments are not available for this entry.
2024 By Angel Cool