knowledge/technology/tools/GPG.md
2023-12-04 11:02:23 +01:00

69 lines
1 KiB
Markdown
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

---
aliases: ["PGP", "GnuPG", "OpenPGP"]
website: https://www.gnupg.org/
obj: application
---
# GPG
gpg is the OpenPGP part of the GNU Privacy Guard (GnuPG). It is a tool to provide digital encryption and signing services using the OpenPGP standard. gpg features complete key management and all the bells and whistles you would expect from a full OpenPGP implementation.
#refactor add options + refactor
## Commands
**Sign:**
```shell
gpg --sign
gpg -s
gpg --clear-sign # Sign with clear text
```
**Encrypt:**
```shell
gpg --encrypt
gpg -e
```
**Symmetric Encryption:**
```shell
gpg --symmetric
gpg -c
```
**Decrypt:**
```shell
gpg --decrypt
gpg -d
```
**Verify:**
```shell
gpg --verify
```
## Keys
**List keys:**
```shell
gpg --list-keys
gpg -k # List public keys
gpg -K # List private keys
```
**Generate key:**
```shell
gpg --generate-key
```
**Import & export keys:**
```shell
gpg --export
gpg --import
```
**Key selection:**
```shell
 -r, --recipient KEY # Encrypt for key
 -u, --local-user KEY # Use this key
```