~ubuntu-branches/ubuntu/precise/gnupg2/precise-updates

« back to all changes in this revision

Viewing changes to doc/faq.html

  • Committer: Bazaar Package Importer
  • Author(s): Eric Dorland
  • Date: 2011-02-13 16:06:41 UTC
  • mto: (1.1.15 upstream) (7.1.6 sid)
  • mto: This revision was merged to the branch mainline in revision 17.
  • Revision ID: james.westby@ubuntu.com-20110213160641-2vzropar4rtzwybv
ImportĀ upstreamĀ versionĀ 2.0.17

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
<html><head>
2
 
<title>GnuPG FAQ</title>
3
 
</head>
4
 
<body>
5
 
<body bgcolor=#ffffff text=#000000 link=#1f00ff alink=#ff0000 vlink=#9900dd>
6
 
<h1>GnuPG Frequently Asked Questions</h1>
7
 
<P>
8
 
<P>
9
 
<p>
10
 
Version: 1.6.3<br>
11
 
Last-Modified: Jul 30, 2003<br>
12
 
Maintained-by: David D. Scribner, &lt;faq 'at' gnupg.org&gt;
13
 
</p>
14
 
<P>
15
 
<P>
16
 
This is the GnuPG FAQ. The latest HTML version is available
17
 
<a href=http://www.gnupg.org/documentation/faqs.html>here</a>.
18
 
<P>
19
 
The index is generated automatically, so there may be errors. Not all
20
 
questions may be in the section they belong to. Suggestions about how
21
 
to improve the structure of this FAQ are welcome.
22
 
<P>
23
 
Please send additions and corrections to the maintainer. It would be
24
 
most convenient if you could provide the answer to be included here
25
 
as well. Your help is very much appreciated!
26
 
<P>
27
 
Please, don't send message like &quot;This should be a FAQ - what's the
28
 
answer?&quot;. If it hasn't been asked before, it isn't a FAQ. In that case
29
 
you could search in the mailing list archive.
30
 
<P>
31
 
<hr>
32
 
<menu>
33
 
<h2><A HREF=#q1>1. GENERAL
34
 
</A></h2>
35
 
<LI><a HREF=#q1.1>1.1) What is GnuPG?
36
 
</a>
37
 
<LI><a HREF=#q1.2>1.2) Is GnuPG compatible with PGP?
38
 
</a>
39
 
<LI><a HREF=#q1.3>1.3) Is GnuPG free to use for personal or commercial use?
40
 
</a>
41
 
<LI><a HREF=#q1.4>1.4) What conventions are used in this FAQ?
42
 
</a>
43
 
<h2><A HREF=#q2>2. SOURCES of INFORMATION
44
 
</A></h2>
45
 
<LI><a HREF=#q2.1>2.1) Where can I find more information on GnuPG?
46
 
</a>
47
 
<LI><a HREF=#q2.2>2.2) Where do I get GnuPG?
48
 
</a>
49
 
<h2><A HREF=#q3>3. INSTALLATION 
50
 
</A></h2>
51
 
<LI><a HREF=#q3.1>3.1) Which OSes does GnuPG run on?
52
 
</a>
53
 
<LI><a HREF=#q3.2>3.2) Which random data gatherer should I use?
54
 
</a>
55
 
<LI><a HREF=#q3.3>3.3) How do I include support for RSA and IDEA?
56
 
</a>
57
 
<h2><A HREF=#q4>4. USAGE
58
 
</A></h2>
59
 
<LI><a HREF=#q4.1>4.1) What is the recommended key size?
60
 
</a>
61
 
<LI><a HREF=#q4.2>4.2) Why does it sometimes take so long to create keys?
62
 
</a>
63
 
<LI><a HREF=#q4.3>4.3) And it really takes long when I work on a remote system. Why?
64
 
</a>
65
 
<LI><a HREF=#q4.4>4.4) What is the difference between options and commands?
66
 
</a>
67
 
<LI><a HREF=#q4.5>4.5) I can't delete a user ID on my secret keyring because it has
68
 
    already been deleted on my public keyring. What can I do?
69
 
</a>
70
 
<LI><a HREF=#q4.6>4.6) I can't delete my secret key because the public key disappeared.
71
 
    What can I do?
72
 
</a>
73
 
<LI><a HREF=#q4.7>4.7) What are trust, validity and ownertrust?
74
 
</a>
75
 
<LI><a HREF=#q4.8>4.8) How do I sign a patch file?
76
 
</a>
77
 
<LI><a HREF=#q4.9>4.9) Where is the &quot;encrypt-to-self&quot; option?
78
 
</a>
79
 
<LI><a HREF=#q4.10>4.10) How can I get rid of the Version and Comment headers in armored
80
 
    messages?
81
 
</a>
82
 
<LI><a HREF=#q4.11>4.11) What does the &quot;You are using the xxxx character set.&quot; mean?
83
 
</a>
84
 
<LI><a HREF=#q4.12>4.12) How can I get list of key IDs used to encrypt a message?
85
 
</a>
86
 
<LI><a HREF=#q4.13>4.13) Why can't I decrypt files encrypted as symmetrical-only (-c) with
87
 
    a version of GnuPG prior to 1.0.1.
88
 
</a>
89
 
<LI><a HREF=#q4.14>4.14) How can I use GnuPG in an automated environment?
90
 
</a>
91
 
<LI><a HREF=#q4.15>4.15) Which email-client can I use with GnuPG?
92
 
</a>
93
 
<LI><a HREF=#q4.16>4.16) Can't we have a gpg library?
94
 
</a>
95
 
<LI><a HREF=#q4.17>4.17) I have successfully generated a revocation certificate, but I don't
96
 
    understand how to send it to the key servers.
97
 
</a>
98
 
<LI><a HREF=#q4.18>4.18) How do I put my keyring in a different directory?
99
 
</a>
100
 
<LI><a HREF=#q4.19>4.19) How do I verify signed packages?
101
 
</a>
102
 
<LI><a HREF=#q4.20>4.20) How do I export a keyring with only selected signatures (keys)?
103
 
</a>
104
 
<LI><a HREF=#q4.21>4.21) I still have my secret key, but lost my public key. What can I do?
105
 
</a>
106
 
<LI><a HREF=#q4.22>4.22) Clearsigned messages sent from my web-mail account have an invalid
107
 
    signature. Why?
108
 
</a>
109
 
<h2><A HREF=#q5>5. COMPATIBILITY ISSUES
110
 
</A></h2>
111
 
<LI><a HREF=#q5.1>5.1) How can I encrypt a message with GnuPG so that PGP is able to decrypt it?
112
 
</a>
113
 
<LI><a HREF=#q5.2>5.2) How do I migrate from PGP 2.x to GnuPG?
114
 
</a>
115
 
<LI><a HREF=#q5.3>5.3) (removed)
116
 
</a>
117
 
<LI><a HREF=#q5.4>5.4) Why is PGP 5.x not able to encrypt messages with some keys?
118
 
</a>
119
 
<LI><a HREF=#q5.5>5.5) Why is PGP 5.x not able to verify my messages?
120
 
</a>
121
 
<LI><a HREF=#q5.6>5.6) How do I transfer owner trust values from PGP to GnuPG?
122
 
</a>
123
 
<LI><a HREF=#q5.7>5.7) PGP does not like my secret key.
124
 
</a>
125
 
<LI><a HREF=#q5.8>5.8) GnuPG no longer installs a ~/.gnupg/options file. Is it missing?
126
 
</a>
127
 
<LI><a HREF=#q5.9>5.9) How do you export GnuPG keys for use with PGP?
128
 
</a>
129
 
<h2><A HREF=#q6>6. PROBLEMS and ERROR MESSAGES
130
 
</A></h2>
131
 
<LI><a HREF=#q6.1>6.1) Why do I get &quot;gpg: Warning: using insecure memory!&quot;
132
 
</a>
133
 
<LI><a HREF=#q6.2>6.2) Large File Support doesn't work ...
134
 
</a>
135
 
<LI><a HREF=#q6.3>6.3) In the edit menu the trust values are not displayed correctly after
136
 
    signing uids. Why?
137
 
</a>
138
 
<LI><a HREF=#q6.4>6.4) What does &quot;skipping pubkey 1: already loaded&quot; mean?
139
 
</a>
140
 
<LI><a HREF=#q6.5>6.5) GnuPG 1.0.4 doesn't create ~/.gnupg ...
141
 
</a>
142
 
<LI><a HREF=#q6.6>6.6) An Elgamal signature does not verify anymore since version 1.0.2 ...
143
 
</a>
144
 
<LI><a HREF=#q6.7>6.7) Old versions of GnuPG can't verify Elgamal signatures
145
 
</a>
146
 
<LI><a HREF=#q6.8>6.8) When I use --clearsign, the plain text has sometimes extra dashes
147
 
    in it - why?
148
 
</a>
149
 
<LI><a HREF=#q6.9>6.9) What is the thing with &quot;can't handle multiple signatures&quot;?
150
 
</a>
151
 
<LI><a HREF=#q6.10>6.10) If I submit a key to a keyserver, nothing happens ...
152
 
</a>
153
 
<LI><a HREF=#q6.11>6.11) I get &quot;gpg: waiting for lock ...&quot;
154
 
</a>
155
 
<LI><a HREF=#q6.12>6.12) Older gpg binaries (e.g., 1.0) have problems with keys from newer
156
 
    gpg binaries ...
157
 
</a>
158
 
<LI><a HREF=#q6.13>6.13) With 1.0.4, I get &quot;this cipher algorithm is deprecated ...&quot;
159
 
</a>
160
 
<LI><a HREF=#q6.14>6.14) Some dates are displayed as ????-??-??. Why?
161
 
</a>
162
 
<LI><a HREF=#q6.15>6.15) I still have a problem. How do I report a bug?
163
 
</a>
164
 
<LI><a HREF=#q6.16>6.16) Why doesn't GnuPG support X.509 certificates?
165
 
</a>
166
 
<LI><a HREF=#q6.17>6.17) Why do national characters in my user ID look funny?
167
 
</a>
168
 
<LI><a HREF=#q6.18>6.18) I get 'sed' errors when running ./configure on Mac OS X ...
169
 
</a>
170
 
<LI><a HREF=#q6.19>6.19) Why does GnuPG 1.0.6 bail out on keyrings used with 1.0.7?
171
 
</a>
172
 
<LI><a HREF=#q6.20>6.20) I upgraded to GnuPG version 1.0.7 and now it takes longer to load my
173
 
    keyrings. What can I do?
174
 
</a>
175
 
<LI><a HREF=#q6.21>6.21) Doesn't a fully trusted user ID on a key prevent warning messages
176
 
    when encrypting to other IDs on the key?
177
 
</a>
178
 
<LI><a HREF=#q6.22>6.22) I just compiled GnuPG from source on my GNU/Linux RPM-based system
179
 
    and it's not working. Why?
180
 
</a>
181
 
<h2><A HREF=#q7>7. ADVANCED TOPICS
182
 
</A></h2>
183
 
<LI><a HREF=#q7.1>7.1) How does this whole thing work?
184
 
</a>
185
 
<LI><a HREF=#q7.2>7.2) Why are some signatures with an ELG-E key valid?
186
 
</a>
187
 
<LI><a HREF=#q7.3>7.3) How does the whole trust thing work?
188
 
</a>
189
 
<LI><a HREF=#q7.4>7.4) What kind of output is this: &quot;key C26EE891.298, uid 09FB: ....&quot;?
190
 
</a>
191
 
<LI><a HREF=#q7.5>7.5) How do I interpret some of the informational outputs?
192
 
</a>
193
 
<LI><a HREF=#q7.6>7.6) Are the header lines of a cleartext signature part of the signed
194
 
    material?
195
 
</a>
196
 
<LI><a HREF=#q7.7>7.7) What is the list of preferred algorithms?
197
 
</a>
198
 
<LI><a HREF=#q7.8>7.8) How do I change the list of preferred algorithms?
199
 
</a>
200
 
<LI><a HREF=#q7.9>7.9) How can I import all the missing signer keys?
201
 
</a>
202
 
<h2><A HREF=#q8>8. ACKNOWLEDGEMENTS
203
 
</A></h2>
204
 
</menu>
205
 
<hr>
206
 
<P>
207
 
<P>
208
 
<h2>
209
 
<A NAME=q1>1. GENERAL
210
 
</A></h2>
211
 
<P>
212
 
<h3>
213
 
<a NAME=q1.1>1.1)</a> What is GnuPG?
214
 
</h3>
215
 
<P>
216
 
<a href=http://www.gnupg.org>GnuPG</a> stands for GNU Privacy Guard and
217
 
is GNU's tool for secure communication and data storage. It can be
218
 
used to encrypt data and to create digital signatures. It includes
219
 
an advanced key management facility and is compliant with the
220
 
proposed OpenPGP Internet standard as described in <a href=http://www.rfc-editor.org/>RFC 2440</a>.
221
 
As such, it is aimed to be compatible with PGP from PGP Corp. and
222
 
other OpenPGP tools
223
 
<P>
224
 
<h3>
225
 
<a NAME=q1.2>1.2)</a> Is GnuPG compatible with PGP?
226
 
</h3>
227
 
<P>
228
 
In general, yes. GnuPG and newer PGP releases should be implementing
229
 
the OpenPGP standard. But there are some interoperability problems.
230
 
See question <a HREF=#q5.1>5.1</a> for details.
231
 
<P>
232
 
<h3>
233
 
<a NAME=q1.3>1.3)</a> Is GnuPG free to use for personal or commercial use?
234
 
</h3>
235
 
<P>
236
 
Yes. GnuPG is part of the GNU family of tools and applications built
237
 
and provided in accordance with the Free Software Foundation (FSF)
238
 
General Public License (GPL). Therefore the software is free to copy,
239
 
use, modify and distribute in accordance with that license. Please
240
 
read the file titled COPYING that accompanies the application for
241
 
more information.
242
 
<P>
243
 
<h3>
244
 
<a NAME=q1.4>1.4)</a> What conventions are used in this FAQ?
245
 
</h3>
246
 
<P>
247
 
Although GnuPG is being developed for several operating systems
248
 
(often in parallel), the conventions used in this FAQ reflect a
249
 
UNIX shell environment. For Win32 users, references to a shell
250
 
prompt (`$') should be interpreted as a command prompt (`&gt;'),
251
 
directory names separated by a forward slash (`/') may need to be
252
 
converted to a back slash (`\'), and a tilde (`~') represents a
253
 
user's &quot;home&quot; directory (reference question <a HREF=#q4.18>4.18</a> for an example).
254
 
<P>
255
 
Some command-lines presented in this FAQ are too long to properly
256
 
display in some browsers for the web page version of this file, and
257
 
have been split into two or more lines. For these commands please
258
 
remember to enter the entire command-string on one line or the
259
 
command will error, or at minimum not give the desired results. 
260
 
<P>
261
 
Please keep in mind that this FAQ contains information that may not
262
 
apply to your particular version, as new features and bug fixes are
263
 
added on a continuing basis (reference the NEWS file included with
264
 
the source or package for noteworthy changes between versions). One
265
 
item to note is that starting with GnuPG version 1.1.92 the file
266
 
containing user options and settings has been renamed from &quot;options&quot;
267
 
to &quot;gpg.conf&quot;. Information in the FAQ that relates to the options
268
 
file may be interchangable with the newer gpg.conf file in many
269
 
instances. See question <a HREF=#q5.8>5.8</a> for details.
270
 
<P>
271
 
<P>
272
 
<h2>
273
 
<A NAME=q2>2. SOURCES of INFORMATION
274
 
</A></h2>
275
 
<P>
276
 
<h3>
277
 
<a NAME=q2.1>2.1)</a> Where can I find more information on GnuPG?
278
 
</h3>
279
 
<P>
280
 
On-line resources:
281
 
<P>
282
 
<ul> 
283
 
<li>The documentation page is located at <a href=http://www.gnupg.org/documentation/>&lt;http://www.gnupg.org/documentation/&gt;</a>.
284
 
Also, have a look at the HOWTOs and the GNU Privacy Handbook (GPH,
285
 
available in English, Spanish and Russian). The latter provides a
286
 
detailed user's guide to GnuPG. You'll also find a document about how
287
 
to convert from PGP 2.x to GnuPG.
288
 
<P>
289
 
<li>At <a href=http://www.gnupg.org/documentation/mailing-lists.html>&lt;http://www.gnupg.org/documentation/mailing-lists.html&gt;</a> you'll find
290
 
an online archive of the GnuPG mailing lists. Most interesting should
291
 
be gnupg-users for all user-related issues and gnupg-devel if you want
292
 
to get in touch with the developers.
293
 
<P>
294
 
In addition, searchable archives can be found on MARC, e.g.: <br>
295
 
gnupg-users: <a href=http://marc.theaimsgroup.com/?l=gnupg-users&amp;r=1&amp;w=2>&lt;http://marc.theaimsgroup.com/?l=gnupg-users&amp;r=1&amp;w=2&gt;</a><br>
296
 
gnupg-devel: <a href=http://marc.theaimsgroup.com/?l=gnupg-devel&amp;r=1&amp;w=2>&lt;http://marc.theaimsgroup.com/?l=gnupg-devel&amp;r=1&amp;w=2&gt;</a><br>
297
 
<P>
298
 
<b>PLEASE:</b>
299
 
Before posting to a list, read this FAQ and the available documentation.
300
 
In addition, search the list archive - maybe your question has already
301
 
been discussed. This way you help people focus on topics that have not
302
 
yet been resolved.
303
 
<P>
304
 
<li>The GnuPG source distribution contains a subdirectory:
305
 
<P>
306
 
<samp>
307
 
   ./doc
308
 
</samp>
309
 
<P>
310
 
where some additional documentation is located (mainly interesting
311
 
for hackers, not the casual user).
312
 
</ul>
313
 
<P>
314
 
<h3>
315
 
<a NAME=q2.2>2.2)</a> Where do I get GnuPG?
316
 
</h3>
317
 
<P>
318
 
You can download the GNU Privacy Guard from its primary FTP server
319
 
<a href=ftp://ftp.gnupg.org/gcrypt/>&lt;ftp://ftp.gnupg.org/gcrypt/&gt;</a> or from one of the mirrors:
320
 
<P>
321
 
<a href=http://www.gnupg.org/download/mirrors.html>
322
 
   &lt;http://www.gnupg.org/download/mirrors.html&gt;
323
 
</a>
324
 
<P>
325
 
The current stable version is 1.2.2. Please upgrade to this version as
326
 
it includes additional features, functions and security fixes that may
327
 
not have existed in prior versions.
328
 
<P>
329
 
<P>
330
 
<h2>
331
 
<A NAME=q3>3. INSTALLATION 
332
 
</A></h2>
333
 
<P>
334
 
<h3>
335
 
<a NAME=q3.1>3.1)</a> Which OSes does GnuPG run on?
336
 
</h3>
337
 
<P>
338
 
It should run on most Unices as well as Windows versions (including
339
 
Windows NT/2000) and Macintosh OS/X. A list of OSes reported to be OK
340
 
is presented at:
341
 
<P>
342
 
<a href=http://www.gnupg.org/download/supported_systems.html>
343
 
   &lt;http://www.gnupg.org/download/supported_systems.html&gt;
344
 
</a>
345
 
<P>
346
 
<h3>
347
 
<a NAME=q3.2>3.2)</a> Which random data gatherer should I use?
348
 
</h3>
349
 
<P>
350
 
&quot;Good&quot; random numbers are crucial for the security of your encryption.
351
 
Different operating systems provide a variety of more or less quality
352
 
random data. Linux and *BSD provide kernel generated random data
353
 
through /dev/random - this should be the preferred choice on these
354
 
systems. Also Solaris users with the SUNWski package installed have
355
 
a /dev/random. In these cases, use the configure option:
356
 
<P>
357
 
<samp>
358
 
   --enable-static-rnd=linux
359
 
</samp>
360
 
<P>
361
 
In addition, there's also the kernel random device by Andi Maier
362
 
<a href= http://www.cosy.sbg.ac.at/~andi/SUNrand/>&lt;http://www.cosy.sbg.ac.at/~andi/SUNrand/&gt;</a>, but it's still beta. Use at your
363
 
own risk!
364
 
<P>
365
 
On other systems, the Entropy Gathering Daemon (EGD) is a good choice.
366
 
It is a perl-daemon that monitors system activity and hashes it into
367
 
random data. See the download page <a href=http://www.gnupg.org/download/>&lt;http://www.gnupg.org/download/&gt;</a>
368
 
to obtain EGD. Use:
369
 
<P>
370
 
<samp>
371
 
   --enable-static-rnd=egd
372
 
</samp>
373
 
<P>
374
 
here.
375
 
<P>
376
 
If the above options do not work, you can use the random number
377
 
generator &quot;unix&quot;. This is <B>very</B> slow and should be avoided. The
378
 
random quality isn't very good so don't use it on sensitive data.
379
 
<P>
380
 
<h3>
381
 
<a NAME=q3.3>3.3)</a> How do I include support for RSA and IDEA?
382
 
</h3>
383
 
<P>
384
 
RSA is included as of GnuPG version 1.0.3.
385
 
<P>
386
 
The official GnuPG distribution does not contain IDEA due to a patent
387
 
restriction. The patent does not expire before 2007 so don't expect
388
 
official support before then.
389
 
<P>
390
 
However, there is an unofficial module to include it even in earlier
391
 
versions of GnuPG. It's available from
392
 
<a href=ftp://ftp.gnupg.dk/pub/contrib-dk/>&lt;ftp://ftp.gnupg.dk/pub/contrib-dk/&gt;</a>. Look for:
393
 
<P>
394
 
<pre>
395
 
   idea.c.gz        (c module)
396
 
   idea.c.gz.sig    (signature file)
397
 
</pre>
398
 
<P>
399
 
<pre>
400
 
   ideadll.zip      (c module and win32 dll)
401
 
   ideadll.zip.sig  (signature file)
402
 
</pre>
403
 
<P>
404
 
Compilation directives are in the headers of these files. You will
405
 
then need to add the following line to your ~/.gnupg/gpg.conf or
406
 
~/.gnupg/options file:
407
 
<P>
408
 
<samp>
409
 
   load-extension idea
410
 
</samp>
411
 
<P>
412
 
<P>
413
 
<h2>
414
 
<A NAME=q4>4. USAGE
415
 
</A></h2>
416
 
<P>
417
 
<h3>
418
 
<a NAME=q4.1>4.1)</a> What is the recommended key size?
419
 
</h3>
420
 
<P>
421
 
1024 bit for DSA signatures; even for plain Elgamal signatures.
422
 
This is sufficient as the size of the hash is probably the weakest
423
 
link if the key size is larger than 1024 bits. Encryption keys may
424
 
have greater sizes, but you should then check the fingerprint of
425
 
this key:
426
 
<P>
427
 
<samp>
428
 
   $ gpg --fingerprint &lt;user ID&gt;
429
 
</samp>
430
 
<P>
431
 
As for the key algorithms, you should stick with the default (i.e.,
432
 
DSA signature and Elgamal encryption). An Elgamal signing key has
433
 
the following disadvantages: the signature is larger, it is hard
434
 
to create such a key useful for signatures which can withstand some
435
 
real world attacks, you don't get any extra security compared to
436
 
DSA, and there might be compatibility problems with certain PGP
437
 
versions. It has only been introduced because at the time it was
438
 
not clear whether there was a patent on DSA.
439
 
<P>
440
 
<h3>
441
 
<a NAME=q4.2>4.2)</a> Why does it sometimes take so long to create keys?
442
 
</h3>
443
 
<P>
444
 
The problem here is that we need a lot of random bytes and for that
445
 
we (on Linux the /dev/random device) must collect some random data.
446
 
It is really not easy to fill the Linux internal entropy buffer; I
447
 
talked to Ted Ts'o and he commented that the best way to fill the
448
 
buffer is to play with your keyboard. Good security has its price.
449
 
What I do is to hit several times on the shift, control, alternate,
450
 
and caps lock keys, because these keys do not produce output to the
451
 
screen. This way you get your keys really fast (it's the same thing
452
 
PGP2 does).
453
 
<P>
454
 
Another problem might be another program which eats up your random
455
 
bytes (a program (look at your daemons) that reads from /dev/random).
456
 
<P>
457
 
<h3>
458
 
<a NAME=q4.3>4.3)</a> And it really takes long when I work on a remote system. Why?
459
 
</h3>
460
 
<P>
461
 
Don't do this at all! You should never create keys or even use GnuPG
462
 
on a remote system because you normally have no physical control
463
 
over your secret key ring (which is in most cases vulnerable to
464
 
advanced dictionary attacks) - I strongly encourage everyone to only
465
 
create keys on a local computer (a disconnected laptop is probably
466
 
the best choice) and if you need it on your connected box (I know,
467
 
we all do this) be sure to have a strong password for both your
468
 
account and for your secret key, and that you can trust your system
469
 
administrator.
470
 
<P>
471
 
When I check GnuPG on a remote system via ssh (I have no Alpha here)
472
 
;-) I have the same problem. It takes a *very* long time to create
473
 
the keys, so I use a special option, --quick-random, to generate
474
 
insecure keys which are only good for some tests.
475
 
<P>
476
 
<h3>
477
 
<a NAME=q4.4>4.4)</a> What is the difference between options and commands?
478
 
</h3>
479
 
<P>
480
 
If you do a 'gpg --help', you will get two separate lists. The first
481
 
is a list of commands. The second is a list of options. Whenever you
482
 
run GPG, you <b>must</b> pick exactly one command (with one exception,
483
 
see below). You <b>may</b> pick one or more options. The command should,
484
 
just by convention, come at the end of the argument list, after all
485
 
the options. If the command takes a file (all the basic ones do),
486
 
the filename comes at the very end. So the basic way to run gpg is:
487
 
<P>
488
 
<samp>
489
 
   $ gpg [--option something] [--option2] [--option3 something] --command file
490
 
</samp>
491
 
<P>
492
 
Some options take arguments. For example, the --output option (which
493
 
can be abbreviated as -o) is an option that takes a filename. The
494
 
option's argument must follow immediately after the option itself,
495
 
otherwise gpg doesn't know which option the argument is supposed to
496
 
paired with. As an option, --output and its filename must come before
497
 
the command. The --recipient (-r) option takes a name or keyID to
498
 
encrypt the message to, which must come right after the -r option.
499
 
The --encrypt (or -e) command comes after all the options and is
500
 
followed by the file you wish to encrypt. Therefore in this example
501
 
the command-line issued would be:
502
 
<P>
503
 
<samp>
504
 
   $ gpg -r alice -o secret.txt -e test.txt
505
 
</samp>
506
 
<P>
507
 
If you write the options out in full, it is easier to read:
508
 
<P>
509
 
<samp>
510
 
   $ gpg --recipient alice --output secret.txt --encrypt test.txt
511
 
</samp>
512
 
<P>
513
 
If you're encrypting to a file with the extension &quot;.txt&quot;, then you'd
514
 
probably expect to see ASCII-armored text in the file (not binary),
515
 
so you need to add the --armor (-a) option, which doesn't take any
516
 
arguments:
517
 
<P>
518
 
<samp>
519
 
   $ gpg --armor --recipient alice --output secret.txt --encrypt test.txt
520
 
</samp>
521
 
<P>
522
 
If you imagine square brackets around the optional parts, it becomes
523
 
a bit clearer:
524
 
<P>
525
 
<samp>
526
 
   $ gpg [--armor] [--recipient alice] [--output secret.txt] --encrypt test.txt
527
 
</samp>
528
 
<P>
529
 
The optional parts can be rearranged any way you want:
530
 
<P>
531
 
<samp>
532
 
   $ gpg --output secret.txt --recipient alice --armor --encrypt test.txt
533
 
</samp>
534
 
<P>
535
 
If your filename begins with a hyphen (e.g. &quot;-a.txt&quot;), GnuPG assumes
536
 
this is an option and may complain. To avoid this you have to either
537
 
use &quot;./-a.txt&quot;, or stop the option and command processing with two
538
 
hyphens: &quot;-- -a.txt&quot;.
539
 
<P>
540
 
<B>The exception to using only one command:</B> signing and encrypting
541
 
at the same time. For this you can combine both commands, such as in:
542
 
<P>
543
 
<samp>
544
 
   $ gpg [--options] --sign --encrypt foo.txt
545
 
</samp>
546
 
<P>
547
 
<h3>
548
 
<a NAME=q4.5>4.5)</a> I can't delete a user ID on my secret keyring because it has
549
 
    already been deleted on my public keyring. What can I do?
550
 
</h3>
551
 
<P>
552
 
Because you can only select from the public key ring, there is no
553
 
direct way to do this. However it is not very complicated to do
554
 
anyway. Create a new user ID with exactly the same name and you
555
 
will see that there are now two identical user IDs on the secret
556
 
ring. Now select this user ID and delete it. Both user IDs will be
557
 
removed from the secret ring.
558
 
<P>
559
 
<h3>
560
 
<a NAME=q4.6>4.6)</a> I can't delete my secret key because the public key disappeared.
561
 
    What can I do?
562
 
</h3>
563
 
<P>
564
 
To select a key a search is always done on the public keyring,
565
 
therefore it is not possible to select a secret key without
566
 
having the public key. Normally it should never happen that the
567
 
public key got lost but the secret key is still available. The
568
 
reality is different, so GnuPG implements a special way to deal
569
 
with it: Simply use the long keyID to specify the key to delete,
570
 
which can be obtained by using the --with-colons options (it is
571
 
the fifth field in the lines beginning with &quot;sec&quot;).
572
 
<P>
573
 
If you've lost your public key and need to recreate it instead
574
 
for continued use with your secret key, you may be able to use
575
 
gpgsplit as detailed in question <a HREF=#q4.21>4.21</a>.
576
 
<P>
577
 
<h3>
578
 
<a NAME=q4.7>4.7)</a> What are trust, validity and ownertrust?
579
 
</h3>
580
 
<P>
581
 
With GnuPG, the term &quot;ownertrust&quot; is used instead of &quot;trust&quot; to
582
 
help clarify that this is the value you have assigned to a key
583
 
to express how much you trust the owner of this key to correctly
584
 
sign (and thereby introduce) other keys. The &quot;validity&quot;, or
585
 
calculated trust, is a value which indicates how much GnuPG
586
 
considers a key as being valid (that it really belongs to the
587
 
one who claims to be the owner of the key). For more information
588
 
on trust values see the chapter &quot;The Web of Trust&quot; in The GNU
589
 
Privacy Handbook.
590
 
<P>
591
 
<h3>
592
 
<a NAME=q4.8>4.8)</a> How do I sign a patch file?
593
 
</h3>
594
 
<P>
595
 
Use &quot;gpg --clearsign --not-dash-escaped ...&quot;. The problem with
596
 
--clearsign is that all lines starting with a dash are quoted with
597
 
&quot;- &quot;; obviously diff produces many lines starting with a dash and
598
 
these are then quoted and that is not good for a patch ;-). To use
599
 
a patch file without removing the cleartext signature, the special
600
 
option --not-dash-escaped may be used to suppress generation of
601
 
these escape sequences. You should not mail such a patch because
602
 
spaces and line endings are also subject to the signature and a
603
 
mailer may not preserve these. If you want to mail a file you can
604
 
simply sign it using your MUA (Mail User Agent).
605
 
<P>
606
 
<h3>
607
 
<a NAME=q4.9>4.9)</a> Where is the &quot;encrypt-to-self&quot; option?
608
 
</h3>
609
 
<P>
610
 
Use &quot;--encrypt-to your_keyID&quot;. You can use more than one of these
611
 
options. To temporarily override the use of this additional key,
612
 
you can use the option &quot;--no-encrypt-to&quot;.
613
 
<P>
614
 
<h3>
615
 
<a NAME=q4.10>4.10)</a> How can I get rid of the Version and Comment headers in armored
616
 
    messages?
617
 
</h3>
618
 
<P>
619
 
Use &quot;--no-version --comment ''&quot;. Note that the left over blank line
620
 
is required by the protocol.
621
 
<P>
622
 
<h3>
623
 
<a NAME=q4.11>4.11)</a> What does the &quot;You are using the xxxx character set.&quot; mean?
624
 
</h3>
625
 
<P>
626
 
This note is printed when UTF-8 mapping has to be done. Make sure
627
 
that the displayed character set is the one you have activated on
628
 
your system. Since &quot;iso-8859-1&quot; is the character set most used,
629
 
this is the default. You can change the charset with the option
630
 
&quot;--charset&quot;. It is important that your active character set matches
631
 
the one displayed - if not, restrict yourself to plain 7 bit ASCII
632
 
and no mapping has to be done.
633
 
<P>
634
 
<h3>
635
 
<a NAME=q4.12>4.12)</a> How can I get list of key IDs used to encrypt a message?
636
 
</h3>
637
 
<P>
638
 
<samp>
639
 
   $ gpg --batch --decrypt --list-only --status-fd 1 2&gt;/dev/null |
640
 
     awk '/^\[GNUPG:\] ENC_TO / { print $3 }'
641
 
</samp>
642
 
<P>
643
 
<h3>
644
 
<a NAME=q4.13>4.13)</a> Why can't I decrypt files encrypted as symmetrical-only (-c) with
645
 
    a version of GnuPG prior to 1.0.1.
646
 
</h3>
647
 
<P>
648
 
There was a bug in GnuPG versions prior to 1.0.1 which affected files
649
 
only if 3DES or Twofish was used for symmetric-only encryption (this has
650
 
never been the default). The bug has been fixed, but to enable decryption
651
 
of old files you should run gpg with the option &quot;--emulate-3des-s2k-bug&quot;,
652
 
decrypt the file and encrypt it again without this option.
653
 
<P>
654
 
NOTE: This option was removed in GnuPG development version 1.1.0 and later
655
 
updates, so you will need to use a version between 1.0.1 and 1.0.7 to
656
 
re-encrypt any affected files.
657
 
<P>
658
 
<h3>
659
 
<a NAME=q4.14>4.14)</a> How can I use GnuPG in an automated environment?
660
 
</h3>
661
 
<P>
662
 
You should use the option --batch and don't use passphrases as
663
 
there is usually no way to store it more securely than on the
664
 
secret keyring itself. The suggested way to create keys for an
665
 
automated environment is:
666
 
<P>
667
 
On a secure machine:
668
 
<ol>
669
 
<li> If you want to do automatic signing, create a signing subkey
670
 
       for your key (use the interactive key editing menu by issueing
671
 
       the command 'gpg --edit-key keyID', enter &quot;addkey&quot; and select
672
 
       the DSA key type).
673
 
<li> Make sure that you use a passphrase (needed by the current
674
 
       implementation).
675
 
<li> gpg --export-secret-subkeys --no-comment foo &gt;secring.auto
676
 
<li> Copy secring.auto and the public keyring to a test directory.
677
 
<li> Change to this directory.
678
 
<li> gpg --homedir . --edit foo and use &quot;passwd&quot; to remove the
679
 
       passphrase from the subkeys. You may also want to remove all
680
 
       unused subkeys.
681
 
<li> Copy secring.auto to a floppy and carry it to the target box.
682
 
</ol>
683
 
<P>
684
 
On the target machine:
685
 
<ol>
686
 
<li> Install secring.auto as the secret keyring.
687
 
<li> Now you can start your new service. It's also a good idea to
688
 
       install an intrusion detection system so that you hopefully
689
 
       get a notice of an successful intrusion, so that you in turn
690
 
       can revoke all the subkeys installed on that machine and
691
 
       install new subkeys.
692
 
</ol>
693
 
<P>
694
 
<h3>
695
 
<a NAME=q4.15>4.15)</a> Which email-client can I use with GnuPG?
696
 
</h3>
697
 
<P>
698
 
Using GnuPG to encrypt email is one of the most popular uses.
699
 
Several mail clients or mail user agents (MUAs) support GnuPG to
700
 
varying degrees. Simplifying a bit, there are two ways mail can be
701
 
encrypted with GnuPG: the &quot;old style&quot; ASCII armor (i.e. cleartext
702
 
encryption), and RFC 2015 style (previously PGP/MIME, now OpenPGP).
703
 
The latter has full MIME support. Some MUAs support only one of
704
 
them, so whichever you actually use depends on your needs as well
705
 
as the capabilities of your addressee. As well, support may be
706
 
native to the MUA, or provided via &quot;plug-ins&quot; or external tools.
707
 
<P>
708
 
The following list is not exhaustive:
709
 
<P>
710
 
<pre>
711
 
   MUA            OpenPGP ASCII   How? (N,P,T)
712
 
   -------------------------------------------------------------
713
 
   Calypso           N      Y      P (Unixmail)
714
 
   Elm               N      Y      T (mailpgp,morepgp)
715
 
   Elm ME+           N      Y      N
716
 
   Emacs/Gnus        Y      Y      T (Mailcrypt,gpg.el)
717
 
   Emacs/Mew         Y      Y      N
718
 
   Emacs/VM          N      Y      T (Mailcrypt)
719
 
   Evolution         Y      Y      N
720
 
   Exmh              Y      Y      N
721
 
   GNUMail.app       Y      Y      P (PGPBundle)
722
 
   GPGMail           Y      Y      N
723
 
   KMail (&lt;=1.4.x)   N      Y      N
724
 
   KMail (1.5.x)     Y(P)   Y(N)   P/N
725
 
   Mozilla           Y      Y      P (Enigmail)
726
 
   Mulberry          Y      Y      P
727
 
   Mutt              Y      Y      N
728
 
   Sylpheed          Y      Y      N
729
 
   Claws-mail        Y      Y      N
730
 
   TkRat             Y      Y      N
731
 
   XEmacs/Gnus       Y      Y      T (Mailcrypt)
732
 
   XEmacs/Mew        Y      Y      N
733
 
   XEmacs/VM         N      Y      T (Mailcrypt)
734
 
   XFmail            Y      Y      N
735
 
 
736
 
   N - Native, P - Plug-in, T - External Tool
737
 
</pre>
738
 
<P>
739
 
The following table lists proprietary MUAs. The GNU Project
740
 
suggests against the use of these programs, but they are listed
741
 
for interoperability reasons for your convenience.
742
 
<P>
743
 
<pre>
744
 
   MUA            OpenPGP ASCII   How? (N,P,T)
745
 
   -------------------------------------------------------------
746
 
   Apple Mail        Y      Y      P (GPGMail)
747
 
   Becky2            Y      Y      P (BkGnuPG)
748
 
   Eudora            Y      Y      P (EuroraGPG)
749
 
   Eudora Pro        Y      Y      P (EudoraGPG)
750
 
   Lotus Notes       N      Y      P
751
 
   Netscape 4.x      N      Y      P
752
 
   Netscape 7.x      Y      Y      P (Enigmail)
753
 
   Novell Groupwise  N      Y      P
754
 
   Outlook           N      Y      P (G-Data)
755
 
   Outlook Express   N      Y      P (GPGOE)
756
 
   Pegasus           N      Y      P (QDPGP,PM-PGP)
757
 
   Pine              N      Y      T (pgpenvelope,(gpg|pgp)4pine)
758
 
   Postme            N      Y      P (GPGPPL)
759
 
   The Bat!          N      Y      P (Ritlabs)
760
 
</pre>
761
 
<P>
762
 
Good overviews of OpenPGP-support can be found at:<br>
763
 
<a href=http://www.openpgp.fr.st/courrier_en.html>&lt;http://www.openpgp.fr.st/courrier_en.html&gt;</a> and<br>
764
 
<a href=http://www.bretschneidernet.de/tips/secmua.html>&lt;http://www.bretschneidernet.de/tips/secmua.html&gt;</a>.
765
 
<P>
766
 
Users of Win32 MUAs that lack OpenPGP support may look into
767
 
using GPGrelay <a href=http://gpgrelay.sourceforge.net>&lt;http://gpgrelay.sourceforge.net&gt;</a>, a small
768
 
email-relaying server that uses GnuPG to enable many email clients
769
 
to send and receive emails that conform to PGP-MIME (RFC 2015).
770
 
<P>
771
 
<h3>
772
 
<a NAME=q4.16>4.16)</a> Can't we have a gpg library?
773
 
</h3>
774
 
<P>
775
 
This has been frequently requested. However, the current viewpoint
776
 
of the GnuPG maintainers is that this would lead to several security
777
 
issues and will therefore not be implemented in the foreseeable
778
 
future. However, for some areas of application gpgme could do the
779
 
trick. You'll find it at <a href=ftp://ftp.gnupg.org/gcrypt/alpha/gpgme>&lt;ftp://ftp.gnupg.org/gcrypt/alpha/gpgme&gt;</a>.
780
 
<P>
781
 
<h3>
782
 
<a NAME=q4.17>4.17)</a> I have successfully generated a revocation certificate, but I don't
783
 
    understand how to send it to the key servers.
784
 
</h3>
785
 
<P>
786
 
Most keyservers don't accept a 'bare' revocation certificate. You
787
 
have to import the certificate into gpg first:
788
 
<P>
789
 
<samp>
790
 
   $ gpg --import my-revocation.asc
791
 
</samp>
792
 
<P>
793
 
then send the revoked key to the keyservers:
794
 
<P>
795
 
<samp>
796
 
   $ gpg --keyserver certserver.pgp.com --send-keys mykeyid
797
 
</samp>
798
 
<P>
799
 
(or use a keyserver web interface for this).
800
 
<P>
801
 
<h3>
802
 
<a NAME=q4.18>4.18)</a> How do I put my keyring in a different directory?
803
 
</h3>
804
 
<P>
805
 
GnuPG keeps several files in a special homedir directory. These
806
 
include the options file, pubring.gpg, secring.gpg, trustdb.gpg,
807
 
and others. GnuPG will always create and use these files. On unices,
808
 
the homedir is usually ~/.gnupg; on Windows it is name &quot;gnupg&quot; and
809
 
found below the user's application directory.  Run the gpg and
810
 
pass the option --version to see the name of that directory.
811
 
<P>
812
 
If you want to put your keyrings somewhere else, use the option:
813
 
<P>
814
 
<samp>
815
 
   --homedir /my/path/
816
 
</samp>
817
 
<P>
818
 
to make GnuPG create all its files in that directory. Your keyring
819
 
will be &quot;/my/path/pubring.gpg&quot;. This way you can store your secrets
820
 
on a floppy disk. Don't use &quot;--keyring&quot; as its purpose is to specify
821
 
additional keyring files.
822
 
<P>
823
 
<h3>
824
 
<a NAME=q4.19>4.19)</a> How do I verify signed packages?
825
 
</h3>
826
 
<P>
827
 
Before you can verify the signature that accompanies a package,
828
 
you must first have the vendor, organisation, or issueing person's
829
 
key imported into your public keyring. To prevent GnuPG warning
830
 
messages the key should also be validated (or locally signed).
831
 
<P>
832
 
You will also need to download the detached signature file along
833
 
with the package. These files will usually have the same name as
834
 
the package, with either a binary (.sig) or ASCII armor (.asc)
835
 
extension.
836
 
<P>
837
 
Once their key has been imported, and the package and accompanying
838
 
signature files have been downloaded, use:
839
 
<P>
840
 
<samp>
841
 
   $ gpg --verify sigfile signed-file
842
 
</samp>
843
 
<P>
844
 
If the signature file has the same base name as the package file,
845
 
the package can also be verified by specifying just the signature
846
 
file, as GnuPG will derive the package's file name from the name
847
 
given (less the .sig or .asc extension). For example, to verify a
848
 
package named foobar.tar.gz against its detached binary signature
849
 
file, use:
850
 
<P>
851
 
<samp>
852
 
   $ gpg --verify foobar.tar.gz.sig
853
 
</samp>
854
 
<P>
855
 
<h3>
856
 
<a NAME=q4.20>4.20)</a> How do I export a keyring with only selected signatures (keys)?
857
 
</h3>
858
 
<P>
859
 
If you're wanting to create a keyring with only a subset of keys
860
 
selected from a master keyring (for a club, user group, or company
861
 
department for example), simply specify the keys you want to export:
862
 
<P>
863
 
<samp>
864
 
   $ gpg --armor --export key1 key2 key3 key4 &gt; keys1-4.asc
865
 
</samp>
866
 
<P>
867
 
<h3>
868
 
<a NAME=q4.21>4.21)</a> I still have my secret key, but lost my public key. What can I do?
869
 
</h3>
870
 
<P>
871
 
All OpenPGP secret keys have a copy of the public key inside them,
872
 
and in a worst-case scenario, you can create yourself a new public
873
 
key using the secret key.
874
 
<P>
875
 
A tool to convert a secret key into a public one has been included
876
 
(it's actually a new option for gpgsplit) and is available with GnuPG
877
 
versions 1.2.1 or later (or can be found in CVS). It works like this:
878
 
<P>
879
 
<samp>
880
 
   $ gpgsplit --no-split --secret-to-public secret.gpg &gt;publickey.gpg
881
 
</samp>
882
 
<P>
883
 
One should first try to export the secret key and convert just this
884
 
one. Using the entire secret keyring should work too. After this has
885
 
been done, the publickey.gpg file can be imported into GnuPG as usual.
886
 
<P>
887
 
<h3>
888
 
<a NAME=q4.22>4.22)</a> Clearsigned messages sent from my web-mail account have an invalid
889
 
    signature. Why?
890
 
</h3>
891
 
<P>
892
 
Check to make sure the settings for your web-based email account
893
 
do not use HTML formatting for the pasted clearsigned message. This can
894
 
alter the message with embedded HTML markup tags or spaces, resulting
895
 
in an invalid signature. The recipient may be able to copy the signed
896
 
message block to a text file for verification, or the web email
897
 
service may allow you to attach the clearsigned message as a file
898
 
if plaintext messages are not an option.
899
 
<P>
900
 
<P>
901
 
<h2>
902
 
<A NAME=q5>5. COMPATIBILITY ISSUES
903
 
</A></h2>
904
 
<P>
905
 
<h3>
906
 
<a NAME=q5.1>5.1)</a> How can I encrypt a message with GnuPG so that PGP is able to decrypt it?
907
 
</h3>
908
 
<P>
909
 
It depends on the PGP version.
910
 
<P>
911
 
<ul>
912
 
<li>PGP 2.x<br>
913
 
You can't do that because PGP 2.x normally uses IDEA which is not
914
 
supported by GnuPG as it is patented (see <a HREF=#q3.3>3.3</a>), but if you have a
915
 
modified version of PGP you can try this:
916
 
<P>
917
 
<samp>
918
 
   $ gpg --rfc1991 --cipher-algo 3des ...
919
 
</samp>
920
 
<P>
921
 
Please don't pipe the data to encrypt to gpg but provide it using a
922
 
filename; otherwise, PGP 2 will not be able to handle it.
923
 
<P>
924
 
As for conventional encryption, you can't do this for PGP 2.
925
 
<P>
926
 
<li>PGP 5.x and higher<br>
927
 
You need to provide two additional options:
928
 
<P>
929
 
<samp>
930
 
   --compress-algo 1 --cipher-algo cast5
931
 
</samp>
932
 
<P>
933
 
You may also use &quot;3des&quot; instead of &quot;cast5&quot;, and &quot;blowfish&quot; does not
934
 
work with all versions of PGP 5. You may also want to put:
935
 
<P>
936
 
<samp>
937
 
   compress-algo 1
938
 
</samp>
939
 
<P>
940
 
into your ~/.gnupg/options file - this does not affect normal GnuPG
941
 
operation.
942
 
<P>
943
 
This applies to conventional encryption as well.
944
 
</UL>
945
 
<P>
946
 
<h3>
947
 
<a NAME=q5.2>5.2)</a> How do I migrate from PGP 2.x to GnuPG?
948
 
</h3>
949
 
<P>
950
 
PGP 2 uses the RSA and IDEA encryption algorithms. Whereas the RSA
951
 
patent has expired and RSA is included as of GnuPG 1.0.3, the IDEA
952
 
algorithm is still patented until 2007. Under certain conditions you
953
 
may use IDEA even today. In that case, you may refer to Question
954
 
<a HREF=#q3.3>3.3</a> about how to add IDEA support to GnuPG and read
955
 
<a href=http://www.gnupg.org/gph/en/pgp2x.html>&lt;http://www.gnupg.org/gph/en/pgp2x.html&gt;</a> to perform the migration.
956
 
<P>
957
 
<h3>
958
 
<a NAME=q5.3>5.3)</a> (removed)
959
 
</h3>
960
 
<P>
961
 
(empty)
962
 
<P>
963
 
<h3>
964
 
<a NAME=q5.4>5.4)</a> Why is PGP 5.x not able to encrypt messages with some keys?
965
 
</h3>
966
 
<P>
967
 
PGP, Inc. refuses to accept Elgamal keys of type 20 even for
968
 
encryption. They only support type 16 (which is identical at least
969
 
for decryption). To be more inter-operable, GnuPG (starting with
970
 
version 0.3.3) now also uses type 16 for the Elgamal subkey which is
971
 
created if the default key algorithm is chosen. You may add a type
972
 
16 Elgamal key to your public key, which is easy as your key
973
 
signatures are still valid.
974
 
<P>
975
 
<h3>
976
 
<a NAME=q5.5>5.5)</a> Why is PGP 5.x not able to verify my messages?
977
 
</h3>
978
 
<P>
979
 
PGP 5.x does not accept v4 signatures for data material but OpenPGP
980
 
requests generation of v4 signatures for all kind of data, that's why
981
 
GnuPG defaults to them. Use the option &quot;--force-v3-sigs&quot; to generate
982
 
v3 signatures for data.
983
 
<P>
984
 
<h3>
985
 
<a NAME=q5.6>5.6)</a> How do I transfer owner trust values from PGP to GnuPG?
986
 
</h3>
987
 
<P>
988
 
There is a script in the tools directory to help you. After you have
989
 
imported the PGP keyring you can give this command:
990
 
<P>
991
 
<samp>
992
 
   $ lspgpot pgpkeyring | gpg --import-ownertrust
993
 
</samp>
994
 
<P>
995
 
where pgpkeyring is the original keyring and not the GnuPG keyring
996
 
you might have created in the first step.
997
 
<P>
998
 
<h3>
999
 
<a NAME=q5.7>5.7)</a> PGP does not like my secret key.
1000
 
</h3>
1001
 
<P>
1002
 
Older PGPs probably bail out on some private comment packets used by
1003
 
GnuPG. These packets are fully in compliance with OpenPGP; however
1004
 
PGP is not really OpenPGP aware. A workaround is to export the
1005
 
secret keys with this command:
1006
 
<P>
1007
 
<samp>
1008
 
   $ gpg --export-secret-keys --no-comment -a your-KeyID
1009
 
</samp>
1010
 
<P>
1011
 
Another possibility is this: by default, GnuPG encrypts your secret
1012
 
key using the Blowfish symmetric algorithm. Older PGPs will only
1013
 
understand 3DES, CAST5, or IDEA symmetric algorithms. Using the
1014
 
following method you can re-encrypt your secret gpg key with a
1015
 
different algo:
1016
 
<P>
1017
 
<samp>
1018
 
   $ gpg --s2k-cipher-algo=CAST5 --s2k-digest-algo=SHA1
1019
 
     --compress-algo=1  --edit-key &lt;username&gt;
1020
 
</samp>
1021
 
<P>
1022
 
Then use passwd to change the password (just change it to the same
1023
 
thing, but it will encrypt the key with CAST5 this time).
1024
 
<P>
1025
 
Now you can export it and PGP should be able to handle it.
1026
 
<P>
1027
 
For PGP 6.x the following options work to export a key:
1028
 
<P>
1029
 
<samp>
1030
 
   $ gpg --s2k-cipher-algo 3des --compress-algo 1 --rfc1991
1031
 
     --export-secret-keys &lt;KeyID&gt;
1032
 
</samp>
1033
 
<P>
1034
 
<h3>
1035
 
<a NAME=q5.8>5.8)</a> GnuPG no longer installs a ~/.gnupg/options file. Is it missing?
1036
 
</h3>
1037
 
<P>
1038
 
No. The ~/.gnupg/options file has been renamed to ~/.gnupg/gpg.conf for
1039
 
new installs as of version 1.1.92. If an existing ~/.gnupg/options file
1040
 
is found during an upgrade it will still be used, but this change was
1041
 
required to have a more consistent naming scheme with forthcoming tools.
1042
 
An existing options file can be renamed to gpg.conf for users upgrading,
1043
 
or receiving the message that the &quot;old default options file&quot; is ignored
1044
 
(occurs if both a gpg.conf and an options file are found).
1045
 
<P>
1046
 
<h3>
1047
 
<a NAME=q5.9>5.9)</a> How do you export GnuPG keys for use with PGP?
1048
 
</h3>
1049
 
<P>
1050
 
This has come up fairly often, so here's the HOWTO:
1051
 
<P>
1052
 
PGP can (for most key types) use secret keys generated by GnuPG. The
1053
 
problems that come up occasionally are generally because GnuPG
1054
 
supports a few more features from the OpenPGP standard than PGP does.
1055
 
If your secret key has any of those features in use, then PGP will
1056
 
reject the key or you will have problems communicating later. Note
1057
 
that PGP doesn't do Elgamal signing keys at all, so they are not
1058
 
usable with any version.
1059
 
<P>
1060
 
These instructions should work for GnuPG 1.0.7 and later, and PGP
1061
 
7.0.3 and later.
1062
 
<P>
1063
 
Start by editing the key. Most of this line is not really necessary
1064
 
as the default values are correct, but it does not hurt to repeat the
1065
 
values, as this will override them in case you have something else set
1066
 
in your options file.
1067
 
<P>
1068
 
<samp>
1069
 
   $ gpg --s2k-cipher-algo cast5 --s2k-digest-algo sha1 --s2k-mode 3
1070
 
     --simple-sk-checksum --edit KeyID
1071
 
</samp>
1072
 
<P>
1073
 
Turn off some features. Set the list of preferred ciphers, hashes,
1074
 
and compression algorithms to things that PGP can handle. (Yes, I
1075
 
know this is an odd list of ciphers, but this is what PGP itself uses,
1076
 
minus IDEA).
1077
 
<P>
1078
 
<samp>
1079
 
   &gt; setpref S9 S8 S7 S3 S2 S10 H2 H3 Z1 Z0
1080
 
</samp>
1081
 
<P>
1082
 
Now put the list of preferences onto the key.
1083
 
<P>
1084
 
<samp>
1085
 
   &gt; updpref
1086
 
</samp>
1087
 
<P>
1088
 
Finally we must decrypt and re-encrypt the key, making sure that we
1089
 
encrypt with a cipher that PGP likes. We set this up in the --edit
1090
 
line above, so now we just need to change the passphrase to make it
1091
 
take effect. You can use the same passphrase if you like, or take
1092
 
this opportunity to actually change it.
1093
 
<P>
1094
 
<samp>
1095
 
   &gt; passwd
1096
 
</samp>
1097
 
<P>
1098
 
Save our work.
1099
 
<P>
1100
 
<samp>
1101
 
   &gt; save
1102
 
</samp>
1103
 
<P>
1104
 
Now we can do the usual export:
1105
 
<P>
1106
 
<samp>
1107
 
   $ gpg --export KeyID &gt; mypublickey.pgp<br>
1108
 
   $ gpg --export-secret-key KeyID &gt; mysecretkey.pgp
1109
 
</samp>
1110
 
<P>
1111
 
Thanks to David Shaw for this information!
1112
 
<P>
1113
 
<P>
1114
 
<h2>
1115
 
<A NAME=q6>6. PROBLEMS and ERROR MESSAGES
1116
 
</A></h2>
1117
 
<P>
1118
 
<h3>
1119
 
<a NAME=q6.1>6.1)</a> Why do I get &quot;gpg: Warning: using insecure memory!&quot;
1120
 
</h3>
1121
 
<P>
1122
 
On many systems this program should be installed as setuid(root).
1123
 
This is necessary to lock memory pages. Locking memory pages prevents
1124
 
the operating system from writing them to disk and thereby keeping your
1125
 
secret keys really secret. If you get no warning message about insecure
1126
 
memory your operating system supports locking without being root. The
1127
 
program drops root privileges as soon as locked memory is allocated.
1128
 
<P>
1129
 
To setuid(root) permissions on the gpg binary you can either use:
1130
 
<P>
1131
 
<samp>
1132
 
   $ chmod u+s /path/to/gpg
1133
 
</samp>
1134
 
<P>
1135
 
or
1136
 
<P>
1137
 
<samp>
1138
 
   $ chmod 4755 /path/to/gpg
1139
 
</samp>
1140
 
<P>
1141
 
Some refrain from using setuid(root) unless absolutely required for
1142
 
security reasons. Please check with your system administrator if you
1143
 
are not able to make these determinations yourself. 
1144
 
<P>
1145
 
On UnixWare 2.x and 7.x you should install GnuPG with the 'plock'
1146
 
privilege to get the same effect:
1147
 
<P>
1148
 
<samp>
1149
 
   $ filepriv -f plock /path/to/gpg
1150
 
</samp>
1151
 
<P>
1152
 
If you can't or don't want to install GnuPG setuid(root), you can
1153
 
use the option &quot;--no-secmem-warning&quot; or put:
1154
 
<P>
1155
 
<samp>
1156
 
   no-secmem-warning
1157
 
</samp>
1158
 
<P>
1159
 
in your ~/.gnupg/options or ~/.gnupg/gpg.conf file (this disables
1160
 
the warning).
1161
 
<P>
1162
 
On some systems (e.g., Windows) GnuPG does not lock memory pages
1163
 
and older GnuPG versions (&lt;=1.0.4) issue the warning:
1164
 
<P>
1165
 
<samp>
1166
 
   gpg: Please note that you don't have secure memory
1167
 
</samp>
1168
 
<P>
1169
 
This warning can't be switched off by the above option because it
1170
 
was thought to be too serious an issue. However, it confused users
1171
 
too much, so the warning was eventually removed.
1172
 
<P>
1173
 
<h3>
1174
 
<a NAME=q6.2>6.2)</a> Large File Support doesn't work ...
1175
 
</h3>
1176
 
<P>
1177
 
LFS works correctly in post-1.0.4 versions. If configure doesn't
1178
 
detect it, try a different (i.e., better) compiler. egcs 1.1.2 works
1179
 
fine, other gccs sometimes don't. BTW, several compilation problems
1180
 
of GnuPG 1.0.3 and 1.0.4 on HP-UX and Solaris were due to broken LFS
1181
 
support.
1182
 
<P>
1183
 
<h3>
1184
 
<a NAME=q6.3>6.3)</a> In the edit menu the trust values are not displayed correctly after
1185
 
    signing uids. Why?
1186
 
</h3>
1187
 
<P>
1188
 
This happens because some information is stored immediately in
1189
 
the trustdb, but the actual trust calculation can be done after the
1190
 
save command. This is a &quot;not easy to fix&quot; design bug which will be
1191
 
addressed in some future release.
1192
 
<P>
1193
 
<h3>
1194
 
<a NAME=q6.4>6.4)</a> What does &quot;skipping pubkey 1: already loaded&quot; mean?
1195
 
</h3>
1196
 
<P>
1197
 
As of GnuPG 1.0.3, the RSA algorithm is included. If you still have
1198
 
a &quot;load-extension rsa&quot; in your options file, the above message
1199
 
occurs. Just remove the load command from the options file.
1200
 
<P>
1201
 
<h3>
1202
 
<a NAME=q6.5>6.5)</a> GnuPG 1.0.4 doesn't create ~/.gnupg ...
1203
 
</h3>
1204
 
<P>
1205
 
That's a known bug, already fixed in newer versions.
1206
 
<P>
1207
 
<h3>
1208
 
<a NAME=q6.6>6.6)</a> An Elgamal signature does not verify anymore since version 1.0.2 ...
1209
 
</h3>
1210
 
<P>
1211
 
Use the option --emulate-md-encode-bug.
1212
 
<P>
1213
 
<h3>
1214
 
<a NAME=q6.7>6.7)</a> Old versions of GnuPG can't verify Elgamal signatures
1215
 
</h3>
1216
 
<P>
1217
 
Update to GnuPG 1.0.2 or newer.
1218
 
<P>
1219
 
<h3>
1220
 
<a NAME=q6.8>6.8)</a> When I use --clearsign, the plain text has sometimes extra dashes
1221
 
    in it - why?
1222
 
</h3>
1223
 
<P>
1224
 
This is called dash-escaped text and is required by OpenPGP.
1225
 
It always happens when a line starts with a dash (&quot;-&quot;) and is
1226
 
needed to make the lines that structure signature and text
1227
 
(i.e., &quot;-----BEGIN PGP SIGNATURE-----&quot;) to be the only lines
1228
 
that start with two dashes.
1229
 
<P>
1230
 
If you use GnuPG to process those messages, the extra dashes
1231
 
are removed. Good mail clients remove those extra dashes when
1232
 
displaying such a message.      
1233
 
<P>
1234
 
<h3>
1235
 
<a NAME=q6.9>6.9)</a> What is the thing with &quot;can't handle multiple signatures&quot;?
1236
 
</h3>
1237
 
<P>
1238
 
Due to different message formats GnuPG is not always able to split
1239
 
a file with multiple signatures unambiguously into its parts. This
1240
 
error message informs you that there is something wrong with the input.
1241
 
<P>
1242
 
The only way to have multiple signatures in a file is by using the
1243
 
OpenPGP format with one-pass-signature packets (which is GnuPG's
1244
 
default) or the cleartext signed format.
1245
 
<P>
1246
 
<h3>
1247
 
<a NAME=q6.10>6.10)</a> If I submit a key to a keyserver, nothing happens ...
1248
 
</h3>
1249
 
<P>
1250
 
You are most likely using GnuPG 1.0.2 or older on Windows. That's
1251
 
feature isn't yet implemented, but it's a bug not to say it. Newer
1252
 
versions issue a warning. Upgrade to 1.4.5 or newer.
1253
 
<P>
1254
 
<h3>
1255
 
<a NAME=q6.11>6.11)</a> I get &quot;gpg: waiting for lock ...&quot;
1256
 
</h3>
1257
 
<P>
1258
 
A previous instance of gpg has most likely exited abnormally and left
1259
 
a lock file. Go to ~/.gnupg and look for .*.lock files and remove them.
1260
 
<P>
1261
 
<h3>
1262
 
<a NAME=q6.12>6.12)</a> Older gpg binaries (e.g., 1.0) have problems with keys from newer
1263
 
    gpg binaries ...
1264
 
</h3>
1265
 
<P>
1266
 
As of 1.0.3, keys generated with gpg are created with preferences to
1267
 
TWOFISH (and AES since 1.0.4) and that also means that they have the
1268
 
capability to use the new MDC encryption method. This will go into
1269
 
OpenPGP soon, and is also suppoted by PGP 7. This new method avoids
1270
 
a (not so new) attack on all email encryption systems.
1271
 
<P>
1272
 
This in turn means that pre-1.0.3 gpg binaries have problems with
1273
 
newer keys. Because of security and bug fixes, you should keep your
1274
 
GnuPG installation in a recent state anyway. As a workaround, you can
1275
 
force gpg to use a previous default cipher algo by putting:
1276
 
<P>
1277
 
<samp>
1278
 
   cipher-algo cast5
1279
 
</samp>
1280
 
<P>
1281
 
into your options file.
1282
 
<P>
1283
 
<h3>
1284
 
<a NAME=q6.13>6.13)</a> With 1.0.4, I get &quot;this cipher algorithm is deprecated ...&quot;
1285
 
</h3>
1286
 
<P>
1287
 
If you just generated a new key and get this message while
1288
 
encrypting, you've witnessed a bug in 1.0.4. It uses the new AES
1289
 
cipher Rijndael that is incorrectly being referred as &quot;deprecated&quot;.
1290
 
Ignore this warning, more recent versions of gpg are corrected.
1291
 
<P>
1292
 
<h3>
1293
 
<a NAME=q6.14>6.14)</a> Some dates are displayed as ????-??-??. Why?
1294
 
</h3>
1295
 
<P>
1296
 
Due to constraints in most libc implementations, dates beyond
1297
 
2038-01-19 can't be displayed correctly. 64-bit OSes are not
1298
 
affected by this problem. To avoid printing wrong dates, GnuPG
1299
 
instead prints some question marks. To see the correct value, you
1300
 
can use the options --with-colons and --fixed-list-mode.
1301
 
<P>
1302
 
<h3>
1303
 
<a NAME=q6.15>6.15)</a> I still have a problem. How do I report a bug?
1304
 
</h3>
1305
 
<P>
1306
 
Are you sure that it's not been mentioned somewhere on the mailing
1307
 
lists? Did you have a look at the bug list (you'll find a link to
1308
 
the list of reported bugs on the documentation page). If you're not
1309
 
sure about it being a bug, you can send mail to the gnupg-devel
1310
 
list. Otherwise, use the bug tracking system 
1311
 
<a href=http://bugs.gnupg.org>&lt;http://bugs.gnupg.org&gt;</a>.
1312
 
<P>
1313
 
<h3>
1314
 
<a NAME=q6.16>6.16)</a> Why doesn't GnuPG support X.509 certificates?
1315
 
</h3>
1316
 
<P>
1317
 
GnuPG, first and foremost, is an implementation of the OpenPGP
1318
 
standard (RFC 2440), which is a competing infrastructure, different
1319
 
from X.509.
1320
 
<P>
1321
 
They are both public-key cryptosystems, but how the public keys are
1322
 
actually handled is different.
1323
 
<P>
1324
 
<h3>
1325
 
<a NAME=q6.17>6.17)</a> Why do national characters in my user ID look funny?
1326
 
</h3>
1327
 
<P>
1328
 
According to OpenPGP, GnuPG encodes user ID strings (and other
1329
 
things) using UTF-8. In this encoding of Unicode, most national
1330
 
characters get encoded as two- or three-byte sequences. For
1331
 
example, &amp;aring; (0xE5 in ISO-8859-1) becomes &amp;Atilde;&amp;yen; (0xC3,
1332
 
0xA5). This might also be the reason why keyservers can't find
1333
 
your key.
1334
 
<P>
1335
 
<h3>
1336
 
<a NAME=q6.18>6.18)</a> I get 'sed' errors when running ./configure on Mac OS X ...
1337
 
</h3>
1338
 
<P>
1339
 
This will be fixed after GnuPG has been upgraded to autoconf-2.50.
1340
 
Until then, find the line setting CDPATH in the configure script
1341
 
and place an:
1342
 
<P>
1343
 
<samp>
1344
 
   unset CDPATH
1345
 
</samp>
1346
 
<P>
1347
 
statement below it.
1348
 
<P>
1349
 
<h3>
1350
 
<a NAME=q6.19>6.19)</a> Why does GnuPG 1.0.6 bail out on keyrings used with 1.0.7?
1351
 
</h3>
1352
 
<P>
1353
 
There is a small bug in 1.0.6 which didn't parse trust packets
1354
 
correctly. You may want to apply this patch if you can't upgrade:
1355
 
<P>
1356
 
<a href=http://www.gnupg.org/developer/gpg-woody-fix.txt>&lt;http://www.gnupg.org/developer/gpg-woody-fix.txt&gt;</a>
1357
 
<P>
1358
 
<h3>
1359
 
<a NAME=q6.20>6.20)</a> I upgraded to GnuPG version 1.0.7 and now it takes longer to load my
1360
 
    keyrings. What can I do?
1361
 
</h3>
1362
 
<P>
1363
 
The way signature states are stored has changed so that v3 signatures
1364
 
can be supported. You can use the new --rebuild-keydb-caches migration
1365
 
command, which was built into this release and increases the speed of
1366
 
many operations for existing keyrings.
1367
 
<P>
1368
 
<h3>
1369
 
<a NAME=q6.21>6.21)</a> Doesn't a fully trusted user ID on a key prevent warning messages
1370
 
    when encrypting to other IDs on the key?
1371
 
</h3>
1372
 
<P>
1373
 
No. That was actually a key validity bug in GnuPG 1.2.1 and earlier
1374
 
versions. As part of the development of GnuPG 1.2.2, a bug was
1375
 
discovered in the key validation code.  This bug causes keys with
1376
 
more than one user ID to give all user IDs on the key the amount of
1377
 
validity given to the most-valid key. The bug has been fixed in GnuPG
1378
 
release 1.2.2, and upgrading is the recommended fix for this problem.
1379
 
More information and a patch for a some pre-1.2.2 versions of GnuPG
1380
 
can be found at:
1381
 
<P>
1382
 
<a href=http://lists.gnupg.org/pipermail/gnupg-announce/2003q2/000268.html>&lt;http://lists.gnupg.org/pipermail/gnupg-announce/2003q2/000268.html&gt;</a>
1383
 
<P>
1384
 
<h3>
1385
 
<a NAME=q6.22>6.22)</a> I just compiled GnuPG from source on my GNU/Linux RPM-based system
1386
 
    and it's not working. Why?
1387
 
</h3>
1388
 
<P>
1389
 
Many GNU/Linux distributions that are RPM-based will install a
1390
 
version of GnuPG as part of its standard installation, placing the
1391
 
binaries in the /usr/bin directory. Later, compiling and installing
1392
 
GnuPG from source other than from a source RPM won't normally
1393
 
overwrite these files, as the default location for placement of
1394
 
GnuPG binaries is in /usr/local/bin unless the '--prefix' switch
1395
 
is used during compile to specify an alternate location. Since the
1396
 
/usr/bin directory more than likely appears in your path before
1397
 
/usr/local/bin, the older RPM-version binaries will continue to
1398
 
be used when called since they were not replaced.
1399
 
<P>
1400
 
To resolve this, uninstall the RPM-based version with 'rpm -e gnupg'
1401
 
before installing the binaries compiled from source. If dependency
1402
 
errors are displayed when attempting to uninstall the RPM (such as
1403
 
when Red Hat's up2date is also installed, which uses GnuPG), uninstall
1404
 
the RPM with 'rpm -e gnupg --nodeps' to force the uninstall. Any
1405
 
dependent files should be automatically replaced during the install
1406
 
of the compiled version. If the default /usr/local/bin directory is
1407
 
used, some packages such as SuSE's Yast Online Update may need to be
1408
 
configured to look for GnuPG binaries in the /usr/local/bin directory,
1409
 
or symlinks can be created in /usr/bin that point to the binaries
1410
 
located in /usr/local/bin.
1411
 
<P>
1412
 
<P>
1413
 
<h2>
1414
 
<A NAME=q7>7. ADVANCED TOPICS
1415
 
</A></h2>
1416
 
<P>
1417
 
<h3>
1418
 
<a NAME=q7.1>7.1)</a> How does this whole thing work?
1419
 
</h3>
1420
 
<P>
1421
 
To generate a secret/public keypair, run:
1422
 
<P>
1423
 
<samp>
1424
 
   $ gpg --gen-key
1425
 
</samp>
1426
 
<P>
1427
 
and choose the default values.
1428
 
<P>
1429
 
Data that is encrypted with a public key can only be decrypted by
1430
 
the matching secret key. The secret key is protected by a password,
1431
 
the public key is not.
1432
 
<P>
1433
 
So to send your friend a message, you would encrypt your message
1434
 
with his public key, and he would only be able to decrypt it by
1435
 
having the secret key and putting in the password to use his secret
1436
 
key.
1437
 
<P>
1438
 
GnuPG is also useful for signing things. Files that are encrypted
1439
 
with the secret key can be decrypted with the public key. To sign
1440
 
something, a hash is taken of the data, and then the hash is in some
1441
 
form encoded with the secret key. If someone has your public key, they
1442
 
can verify that it is from you and that it hasn't changed by checking
1443
 
the encoded form of the hash with the public key.
1444
 
<P>
1445
 
A keyring is just a large file that stores keys. You have a public
1446
 
keyring where you store yours and your friend's public keys. You have
1447
 
a secret keyring that you keep your secret key on, and should be very
1448
 
careful with. Never ever give anyone else access to it and use a *good*
1449
 
passphrase to protect the data in it.
1450
 
<P>
1451
 
You can 'conventionally' encrypt something by using the option 'gpg -c'.
1452
 
It is encrypted using a passphrase, and does not use public and secret
1453
 
keys. If the person you send the data to knows that passphrase, they
1454
 
can decrypt it. This is usually most useful for encrypting things to
1455
 
yourself, although you can encrypt things to your own public key in the
1456
 
same way. It should be used for communication with partners you know
1457
 
and where it is easy to exchange the passphrases (e.g. with your boy
1458
 
friend or your wife). The advantage is that you can change the
1459
 
passphrase from time to time and decrease the risk, that many old
1460
 
messages may be decrypted by people who accidently got your passphrase.
1461
 
<P>
1462
 
You can add and copy keys to and from your keyring with the 'gpg
1463
 
--import' and 'gpg --export' command. 'gpg --export-secret-keys' will
1464
 
export secret keys. This is normally not useful, but you can generate
1465
 
the key on one machine then move it to another machine.
1466
 
<P>
1467
 
Keys can be signed under the 'gpg --edit-key' option. When you sign a
1468
 
key, you are saying that you are certain that the key belongs to the
1469
 
person it says it comes from. You should be very sure that is really
1470
 
that person: You should verify the key fingerprint with:
1471
 
<P>
1472
 
<samp>
1473
 
   $ gpg --fingerprint KeyID
1474
 
</samp>
1475
 
<P>
1476
 
over the phone (if you really know the voice of the other person), at
1477
 
a key signing party (which are often held at computer conferences),
1478
 
or at a meeting of your local GNU/Linux User Group.
1479
 
<P>
1480
 
Hmm, what else. You may use the option '-o filename' to force output
1481
 
to this filename (use '-' to force output to stdout). '-r' just lets
1482
 
you specify the recipient (which public key you encrypt with) on the
1483
 
command line instead of typing it interactively.
1484
 
<P>
1485
 
Oh yeah, this is important. By default all data is encrypted in some
1486
 
weird binary format. If you want to have things appear in ASCII text
1487
 
that is readable, just add the '-a' option. But the preferred method
1488
 
is to use a MIME aware mail reader (Mutt, Pine and many more).
1489
 
<P>
1490
 
There is a small security glitch in the OpenPGP (and therefore GnuPG)
1491
 
system; to avoid this you should always sign and encrypt a message
1492
 
instead of only encrypting it.
1493
 
<P>
1494
 
<h3>
1495
 
<a NAME=q7.2>7.2)</a> Why are some signatures with an ELG-E key valid?
1496
 
</h3>
1497
 
<P>
1498
 
These are Elgamal keys generated by GnuPG in v3 (RFC 1991) packets.
1499
 
The OpenPGP draft later changed the algorithm identifier for Elgamal
1500
 
keys which are usable for signatures and encryption from 16 to 20.
1501
 
GnuPG now uses 20 when it generates new Elgamal keys but still
1502
 
accepts 16 (which is according to OpenPGP &quot;encryption only&quot;) if this
1503
 
key is in a v3 packet. GnuPG is the only program which had used
1504
 
these v3 Elgamal keys - so this assumption is quite safe.
1505
 
<P>
1506
 
<h3>
1507
 
<a NAME=q7.3>7.3)</a> How does the whole trust thing work?
1508
 
</h3>
1509
 
<P>
1510
 
It works more or less like PGP. The difference is that the trust is
1511
 
computed at the time it is needed. This is one of the reasons for
1512
 
the trustdb which holds a list of valid key signatures. If you are
1513
 
not running in batch mode you will be asked to assign a trust
1514
 
parameter (ownertrust) to a key.
1515
 
<P>
1516
 
You can see the validity (calculated trust value) using this
1517
 
command.
1518
 
<P>
1519
 
<samp>
1520
 
   $ gpg --list-keys --with-colons
1521
 
</samp> 
1522
 
<P>
1523
 
If the first field is &quot;pub&quot; or &quot;uid&quot;, the second field shows you the
1524
 
trust:
1525
 
<P>
1526
 
<pre>
1527
 
   o = Unknown (this key is new to the system)
1528
 
   e = The key has expired
1529
 
   q = Undefined (no value assigned)
1530
 
   n = Don't trust this key at all
1531
 
   m = There is marginal trust in this key
1532
 
   f = The key is full trusted
1533
 
   u = The key is ultimately trusted; this is only used
1534
 
       for keys for which the secret key is also available.
1535
 
   r = The key has been revoked
1536
 
   d = The key has been disabled
1537
 
</pre>
1538
 
<P>
1539
 
The value in the &quot;pub&quot; record is the best one of all &quot;uid&quot; records.
1540
 
You can get a list of the assigned trust values (how much you trust
1541
 
the owner to correctly sign another person's key) with:
1542
 
<P>
1543
 
<samp>
1544
 
   $ gpg --list-ownertrust
1545
 
</samp>
1546
 
<P>
1547
 
The first field is the fingerprint of the primary key, the second
1548
 
field is the assigned value:
1549
 
<P>
1550
 
<pre>
1551
 
   - = No ownertrust value yet assigned or calculated.
1552
 
   n = Never trust this keyholder to correctly verify others signatures.
1553
 
   m = Have marginal trust in the keyholders capability to sign other
1554
 
       keys.
1555
 
   f = Assume that the key holder really knows how to sign keys.
1556
 
   u = No need to trust ourself because we have the secret key.
1557
 
</pre>
1558
 
<P>
1559
 
Keep these values confidential because they express your opinions
1560
 
about others. PGP stores this information with the keyring thus it
1561
 
is not a good idea to publish a PGP keyring instead of exporting the
1562
 
keyring. GnuPG stores the trust in the trustdb.gpg file so it is okay
1563
 
to give a gpg keyring away (but we have a --export command too).
1564
 
<P>
1565
 
<h3>
1566
 
<a NAME=q7.4>7.4)</a> What kind of output is this: &quot;key C26EE891.298, uid 09FB: ....&quot;?
1567
 
</h3>
1568
 
<P>
1569
 
This is the internal representation of a user ID in the trustdb.
1570
 
&quot;C26EE891&quot; is the keyid, &quot;298&quot; is the local ID (a record number in
1571
 
the trustdb) and &quot;09FB&quot; is the last two bytes of a ripe-md-160 hash
1572
 
of the user ID for this key.
1573
 
<P>
1574
 
<h3>
1575
 
<a NAME=q7.5>7.5)</a> How do I interpret some of the informational outputs?
1576
 
</h3>
1577
 
<P>
1578
 
While checking the validity of a key, GnuPG sometimes prints some
1579
 
information which is prefixed with information about the checked
1580
 
item.
1581
 
<P>
1582
 
<samp>
1583
 
   &quot;key 12345678.3456&quot;
1584
 
</samp>
1585
 
<P>
1586
 
This is about the key with key ID 12345678 and the internal number
1587
 
3456, which is the record number of the so called directory record
1588
 
in the trustdb.
1589
 
<P>
1590
 
<samp>
1591
 
   &quot;uid 12345678.3456/ACDE&quot;
1592
 
</samp>
1593
 
<P>
1594
 
This is about the user ID for the same key. To identify the user ID
1595
 
the last two bytes of a ripe-md-160 over the user ID ring is printed.
1596
 
<P>
1597
 
<samp>
1598
 
   &quot;sig 12345678.3456/ACDE/9A8B7C6D&quot;
1599
 
</samp>
1600
 
<P>
1601
 
This is about the signature with key ID 9A8B7C6D for the above key
1602
 
and user ID, if it is a signature which is direct on a key, the user
1603
 
ID part is empty (..//..).
1604
 
<P>
1605
 
<h3>
1606
 
<a NAME=q7.6>7.6)</a> Are the header lines of a cleartext signature part of the signed
1607
 
    material?
1608
 
</h3>
1609
 
<P>
1610
 
No. For example you can add or remove &quot;Comment:&quot; lines. They have
1611
 
a purpose like the mail header lines. However a &quot;Hash:&quot; line is
1612
 
needed for OpenPGP signatures to tell the parser which hash
1613
 
algorithm to use.
1614
 
<P>
1615
 
<h3>
1616
 
<a NAME=q7.7>7.7)</a> What is the list of preferred algorithms?
1617
 
</h3>
1618
 
<P>
1619
 
The list of preferred algorithms is a list of cipher, hash and
1620
 
compression algorithms stored in the self-signature of a key during
1621
 
key generation. When you encrypt a document, GnuPG uses this list
1622
 
(which is then part of a public key) to determine which algorithms
1623
 
to use. Basically it tells other people what algorithms the
1624
 
recipient is able to handle and provides an order of preference.
1625
 
<P>
1626
 
<h3>
1627
 
<a NAME=q7.8>7.8)</a> How do I change the list of preferred algorithms?
1628
 
</h3>
1629
 
<P>
1630
 
In version 1.0.7 or later, you can use the edit menu and set the
1631
 
new list of preference using the command &quot;setpref&quot;; the format of
1632
 
this command resembles the output of the command &quot;pref&quot;. The
1633
 
preference is not changed immediately but the set preference will
1634
 
be used when a new user ID is created. If you want to update the
1635
 
preferences for existing user IDs, select those user IDs (or select
1636
 
none to update all) and enter the command &quot;updpref&quot;. Note that the
1637
 
timestamp of the self-signature is increased by one second when
1638
 
running this command.
1639
 
<P>
1640
 
<h3>
1641
 
<a NAME=q7.9>7.9)</a> How can I import all the missing signer keys?
1642
 
</h3>
1643
 
<P>
1644
 
If you imported a key and you want to also import all the signer's
1645
 
keys, you can do this with this command:
1646
 
<P>
1647
 
  gpg --check-sigs --with-colon KEYID \
1648
 
    | awk -F: '$1 == &quot;sig&quot; &amp;&amp; $2 == &quot;?&quot;  { print $5 }' \
1649
 
    | sort | uniq | xargs echo gpg --recv-keys
1650
 
<P>
1651
 
Note that the invocation of sort is also required to wait for the
1652
 
of the listing before before starting the import.
1653
 
<P>
1654
 
<P>
1655
 
<h2>
1656
 
<A NAME=q8>8. ACKNOWLEDGEMENTS
1657
 
</A></h2>
1658
 
<P>
1659
 
Many thanks to Nils Ellmenreich for maintaining this FAQ file for
1660
 
such a long time, Werner Koch for the original FAQ file, and to all
1661
 
posters to gnupg-users and gnupg-devel. They all provided most of
1662
 
the answers.
1663
 
<P>
1664
 
Also thanks to Casper Dik for providing us with a script to generate
1665
 
this FAQ (he uses it for the excellent Solaris2 FAQ).
1666
 
<P>
1667
 
<hr>
1668
 
<P>
1669
 
Copyright (C) 2000, 2001, 2002, 2003 Free Software Foundation, Inc.,
1670
 
51 Franklin Street, Fifth Floor, Boston, MA 02111, USA
1671
 
<P>
1672
 
Verbatim copying and distribution of this entire article is permitted in
1673
 
any medium, provided this notice is preserved.
1674
 
</body></html>