[gpg]: update
This commit is contained in:
parent
d9cb7a2015
commit
f0ba596bb1
@ -2,90 +2,129 @@
|
||||
|
||||
### Generate
|
||||
|
||||
gpg --full-gen-key
|
||||
```console
|
||||
$ gpg --full-gen-key
|
||||
```
|
||||
|
||||
### Basic usage
|
||||
|
||||
Signature sig mode:
|
||||
|
||||
gpg --detach-sign file.ext
|
||||
```console
|
||||
$ gpg --detach-sign file.ext
|
||||
```
|
||||
|
||||
Signature asc mode:
|
||||
|
||||
gpg --armor --sign file.ext
|
||||
```console
|
||||
$ gpg --armor --sign file.ext
|
||||
```
|
||||
|
||||
Verify:
|
||||
|
||||
gpg --verify file.sig
|
||||
```console
|
||||
$ gpg --verify file.sig
|
||||
```
|
||||
|
||||
### My user-id
|
||||
|
||||
gpg -K
|
||||
```console
|
||||
$ gpg -K
|
||||
```
|
||||
|
||||
### All users-ids
|
||||
|
||||
gpg -k
|
||||
```console
|
||||
$ gpg -k
|
||||
```
|
||||
|
||||
### Copy Public Key
|
||||
|
||||
gpg --export --armor <user-id> | xclip -sel clip
|
||||
```console
|
||||
$ gpg --export --armor <user-id> | xclip -sel clip
|
||||
```
|
||||
|
||||
### Copy Private key (Caution)
|
||||
|
||||
gpg --export-secret-keys -a <user-id> | xclip -sel clip
|
||||
```console
|
||||
$ gpg --export-secret-keys -a <user-id> | xclip -sel clip
|
||||
```
|
||||
|
||||
### Change password gpg
|
||||
|
||||
gpg --edit-key <user-id>
|
||||
|
||||
passwd
|
||||
```console
|
||||
$ gpg --edit-key <user-id>
|
||||
passwd
|
||||
```
|
||||
|
||||
### Debug gpg
|
||||
|
||||
dirmngr --debug-level guru
|
||||
```console
|
||||
$ dirmngr --debug-level guru
|
||||
```
|
||||
|
||||
### Import key:
|
||||
|
||||
gpg --recv-keys $esefingerprint
|
||||
```console
|
||||
$ gpg --recv-keys $esefingerprint
|
||||
```
|
||||
|
||||
### Import key from server:
|
||||
|
||||
gpg --recv-keys <user-id> --keyserver pgp.mit.edu
|
||||
```console
|
||||
$ gpg --recv-keys <user-id> --keyserver pgp.mit.edu
|
||||
```
|
||||
|
||||
### Export key 0:
|
||||
|
||||
gpg --export --armor <user-id> > public.key
|
||||
```console
|
||||
$ gpg --export --armor <user-id> > public.key
|
||||
```
|
||||
|
||||
### Export key 1:
|
||||
|
||||
gpg --armor --output public.key --export <user-id>
|
||||
```console
|
||||
$ gpg --armor --output public.key --export <user-id>
|
||||
```
|
||||
|
||||
### Export key to server
|
||||
|
||||
gpg --keyserver pgp.mit.edu --send-keys <user-id>
|
||||
```console
|
||||
$ gpg --keyserver pgp.mit.edu --send-keys <user-id>
|
||||
```
|
||||
|
||||
## Cifrado
|
||||
### Cifrado simétrico
|
||||
#### Cifrar
|
||||
|
||||
gpg --symmetric <miarchivo>
|
||||
```console
|
||||
$ gpg --symmetric <miarchivo>
|
||||
```
|
||||
|
||||
#### Descifrado
|
||||
|
||||
gpg --output <archivo.ext> --decrypt <archivo.gpg>
|
||||
```console
|
||||
$ gpg --output <archivo.ext> --decrypt <archivo.gpg>
|
||||
```
|
||||
|
||||
### Cifrado Asimétrico
|
||||
#### Encryt
|
||||
|
||||
gpg --recipient <user-id> --encrypt archivo.ext
|
||||
```console
|
||||
$ gpg --recipient <user-id> --encrypt archivo.ext
|
||||
```
|
||||
|
||||
#### Decrypt
|
||||
|
||||
gpg --output archivo.ext --decrypt archivo.ext.gpg
|
||||
```console
|
||||
$ gpg --output archivo.ext --decrypt archivo.ext.gpg
|
||||
```
|
||||
|
||||
## Refresh keys
|
||||
|
||||
gpg --refresh-keys
|
||||
```console
|
||||
$ gpg --refresh-keys
|
||||
```
|
||||
|
||||
### wiki
|
||||
https://www.gnupg.org/gph/es/manual/book1.html
|
||||
|
Loading…
x
Reference in New Issue
Block a user