Projet

Général

Profil

Tuto pgp » Historique » Version 6

pizzacoca, 12/09/2018 22:34

1 1 pizzacoca
# Tutos pgp
2
3 5 pizzacoca
## Liens externes
4
5
### Manuel Gnupgp
6 1 pizzacoca
https://www.gnupg.org/gph/fr/manual.html#AEN248
7
https://linux.die.net/man/1/gpg2
8
9 5 pizzacoca
### Création des clefs
10 1 pizzacoca
https://keyring.debian.org/creating-key.html
11
http://ekaia.org/blog/2009/05/10/creating-new-gpgkey/
12
https://www.activpart.com/utiliser-openpgp-linux-debian-gnupg/
13
https://help.github.com/articles/generating-a-new-gpg-key/
14
http://gpglinux.free.fr/
15
16 5 pizzacoca
### Gestion des clefs
17 1 pizzacoca
https://gnupg.org/documentation/manuals/gnupg/OpenPGP-Key-Management.html#OpenPGP-Key-Management
18
https://wiki.faimaison.net/doku.php?id=gpg&s[]=gpg
19
20 5 pizzacoca
### Signature des clefs
21 1 pizzacoca
https://www.debian.org/events/keysigning.fr.html
22 2 pizzacoca
23 5 pizzacoca
### Les copains 
24 1 pizzacoca
http://www.giroll.org/
25 3 pizzacoca
26
## En ligne de commande
27 4 pizzacoca
28
Installation de l'outil
29
30
~~~
31
sudo apt-get install gnupg
32
~~~
33
34
35
Génération de la clef
36
37
~~~
38
gpg --full-generate-key
39
~~~
40
41
Il y aura un premier lot de choix à réaliser (type d'utilisation, degré de chiffrement, durée de validité) 
42
> gpg: keyring `/home/user/.gnupg/secring.gpg' created
43
gpg: keyring `/home/user/.gnupg/pubring.gpg' created
44
Please select what kind of key you want:
45
   (1) RSA and RSA (default)
46
   (2) DSA and Elgamal
47
   (3) DSA (sign only)
48
   (4) RSA (sign only)
49
Your selection? **1**
50
RSA keys may be between 1024 and 4096 bits long.
51
What keysize do you want? (2048) **4096**
52
Requested keysize is 4096 bits
53
Please specify how long the key should be valid.
54
         0 = key does not expire
55
      <n>  = key expires in n days
56
      <n>w = key expires in n weeks
57
      <n>m = key expires in n months
58
      <n>y = key expires in n years
59
Key is valid for? (0) **3y**
60
Key expires at Tue 11 May 2019 12:53:08 AM EDT
61
Is this correct? (y/N) **y**
62
63
Ensuite viendront d'autres questions concernant votre identité puis le **mot de passe**
64
65
> You need a user ID to identify your key; the software constructs the user ID
66
from the Real Name, Comment and Email Address in this form:
67
    "Heinrich Heine (Der Dichter) <heinrichh@duesseldorf.de>"
68
Real name: **Test User**
69
Email address: **test@example.org**
70
Comment: 
71
You selected this USER-ID:
72
    "Test User <test@example.org>"
73
Change (N)ame, (C)omment, (E)mail or (O)kay/(Q)uit? **o**
74
You need a Passphrase to protect your secret key.
75
passphrase not correctly repeated; try again.
76
We need to generate a lot of random bytes. It is a good idea to perform
77
some other action (type on the keyboard, move the mouse, utilize the
78
disks) during the prime generation; this gives the random number
79
generator a better chance to gain enough entropy.
80
..........+++++
81
82
A ce moment-là c'est une bonne idée de lancer une vidéo, faire des trucs sur le pc
83
(note : il existe un utilitaire qui crée de l'entropie tout seul mais 'jme rapelle plus de son nom)
84
85
> .................................+++++
86
We need to generate a lot of random bytes. It is a good idea to perform
87
some other action (type on the keyboard, move the mouse, utilize the
88
disks) during the prime generation; this gives the random number
89
generator a better chance to gain enough entropy.
90
........+++++
91
.......+++++
92
gpg: /home/user/.gnupg/trustdb.gpg: trustdb created
93
gpg: key 23955501 marked as ultimately trusted
94
public and secret key created and signed.
95
96
A ce moment-là les clefs sont crées (probablement dans ~/.gnupg
97 6 pizzacoca
98
###Génération du certificat de révocation
99
100
101
### Envoi de la clef
102
103
gpg --keyserver pool.sks-keyservers.net --send-key '519D 4592 3D31 56E6 B7A8  269E F9E2 35C3 2395 5501'
104
105
### Edition d'une clef
106
107
gpg --edit-key 285AFE12FFC70E5B8A950BB0FF2DCF039EB27061