GPG usage

Create

1
2
gpg --gen-key
gpg --full-generate-key

Delete

1
2
gpg --delete-keys $UID
gpg --delete-secret-keys $UID

List key

1
2
gpg --list-key #list public key
gpg --list-secret-keys #list private key

Encrypt

1
2
gpg -s --default-key $UID plain-text
gpg -r $UID --encrypt plain-text

Decrypt

1
2
gpg -d < cipher-text
gpg -r $UID --decrypt cipher-text

Import Key

1
gpg --import my-private-key.asc

Export key

1
2
gpg --export --armor $UID
gpg --export-secret-keys $UID

GPG usage
https://rug.al/2018/2018-10-03-gpg-usage/
Author
Rugal Bernstein
Posted on
October 3, 2018
Licensed under