~ubuntu-branches/ubuntu/quantal/gnupg2/quantal-proposed

« back to all changes in this revision

Viewing changes to doc/FAQ

  • Committer: Bazaar Package Importer
  • Author(s): Marc Deslauriers
  • Date: 2011-05-25 14:27:35 UTC
  • mfrom: (1.1.15 upstream) (7.1.7 sid)
  • Revision ID: james.westby@ubuntu.com-20110525142735-jccyw0fopnyv728q
Tags: 2.0.17-2ubuntu1
* Merge from debian unstable. Remaining changes:
  - Add udev rules to give gpg access to some smartcard readers;
    Debian #543217.
    . debian/gnupg2.dev: udev rules to set ACLs on SCM smartcard readers.
    . debian/rules: Call dh_installudev.
  - debian/control: Rename Vcs-* to XS-Debian-Vcs-*.

Show diffs side-by-side

added added

removed removed

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