GPG
GNU Privacy Guard (GnuPG or GPG),replacement of PGP(Pretty Good Privacy) a free-software tool used to bring out encryption, it features a versatile key management system.
Installation¶
$ sudo apt install gnupg
Usage¶
To create Public and Private Keys¶
$ gpg --gen-key
List Keys¶
$ gpg --fingerprint ibaydan
Register To Key server¶
$ gpg --keyserver gpg.mit.edu --send-keys 003D114F
Export Public Key in ASCII formats¶
$ gpg --armor --output pubkey.txt --export 'ibaydan'
Encrypt A file¶
$ gpg --encrypt --recipient 'ibayadan' --output ServerPass.txt.enc ServerPass.txt
Decrypt A file¶
$ gpg --output foo.txt --decrypt ServerPass.txt.enc
List Installed Keys¶
$ gpg --list-keys
Delete Key¶
$ gpg --delete-key ibayadan
Delete Key with Secret Keys¶
$ gpg --delete-secret-keys '[email protected]'
References¶
For more information about the tool,
$ man gpg