~ubuntu-branches/ubuntu/feisty/gnupg2/feisty

« back to all changes in this revision

Viewing changes to doc/faq.html

  • Committer: Bazaar Package Importer
  • Author(s): Martin Pitt
  • Date: 2006-11-24 18:48:23 UTC
  • mfrom: (1.1.4 upstream)
  • Revision ID: james.westby@ubuntu.com-20061124184823-17ir9m46tl09n9k4
Tags: 2.0.0-4ubuntu1
* Synchronize to Debian, reapply remaining Ubuntu changes to pristine Debian
  version:
  - Remove libpcsclite-dev, libopensc2-dev build dependencies (they are in
    universe).

Show diffs side-by-side

added added

removed removed

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