pgp.rst
author Oleksandr Gavenko <gavenkoa@gmail.com>
Sun, 29 Nov 2015 18:29:24 +0200
changeset 1790 987efe85d42c
parent 1018 3bed672ff6b9
permissions -rw-r--r--
Fix gpg: Invalid option "-list-keys"
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
899
7b4265c8d324 Set fill-column as directory local var.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 859
diff changeset
     1
-*- mode: outline; coding: utf-8; -*-
9
0708b9adfc81 Added pgp man.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
     2
0708b9adfc81 Added pgp man.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
     3
* What preffered client?
0708b9adfc81 Added pgp man.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
     4
0708b9adfc81 Added pgp man.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
     5
GNU gpg.
0708b9adfc81 Added pgp man.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
     6
0708b9adfc81 Added pgp man.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
     7
* How import keys from key-server?
0708b9adfc81 Added pgp man.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
     8
1016
a8299102ebb1 How export key?
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 899
diff changeset
     9
  $  gpg --keyserver pgp.mit.edu --recv-keys $KEYID
a8299102ebb1 How export key?
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 899
diff changeset
    10
1017
4d55773cff4a Fix typo.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1016
diff changeset
    11
* How mark key as trusted?
4d55773cff4a Fix typo.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1016
diff changeset
    12
4d55773cff4a Fix typo.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1016
diff changeset
    13
  $ gpg --edit-key $KEYID trust
4d55773cff4a Fix typo.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1016
diff changeset
    14
1016
a8299102ebb1 How export key?
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 899
diff changeset
    15
* How export key?
a8299102ebb1 How export key?
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 899
diff changeset
    16
a8299102ebb1 How export key?
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 899
diff changeset
    17
  $ gpg -a --export $KEYID >$FILE.asc
1018
3bed672ff6b9 How delete key?
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1017
diff changeset
    18
  $ gpg --output $PRIVKEY.gpg --armor --export-secret-key $KEYID
859
c8a5bbbc27c6 Using gpg.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 735
diff changeset
    19
c8a5bbbc27c6 Using gpg.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 735
diff changeset
    20
* How create own PGP key?
c8a5bbbc27c6 Using gpg.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 735
diff changeset
    21
c8a5bbbc27c6 Using gpg.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 735
diff changeset
    22
  $ gpg --gen-key   # answer the question
c8a5bbbc27c6 Using gpg.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 735
diff changeset
    23
...
c8a5bbbc27c6 Using gpg.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 735
diff changeset
    24
  $ gpg -o $keyfile --export-secret-keys $NAME
c8a5bbbc27c6 Using gpg.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 735
diff changeset
    25
c8a5bbbc27c6 Using gpg.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 735
diff changeset
    26
* How import keys from file?
c8a5bbbc27c6 Using gpg.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 735
diff changeset
    27
c8a5bbbc27c6 Using gpg.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 735
diff changeset
    28
  $ gpg --import $keyfile
c8a5bbbc27c6 Using gpg.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 735
diff changeset
    29
c8a5bbbc27c6 Using gpg.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 735
diff changeset
    30
* How submit public key to key server?
c8a5bbbc27c6 Using gpg.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 735
diff changeset
    31
1016
a8299102ebb1 How export key?
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 899
diff changeset
    32
  $ gpg --keyserver pgp.mit.edu --send-key $KEYID
859
c8a5bbbc27c6 Using gpg.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 735
diff changeset
    33
1018
3bed672ff6b9 How delete key?
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1017
diff changeset
    34
* What keys in local db?
859
c8a5bbbc27c6 Using gpg.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 735
diff changeset
    35
1790
987efe85d42c Fix gpg: Invalid option "-list-keys"
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1018
diff changeset
    36
  $ gpg --list-keys
987efe85d42c Fix gpg: Invalid option "-list-keys"
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1018
diff changeset
    37
  $ gpg --list-keys $KEYID
987efe85d42c Fix gpg: Invalid option "-list-keys"
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1018
diff changeset
    38
  $ gpg --list-keys $EMAIL
859
c8a5bbbc27c6 Using gpg.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 735
diff changeset
    39
1018
3bed672ff6b9 How delete key?
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1017
diff changeset
    40
  $ gpg --list-secret-keys
3bed672ff6b9 How delete key?
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1017
diff changeset
    41
3bed672ff6b9 How delete key?
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1017
diff changeset
    42
* How delete key?
3bed672ff6b9 How delete key?
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1017
diff changeset
    43
3bed672ff6b9 How delete key?
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1017
diff changeset
    44
  $ gpg --delete-key $KEYID
3bed672ff6b9 How delete key?
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1017
diff changeset
    45
  $ gpg --delete-key $USER
3bed672ff6b9 How delete key?
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1017
diff changeset
    46
  $ gpg --delete-key $EMAIL
3bed672ff6b9 How delete key?
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1017
diff changeset
    47
3bed672ff6b9 How delete key?
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1017
diff changeset
    48
  $ gpg --delete-secret-key $KEYID
3bed672ff6b9 How delete key?
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1017
diff changeset
    49
859
c8a5bbbc27c6 Using gpg.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 735
diff changeset
    50
* How sign file?
c8a5bbbc27c6 Using gpg.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 735
diff changeset
    51
c8a5bbbc27c6 Using gpg.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 735
diff changeset
    52
To sign with first key
c8a5bbbc27c6 Using gpg.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 735
diff changeset
    53
c8a5bbbc27c6 Using gpg.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 735
diff changeset
    54
  $ gpg -o $file.sig --sign $file
c8a5bbbc27c6 Using gpg.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 735
diff changeset
    55
  $ gpg --default-key $NAME -o $file.sig --sign $file
c8a5bbbc27c6 Using gpg.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 735
diff changeset
    56
  $ gpg -u ${USER_NAME} -o $file.sig --sign $file
c8a5bbbc27c6 Using gpg.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 735
diff changeset
    57
c8a5bbbc27c6 Using gpg.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 735
diff changeset
    58
* How verify signature?
c8a5bbbc27c6 Using gpg.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 735
diff changeset
    59
c8a5bbbc27c6 Using gpg.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 735
diff changeset
    60
  $ gpg --verify $file.sig
c8a5bbbc27c6 Using gpg.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 735
diff changeset
    61