Table of content
So today my PGP keys got expired, though why shouldn't write about it?
PGP (Pretty Good Privacy) is an encryption program which is used to do digital signature, encrypting files and text and decrypting.
It will ask your name, e-mail and a passphrase. And then it will generate a public and private key along with a revocation certificate. Make sure you save your private key and revocation certificate securely and make sure yo don't share it with anyone.
gpg --output ~/mypub.key --armor --export <your email>
They are used for storing and retrieving public key. And keyserver shares the key to a network of keyservers, so your key is not stored in a single keyserver.
gpg --send-keys --keyserver <keyserver> <Key-ID>
gpg --keyserver <keyserver> --search-keys <name or email address>
Just make sure you verify the fingerprint with the key owner before use.
-r is for recipient you want to encrypt for just enter there email. And
-e encrypts it.
gpg -r <email> -e filename
You will get a
-d tag to decrypt file.
gpg -d filename.gpg
Then you will be promoted to enter you passphrase to decrypt it.
You can also use your PGP with your email client or other apps.