1 # faq.org -*- coding: utf-8; -*-
3 #+OPTIONS: H:2 num:t toc:t \n:nil @:t ::t |:t ^:t *:t TeX:t
7 #+TITLE: GnuPG Frequently Asked Questions
8 #+OPTIONS: H:3 num:nil toc:t \n:nil @:t ::t |:t ^:{} -:t f:t *:t TeX:t LaTeX:t skip:nil d:(HIDE) tags:not-in-toc
9 #+LINK: gnupgweb http://www.gnupg.org/
10 #+LINK: roundup https://bugs.g10code.com/gnupg/issue
11 #+STYLE: <link rel="stylesheet" type="text/css" href="http://www.gnupg.org/share/site.css" />
13 # FIXME: This FAQ needs a heavy cleanup. For now I only switched to
14 # org-mode format for easier maintenance.
17 <a href="/"><img src="https://gnupg.org/share/logo-gnupg-light-purple-bg.png" class="logo-link" /></a>
20 *WARNING: This FAQ is heavily outdated*. Mentioned versions of GnuPG
21 have reached end of life many years ago. Almost all bugs and problems
22 have been fixed in the now current versions of GnuPG. We will try to
23 update this FAQ in the next month. See the section "Changes" for recent updates.
31 Welcome to the GnuPG FAQ. The latest HTML version is available at\\
32 [[http://www.gnupg.org/faq/GnuPG-FAQ.html]]; \\
33 a plain text Gversion at \\
34 ftp://ftp.gnupg.org/gcrypt/gnupg/GnuPG-FAQ.txt.
36 See the end of this file for the release date.
38 The index is generated automatically, so there may be errors. Not
39 all questions may be in the section they belong to. Suggestions
40 about how to improve the structure of this FAQ are welcome.
42 Please send additions and corrections to the gnupg-users mailing
43 list. It would be most convenient if you could provide the answer to
44 be included here as well. Your help is very much appreciated!
46 Please, don't send message like "This should be a FAQ - what's the
47 answer?". If it hasn't been asked before, it isn't a FAQ. In that
48 case you could search in the mailing list archive.
50 ** What conventions are used in this FAQ?
52 :CUSTOM_ID: what-conventions-are-used-in-this-faq
55 Although GnuPG is being developed for several operating systems
56 (often in parallel), the conventions used in this FAQ reflect a
57 UNIX shell environment. For Win32 users, references to a shell
58 prompt (=$=) should be interpreted as a command prompt (=>=),
59 directory names separated by a forward slash (=/=) may need to be
60 converted to a back slash (=\=), and a tilde (=~=) represents a
61 user's "home" directory (reference question [[id:how-do-i-put-my-keyring-in-a-different-directory][How do I put my keyring in a different directory?]] for an example).
63 Some command-lines presented in this FAQ are too long to properly
64 display in some browsers for the web page version of this file, and
65 have been split into two or more lines. For these commands please
66 remember to enter the entire command-string on one line or the
67 command will error, or at minimum not give the desired results.
69 Please keep in mind that this FAQ contains information that may not
70 apply to your particular version, as new features and bug fixes are
71 added on a continuing basis (reference the NEWS file included with
72 the source or package for noteworthy changes between versions). One
73 item to note is that starting with GnuPG version 1.1.92 the file
74 containing user options and settings has been renamed from "options"
75 to "gpg.conf". Information in the FAQ that relates to the options
76 file may be interchangeable with the newer gpg.conf file in many
77 instances. See question
78 [[#gnupg-no-longer-installs-a-options-file-is-it-missing][GnuPG no longer installs a ~/.gnupg/options file. Is it missing?]]
85 :CUSTOM_ID: what-is-gnupg
88 [[gnupgweb][GnuPG]] stands for GNU Privacy Guard and is GNU's tool for secure
89 communication and data storage. It can be used to encrypt data and
90 to create digital signatures. It includes an advanced key
91 management facility and is compliant with the proposed OpenPGP
92 Internet standard as described in [[http://www.rfc-editor.org/rfc/rfc4880.txt][RFC-4880]]. As such, it is aimed
93 to be compatible with PGP from PGP Corp. and other OpenPGP tools
95 ** Is GnuPG compatible with PGP?
97 :CUSTOM_ID: is-gnupg-compatible-with-pgp
100 In general, yes. GnuPG and newer PGP releases should be implementing
101 the OpenPGP standard. But there are some interoperability problems.
103 [[#how-can-i-encrypt-a-message-so-that-pgp-is-able-to-decrypt-it][How can I encrypt a message with GnuPG so that PGP is able to decrypt it?]]
106 ** Is GnuPG free to use for personal or commercial use?
108 :CUSTOM_ID: is-gnupg-free-to-use
111 Yes. GnuPG is part of the GNU family of tools and applications built
112 and provided in accordance with the Free Software Foundation (FSF)
113 General Public License (GPL). Therefore the software is free to copy,
114 use, modify and distribute in accordance with that license. Please
115 read the file titled COPYING that accompanies the application for
119 * Sources of Information
121 ** Where can I find more information on GnuPG?
123 :CUSTOM_ID: more-information-on-gnupg
128 - The documentation page is located at [[gnupgweb:documentation/]].
129 Also, have a look at the HOWTOs and the GNU Privacy Handbook
130 (GPH, available in English, Spanish and Russian). The latter
131 provides a detailed user's guide to GnuPG. You'll also find a
132 document about how to convert from PGP 2.x to GnuPG.
134 - At [[gnupgweb:documentation/mailing-lists.html]] you'll find an
135 online archive of the GnuPG mailing lists. Most interesting
136 should be gnupg-users for all user-related issues and gnupg-devel
137 if you want to get in touch with the developers.
139 In addition, searchable archives can be found on MARC, e.g.:\\
140 For gnupg-users : [[http://marc.theaimsgroup.com/?l=gnupg-users&r=1&w=2]]\\
141 For gnupg-devel : [[http://marc.theaimsgroup.com/?l=gnupg-devel&r=1&w=2]]
143 *Please:* Before posting to a list, read this FAQ and the
144 available documentation. In addition, search the list archive
145 --- maybe your question has already been discussed. This way you
146 help people focus on topics that have not yet been resolved.
148 - The GnuPG source distribution contains a subdirectory:
152 where some additional documentation is located (mainly
153 interesting for hackers, not the casual user).
156 ** Where do I get GnuPG?
158 :CUSTOM_ID: where-do-i-get-gnupg
161 You can download the GNU Privacy Guard from its primary FTP server
162 [[ftp://ftp.gnupg.org/gcrypt/gnupg/][ftp.gnupg.org]] or from one of its [[gnupgweb:download/mirrors.html][mirrors]].
164 The current stable version is FIXME. Please upgrade to this
165 version as it includes additional features, functions and security
166 fixes that may not have existed in prior versions.
170 ** Which OSes does GnuPG run on?
172 :CUSTOM_ID: which-oses-does-gnupg-run-on
175 It should run on most Unices as well as Windows versions
176 (including Windows NT/2000) and Macintosh OS/X. A list of OSes
177 reported to be OK is presented at:
179 [[gnupgweb:download/supported_systems.html]]
181 ** Which random data gatherer should I use?
183 :CUSTOM_ID: which-random-data-gatherer-should-i-use
186 "Good" random numbers are crucial for the security of your encryption.
187 Different operating systems provide a variety of more or less quality
188 random data. Linux and *BSD provide kernel generated random data
189 through /dev/random - this should be the preferred choice on these
190 systems. Also Solaris users with the SUNWski package installed have
191 a /dev/random. In these cases, use the configure option:
193 : --enable-static-rnd=linux
195 In addition, there's also the kernel random device by Andi Maier
196 [[http://www.cosy.sbg.ac.at/~andi/SUNrand/]], but it's still beta. Use
199 On other systems, the Entropy Gathering Daemon (EGD) is a good choice.
200 It is a perl-daemon that monitors system activity and hashes it into
201 random data. See the download page [[gnupgweb:download/]]
204 : --enable-static-rnd=egd
208 If the above options do not work, you can use the random number
209 generator "unix". This is *very slow* and should be avoided. The
210 random quality isn't very good so don't use it on sensitive data.
212 ** How do I include support for RSA and IDEA?
214 :CUSTOM_ID: how-do-i-include-support-for-rsa-and-idea
217 RSA is included as of GnuPG version 1.0.3.
219 The official GnuPG distribution does not contain IDEA due to a patent
220 restriction. The patent does not expire before 2007 so don't expect
221 official support before then.
223 However, there is an unofficial module to include it even in earlier
224 versions of GnuPG. It's available from
225 [[ftp://ftp.gnupg.dk/pub/contrib-dk/]]. Look for:
227 : idea.c.gz (c module)
228 : idea.c.gz.sig (signature file)
230 : ideadll.zip (c module and win32 dll)
231 : ideadll.zip.sig (signature file)
233 Compilation directives are in the headers of these files. You will
234 then need to add the following line to your =~/.gnupg/gpg.conf= or
235 =~/.gnupg/options= file:
237 : load-extension idea
242 ** What is the recommended key size?
244 :CUSTOM_ID: what-is-the-recommended-key-size
247 1024 bit for DSA signatures; even for plain Elgamal signatures.
248 This is sufficient as the size of the hash is probably the weakest
249 link if the key size is larger than 1024 bits. Encryption keys may
250 have greater sizes, but you should then check the fingerprint of
253 : $ gpg --fingerprint <user ID>
255 As for the key algorithms, you should stick with the default (i.e.,
256 DSA signature and Elgamal encryption). An Elgamal signing key has
257 the following disadvantages: the signature is larger, it is hard
258 to create such a key useful for signatures which can withstand some
259 real world attacks, you don't get any extra security compared to
260 DSA, and there might be compatibility problems with certain PGP
261 versions. It has only been introduced because at the time it was
262 not clear whether there was a patent on DSA.
264 ** Why does it sometimes take so long to create keys?
266 :CUSTOM_ID: why-does-it-sometimes-take-so-long-to-create-keys
269 The problem here is that we need a lot of random bytes and for that
270 we (on Linux the /dev/random device) must collect some random data.
271 It is really not easy to fill the Linux internal entropy buffer; I
272 talked to Ted Ts'o and he commented that the best way to fill the
273 buffer is to play with your keyboard. Good security has its price.
274 What I do is to hit several times on the shift, control, alternate,
275 and caps lock keys, because these keys do not produce output to the
276 screen. This way you get your keys really fast (it's the same thing
279 Another problem might be another program which eats up your random
280 bytes (a program (look at your daemons) that reads from /dev/random).
282 ** And it really takes long when I work on a remote system. Why?
284 :CUSTOM_ID: it-really-takes-long-when-i-work-on-a-remote-system
287 Don't do this at all! You should never create keys or even use GnuPG
288 on a remote system because you normally have no physical control
289 over your secret key ring (which is in most cases vulnerable to
290 advanced dictionary attacks) - I strongly encourage everyone to only
291 create keys on a local computer (a disconnected laptop is probably
292 the best choice) and if you need it on your connected box (I know,
293 we all do this) be sure to have a strong password for both your
294 account and for your secret key, and that you can trust your system
297 When I check GnuPG on a remote system via ssh (I have no Alpha here)
298 ;-) I have the same problem. It takes a *very* long time to create
299 the keys, so I use a special option, --quick-random, to generate
300 insecure keys which are only good for some tests.
302 ** What is the difference between options and commands?
304 :CUSTOM_ID: difference-between-options-and-commands
307 If you do a 'gpg --help', you will get two separate lists. The first
308 is a list of commands. The second is a list of options. Whenever you
309 run GPG, you *must* pick exactly one command (with one exception,
310 see below). You *may* pick one or more options. The command should,
311 just by convention, come at the end of the argument list, after all
312 the options. If the command takes a file (all the basic ones do),
313 the filename comes at the very end. So the basic way to run gpg is:
315 : $ gpg [--option something] [--option2] [--option3 something] --command file
317 Some options take arguments. For example, the --output option (which
318 can be abbreviated as -o) is an option that takes a filename. The
319 option's argument must follow immediately after the option itself,
320 otherwise gpg doesn't know which option the argument is supposed to
321 paired with. As an option, --output and its filename must come before
322 the command. The --recipient (-r) option takes a name or keyID to
323 encrypt the message to, which must come right after the -r option.
324 The --encrypt (or -e) command comes after all the options and is
325 followed by the file you wish to encrypt. Therefore in this example
326 the command-line issued would be:
328 : $ gpg -r alice -o secret.txt -e test.txt
330 If you write the options out in full, it is easier to read:
332 : $ gpg --recipient alice --output secret.txt --encrypt test.txt
334 If you're encrypting to a file with the extension ".txt", then you'd
335 probably expect to see ASCII-armored text in the file (not binary),
336 so you need to add the --armor (-a) option, which doesn't take any
339 : $ gpg --armor --recipient alice --output secret.txt --encrypt test.txt
341 If you imagine square brackets around the optional parts, it becomes
344 : $ gpg [--armor] [--recipient alice] [--output secret.txt] --encrypt test.txt
346 The optional parts can be rearranged any way you want:
348 : $ gpg --output secret.txt --recipient alice --armor --encrypt test.txt
350 If your filename begins with a hyphen (e.g. "-a.txt"), GnuPG assumes
351 this is an option and may complain. To avoid this you have to either
352 use =./-a.txt=, or stop the option and command processing with two
353 hyphens: =-- -a.txt=.
355 *The exception to using only one command*: signing and encrypting
356 at the same time. For this you can combine both commands, such as in:
358 : $ gpg [--options] --sign --encrypt foo.txt
360 ** I can't delete a user ID on my secret keyring because it has already been deleted on my public keyring. What can I do?
362 :CUSTOM_ID: delete-user-id-from-secring-if-already-deleted-from-pubring
365 Because you can only select from the public key ring, there is no
366 direct way to do this. However it is not very complicated to do
367 anyway. Create a new user ID with exactly the same name and you
368 will see that there are now two identical user IDs on the secret
369 ring. Now select this user ID and delete it. Both user IDs will be
370 removed from the secret ring.
372 ** I can't delete my secret key because the public key disappeared. What can I do?
374 :CUSTOM_ID: delete-my-secret-key-because-the-public-key-disappeared
377 To select a key a search is always done on the public keyring,
378 therefore it is not possible to select a secret key without
379 having the public key. Normally it should never happen that the
380 public key got lost but the secret key is still available. The
381 reality is different, so GnuPG implements a special way to deal
382 with it: Simply use the long keyID to specify the key to delete,
383 which can be obtained by using the --with-colons options (it is
384 the fifth field in the lines beginning with "sec").
386 If you've lost your public key and need to recreate it instead
387 for continued use with your secret key, you may be able to use
388 gpgsplit as detailed in question
389 [[#i-still-have-my-secret-key-but-lost-my-public-key][I still have my secret key, but lost my public key. What can I do?]].
393 ** What are trust, validity and ownertrust?
395 :CUSTOM_ID: what-are-trust-validity-and-ownertrust
398 With GnuPG, the term "ownertrust" is used instead of "trust" to
399 help clarify that this is the value you have assigned to a key
400 to express how much you trust the owner of this key to correctly
401 sign (and thereby introduce) other keys. The "validity", or
402 calculated trust, is a value which indicates how much GnuPG
403 considers a key as being valid (that it really belongs to the
404 one who claims to be the owner of the key). For more information
405 on trust values see the chapter "The Web of Trust" in The GNU
408 ** How do I sign a patch file?
410 :CUSTOM_ID: how-do-i-sign-a-patch-file
413 Use "gpg --clearsign --not-dash-escaped ...". The problem with
414 --clearsign is that all lines starting with a dash are quoted with
415 "- "; obviously diff produces many lines starting with a dash and
416 these are then quoted and that is not good for a patch ;-). To use
417 a patch file without removing the cleartext signature, the special
418 option --not-dash-escaped may be used to suppress generation of
419 these escape sequences. You should not mail such a patch because
420 spaces and line endings are also subject to the signature and a
421 mailer may not preserve these. If you want to mail a file you can
422 simply sign it using your MUA (Mail User Agent).
424 ** Where is the "encrypt-to-self" option?
426 :CUSTOM_ID: where-is-the-encrypt-to-self-option
429 Use "--encrypt-to your_keyID". You can use more than one of these
430 options. To temporarily override the use of this additional key,
431 you can use the option "--no-encrypt-to".
433 ** How can I get rid of the Version and Comment headers in armored messages?
435 :CUSTOM_ID: get-rid-of-the-version-and-comment-headers-in-armored-messages
440 : --no-version --comment ''
442 Note that the left over blank line
443 is required by the protocol.
445 ** What does the "You are using the xxxx character set." mean?
447 :CUSTOM_ID: what-does-the-you-are-using-the-xxx-character-set-mean
450 This note is printed when UTF-8 mapping has to be done. Make sure
451 that the displayed character set is the one you have activated on
452 your system. Since "iso-8859-1" is the character set most used,
453 this is the default. You can change the charset with the option
454 =--charset=. It is important that your active character set matches
455 the one displayed --- if not, restrict yourself to plain 7 bit
456 ASCII and no mapping has to be done.
458 ** How can I get list of key IDs used to encrypt a message?
460 :CUSTOM_ID: how-can-i-get-list-of-key-ids-used-to-encrypt-a-message
463 : $ gpg --batch --decrypt --list-only --status-fd 1 2>/dev/null | \
464 : awk '/^\[GNUPG:\] ENC_TO / { print $3 }'
466 ** Why can't I decrypt files encrypted as symmetrical-only (-c) with a version of GnuPG prior to 1.0.1.
468 :CUSTOM_ID: why-cant-i-decrypt-symmetrical-only-with-gnupg-prior-to-1.0.1
471 There was a bug in GnuPG versions prior to 1.0.1 which affected files
472 only if 3DES or Twofish was used for symmetric-only encryption (this has
473 never been the default). The bug has been fixed, but to enable decryption
474 of old files you should run gpg with the option =--emulate-3des-s2k-bug=,
475 decrypt the file and encrypt it again without this option.
477 NOTE: This option was removed in GnuPG development version 1.1.0 and later
478 updates, so you will need to use a version between 1.0.1 and 1.0.7 to
479 re-encrypt any affected files.
481 ** How can I use GnuPG in an automated environment?
483 :CUSTOM_ID: how-can-i-use-gnupg-in-an-automated-environment
486 You should use the option =--batch= and don't use passphrases as
487 there is usually no way to store it more securely than on the
488 secret keyring itself. The suggested way to create keys for an
489 automated environment is:
493 1. If you want to do automatic signing, create a signing subkey for
494 your key. Use the interactive key editing menu by issuing the
496 : gpg --edit-key keyID
497 enter "addkey" and select the DSA key type).
499 1. Make sure that you use a passphrase (needed by the current
503 : gpg --export-secret-subkeys --no-comment foo >secring.auto
505 1. Copy secring.auto and the public keyring to a test directory.
507 1. Change to this directory.
510 : gpg --homedir . --edit foo
512 and use the sub-command =passwd= to remove the passphrase from the
513 subkeys. You may also want to remove all unused subkeys.
515 1. Copy secring.auto to a floppy and carry it to the target box.
517 On the target machine:
519 1. Install secring.auto as the secret keyring.
520 1. Now you can start your new service. It's also a good idea to
521 install an intrusion detection system so that you hopefully get
522 a notice of an successful intrusion, so that you in turn can
523 revoke all the subkeys installed on that machine and install new
526 ** Which email-client can I use with GnuPG?
528 :CUSTOM_ID: which-email-client-can-i-use-with-gnupg
531 Using GnuPG to encrypt email is one of the most popular uses.
532 Several mail clients or mail user agents (MUAs) support GnuPG to
533 varying degrees. Simplifying a bit, there are two ways mail can be
534 encrypted with GnuPG: the "old style" ASCII armor (i.e. cleartext
535 encryption), and RFC 2015 style (previously PGP/MIME, now OpenPGP).
536 The latter has full MIME support. Some MUAs support only one of
537 them, so whichever you actually use depends on your needs as well
538 as the capabilities of your addressee. As well, support may be
539 native to the MUA, or provided via "plug-ins" or external tools.
541 The following list is not exhaustive:
543 | MUA | OpenPGP | ASCII | How? (N,P,T) |
544 |-----------------+---------+-------+----------------------|
545 | Calypso | N | Y | P (Unixmail) |
546 | Elm | N | Y | T (mailpgp,morepgp) |
547 | Elm ME+ | N | Y | N |
548 | Emacs/Gnus | Y | Y | T (Mailcrypt,gpg.el) |
549 | Emacs/Mew | Y | Y | N |
550 | Emacs/VM | N | Y | T (Mailcrypt) |
551 | Evolution | Y | Y | N |
553 | GNUMail.app | Y | Y | P (PGPBundle) |
554 | GPGMail | Y | Y | N |
555 | KMail (<=1.4.x) | N | Y | N |
556 | KMail (1.5.x) | Y(P) | Y(N) | P/N |
557 | Mozilla | Y | Y | P (Enigmail) |
558 | Mulberry | Y | Y | P |
560 | Sylpheed | Y | Y | N |
561 | Claws-mail | Y | Y | N |
562 | TkRat | Y | Y | N |
563 | XEmacs/Gnus | Y | Y | T (Mailcrypt) |
564 | XEmacs/Mew | Y | Y | N |
565 | XEmacs/VM | N | Y | T (Mailcrypt) |
566 | XFmail | Y | Y | N |
568 ( N - Native, P - Plug-in, T - External Tool)
570 The following table lists proprietary MUAs. The GNU Project
571 suggests against the use of these programs, but they are listed
572 for interoperability reasons for your convenience.
574 | MUA | OpenPGP | ASCII | How? (N,P,T) |
575 |------------------+---------+-------+--------------------------|
576 | Apple Mail | Y | Y | P (GPGMail) |
577 | Becky2 | Y | Y | P (BkGnuPG) |
578 | Eudora | Y | Y | P (EuroraGPG) |
579 | Eudora Pro | Y | Y | P (EudoraGPG) |
580 | Lotus Notes | N | Y | P |
581 | Netscape 4.x | N | Y | P |
582 | Netscape 7.x | Y | Y | P (Enigmail) |
583 | Novell Groupwise | N | Y | P |
584 | Outlook | N | Y | P (G-Data) |
585 | Outlook Express | N | Y | P (GPGOE) |
586 | Pegasus | N | Y | P (QDPGP,PM-PGP) |
587 | Pine | N | Y | T (pgpenvelope,gpg4pine) |
588 | Postme | N | Y | P (GPGPPL) |
589 | The Bat! | N | Y | P (Ritlabs) |
591 Good overviews of OpenPGP-support can be found at:\\
592 [[http://www.openpgp.fr.st/courrier_en.html]] \\
593 http://www.bretschneidernet.de/tips/secmua.html
595 Users of Win32 MUAs that lack OpenPGP support may look into using
596 GPGrelay http://gpgrelay.sourceforge.net, a small email-relaying
597 server that uses GnuPG to enable many email clients to send and
598 receive emails that conform to PGP-MIME (RFC 2015).
600 ** Can't we have a gpg library?
602 :CUSTOM_ID: cant-we-have-a-gpg-library
605 This has been frequently requested. However, the current viewpoint
606 of the GnuPG maintainers is that this would lead to several security
607 issues and will therefore not be implemented in the foreseeable
608 future. However, for some areas of application gpgme could do the
609 trick. You'll find it at [[gnupgweb:related_software/gpgme]].
611 ** I have successfully generated a revocation certificate, but I don't understand how to send it to the key servers.
613 :CUSTOM_ID: how-to-send-a-revocation-to-the-keyservers
616 Most keyservers don't accept a 'bare' revocation certificate. You
617 have to import the certificate into gpg first:
619 : $ gpg --import my-revocation.asc
621 then send the revoked key to the keyservers:
623 : $ gpg --keyserver certserver.pgp.com --send-keys mykeyid
625 (or use a keyserver web interface for this).
627 ** How do I put my keyring in a different directory?
629 :CUSTOM_ID: how-do-i-put-my-keyring-in-a-different-directory
632 GnuPG keeps several files in a special homedir directory. These
633 include the options file, pubring.gpg, secring.gpg, trustdb.gpg,
634 and others. GnuPG will always create and use these files. On
635 unices, the homedir is usually ~/.gnupg; on Windows it is name
636 "gnupg" and found below the user's application directory. Run the
637 gpg and pass the option --version to see the name of that
640 If you want to put your keyrings somewhere else, use the option:
642 : --homedir /my/path/
644 to make GnuPG create all its files in that directory. Your keyring
645 will be "/my/path/pubring.gpg". This way you can store your secrets
646 on a floppy disk. Don't use "--keyring" as its purpose is to specify
647 additional keyring files.
649 ** How do I verify signed packages?
651 :CUSTOM_ID: how-do-i-verify-signed-packages
654 must first have the vendor, organisation, or issuing person's key
655 Before you can verify the signature that accompanies a package, you
656 imported into your public keyring. To prevent GnuPG warning
657 messages the key should also be validated (or locally signed).
659 You will also need to download the detached signature file along
660 with the package. These files will usually have the same name as
661 the package, with either a binary (.sig) or ASCII armor (.asc)
664 Once their key has been imported, and the package and accompanying
665 signature files have been downloaded, use:
667 : $ gpg --verify sigfile signed-file
669 If the signature file has the same base name as the package file,
670 the package can also be verified by specifying just the signature
671 file, as GnuPG will derive the package's file name from the name
672 given (less the .sig or .asc extension). For example, to verify a
673 package named foobar.tar.gz against its detached binary signature
676 : $ gpg --verify foobar.tar.gz.sig
678 ** How do I export a keyring with only selected signatures (keys)?
680 :CUSTOM_ID: how-do-i-export-a-keyring-with-only-selected-signatures
683 If you're wanting to create a keyring with only a subset of keys
684 selected from a master keyring (for a club, user group, or company
685 department for example), simply specify the keys you want to export:
687 : $ gpg --armor --export key1 key2 key3 key4 > keys1-4.asc
689 ** I still have my secret key, but lost my public key. What can I do?
691 :CUSTOM_ID: i-still-have-my-secret-key-but-lost-my-public-key
694 All OpenPGP secret keys have a copy of the public key inside them,
695 and in a worst-case scenario, you can create yourself a new public
696 key using the secret key.
698 A tool to convert a secret key into a public one has been included
699 (it's actually a new option for gpgsplit) and is available with GnuPG
700 versions 1.2.1 or later (or can be found in CVS). It works like this:
702 : $ gpgsplit --no-split --secret-to-public secret.gpg >publickey.gpg
704 One should first try to export the secret key and convert just this
705 one. Using the entire secret keyring should work too. After this has
706 been done, the publickey.gpg file can be imported into GnuPG as usual.
708 ** Clearsigned messages sent from my web-mail account have an invalid signature. Why?
710 :CUSTOM_ID: clearsig-sent-from-webmail-have-an-invalid-signature
713 Check to make sure the settings for your web-based email account
714 do not use HTML formatting for the pasted clearsigned message. This can
715 alter the message with embedded HTML markup tags or spaces, resulting
716 in an invalid signature. The recipient may be able to copy the signed
717 message block to a text file for verification, or the web email
718 service may allow you to attach the clearsigned message as a file
719 if plaintext messages are not an option.
722 * Compatibility Issues
724 ** How can I encrypt a message with GnuPG so that PGP is able to decrypt it?
726 :CUSTOM_ID: how-can-i-encrypt-a-message-so-that-pgp-is-able-to-decrypt-it
729 It depends on the PGP version.
733 You can't do that because PGP 2.x normally uses IDEA which is
734 not supported by GnuPG as it is patented (see [[#how-do-i-include-support-for-rsa-and-idea][How do I include
735 support for RSA and IDEA?]]), but if you have a modified version
736 of PGP you can try this:
738 : $ gpg --rfc1991 --cipher-algo 3des ...
740 Please don't pipe the data to encrypt to gpg but provide it
741 using a filename; otherwise, PGP 2 will not be able to handle
744 As for conventional encryption, you can't do this for PGP 2.
746 - PGP 5.x and higher ::
748 You need to provide two additional options:
750 : --compress-algo 1 --cipher-algo cast5
752 You may also use "3des" instead of "cast5", and "blowfish" does
753 not work with all versions of PGP 5. You may also want to put:
757 into your =~/.gnupg/options= file --- this does not affect
758 normal GnuPG operation.
760 This applies to conventional encryption as well.
762 ** How do I migrate from PGP 2.x to GnuPG?
764 :CUSTOM_ID: how-do-i-migrate-from-pgp2-to-gnupg
767 PGP 2 uses the RSA and IDEA encryption algorithms. Whereas the RSA
768 patent has expired and RSA is included as of GnuPG 1.0.3, the IDEA
769 algorithm is still patented until 2007. Under certain conditions you
770 may use IDEA even today. In that case, you may refer to Question
771 [[*How%20do%20I%20include%20support%20for%20RSA%20and%20IDEA][How do I include support for RSA and IDEA?]] about how to add
772 IDEA support to GnuPG and read
773 [[gnupgweb:gph/en/pgp2x.html]] to perform the migration.
775 ** Why is PGP 5.x not able to encrypt messages with some keys?
777 :CUSTOM_ID: why-is-pgp5-not-able-to-encrypt-messages-with-some-keys
780 PGP, Inc. refuses to accept Elgamal keys of type 20 even for
781 encryption. They only support type 16 (which is identical at least
782 for decryption). To be more inter-operable, GnuPG (starting with
783 version 0.3.3) now also uses type 16 for the Elgamal subkey which is
784 created if the default key algorithm is chosen. You may add a type
785 16 Elgamal key to your public key, which is easy as your key
786 signatures are still valid.
788 ** Why is PGP 5.x not able to verify my messages?
790 :CUSTOM_ID: why-is-pgp5-not-able-to-verify-my-messages
793 PGP 5.x does not accept v4 signatures for data material but OpenPGP
794 requests generation of v4 signatures for all kind of data, that's why
795 GnuPG defaults to them. Use the option "--force-v3-sigs" to generate
796 v3 signatures for data.
798 ** How do I transfer owner trust values from PGP to GnuPG?
800 :CUSTOM_ID: how-do-i-transfer-owner-trust-values-from-pgp-to-gnupg
803 There is a script in the tools directory to help you. After you have
804 imported the PGP keyring you can give this command:
806 : $ lspgpot pgpkeyring | gpg --import-ownertrust
808 where pgpkeyring is the original keyring and not the GnuPG keyring
809 you might have created in the first step.
811 ** PGP does not like my secret key.
813 :CUSTOM_ID: pgp-does-not-like-my-secret-key
816 Older PGPs probably bail out on some private comment packets used by
817 GnuPG. These packets are fully in compliance with OpenPGP; however
818 PGP is not really OpenPGP aware. A workaround is to export the
819 secret keys with this command:
821 : $ gpg --export-secret-keys --no-comment -a your-KeyID
823 Another possibility is this: by default, GnuPG encrypts your secret
824 key using the Blowfish symmetric algorithm. Older PGPs will only
825 understand 3DES, CAST5, or IDEA symmetric algorithms. Using the
826 following method you can re-encrypt your secret gpg key with a
829 : $ gpg --s2k-cipher-algo=CAST5 --s2k-digest-algo=SHA1 \
830 : --compress-algo=1 --edit-key <username>
832 Then use passwd to change the password (just change it to the same
833 thing, but it will encrypt the key with CAST5 this time).
835 Now you can export it and PGP should be able to handle it.
837 For PGP 6.x the following options work to export a key:
839 : $ gpg --s2k-cipher-algo 3des --compress-algo 1 --rfc1991 \
840 : --export-secret-keys <KeyID>
842 ** GnuPG no longer installs a ~/.gnupg/options file. Is it missing?
844 :CUSTOM_ID: gnupg-no-longer-installs-a-options-file-is-it-missing
847 No. The ~/.gnupg/options file has been renamed to
848 ~/.gnupg/gpg.conf for new installs as of version 1.1.92. If an
849 existing ~/.gnupg/options file is found during an upgrade it will
850 still be used, but this change was required to have a more
851 consistent naming scheme with forthcoming tools. An existing
852 options file can be renamed to gpg.conf for users upgrading, or
853 receiving the message that the "old default options file" is
854 ignored (occurs if both a gpg.conf and an options file are found).
856 ** How do you export GnuPG keys for use with PGP?
858 :CUSTOM_ID: how-do-you-export-gnupg-keys-for-use-with-pgp
861 This has come up fairly often, so here's the HOWTO:
863 PGP can (for most key types) use secret keys generated by GnuPG. The
864 problems that come up occasionally are generally because GnuPG
865 supports a few more features from the OpenPGP standard than PGP does.
866 If your secret key has any of those features in use, then PGP will
867 reject the key or you will have problems communicating later. Note
868 that PGP doesn't do Elgamal signing keys at all, so they are not
869 usable with any version.
871 These instructions should work for GnuPG 1.0.7 and later, and PGP
874 Start by editing the key. Most of this line is not really necessary
875 as the default values are correct, but it does not hurt to repeat the
876 values, as this will override them in case you have something else set
877 in your options file.
879 : $ gpg --s2k-cipher-algo cast5 --s2k-digest-algo sha1 --s2k-mode 3 \
880 : --simple-sk-checksum --edit KeyID
882 Turn off some features. Set the list of preferred ciphers, hashes,
883 and compression algorithms to things that PGP can handle. (Yes, I
884 know this is an odd list of ciphers, but this is what PGP itself uses,
887 : > setpref S9 S8 S7 S3 S2 S10 H2 H3 Z1 Z0
889 Now put the list of preferences onto the key.
893 Finally we must decrypt and re-encrypt the key, making sure that we
894 encrypt with a cipher that PGP likes. We set this up in the --edit
895 line above, so now we just need to change the passphrase to make it
896 take effect. You can use the same passphrase if you like, or take
897 this opportunity to actually change it.
905 Now we can do the usual export:
907 : $ gpg --export KeyID > mypublickey.pgp[H br]
908 : $ gpg --export-secret-key KeyID > mysecretkey.pgp
910 Thanks to David Shaw for this information!
912 ** What are DH/DSS keys?
914 :CUSTOM_ID: what-are-dh-dss-keys
917 PGP uses a different name for the former default encryption
918 algorithm Elgamal: They name it DH, which usually stands for the
919 Diffie-Hellman key exchange algorithm. It has been said that this
920 had historic patent and business reasons. It is however exactly
921 the same thing as the Elgamal algorithm.
923 They also use the acronym DSS (Digital Signature Standard) instead
924 of the DSA (Digital Signature Algorithm). The difference is that
925 DSS requires the use of certain hash algorithms; however OpenPGP
926 allows the use of more than those hash algorithms, thus GPG usually
929 * Problems and Error Messages
931 ** Why do I get "gpg: Warning: using insecure memory!"
933 :CUSTOM_ID: why-do-i-get-gpg_warning_using_insecure_memory
936 You see this warning if GPG is not able to lock pages against being
939 However, on most modern system you should not see this message
940 anymore because these systems allow any process to prevent a small
941 number of memory pages from being swapped out to disk (using the
942 mlock system call). Other (mostly older) systems don't allow this
943 unless you install GPG as setuid(root).
945 Locking pages against being swapped out is not necessary if your
946 system uses an encrypted swap partition. In fact that is the best
947 way to protect sensitive data from ending up on a disk. If your
948 system allows for encrypted swap partitions, please make use of
949 that feature. Note that GPG does not know about encrypted swap
950 partitions and might print the warning; thus you should disabled
951 the warning if your swap partition is encrypted. You may also want
952 to disable this warning if you can't or don't want to install GnuPG
953 setuid(root). To disable the warning you put a line
957 into your ~/.gnupg/gpg.conf file.
959 What follows is a short description on how to install GPG
960 setuid(root); for those who need this.
962 On some systems this program should be installed as setuid(root).
963 This is necessary to lock memory pages. Locking memory pages
964 prevents the operating system from writing them to disk and thereby
965 keeping your secret keys really secret. If you get no warning
966 message about insecure memory your operating system supports
967 locking without being root. The program drops root privileges as
968 soon as locked memory is allocated.
970 To setuid(root) permissions on the gpg binary you can either use:
972 : $ chmod u+s /path/to/gpg
976 : $ chmod 4755 /path/to/gpg
978 Some refrain from using setuid(root) unless absolutely required for
979 security reasons. Please check with your system administrator if
980 you are not able to make these determinations yourself.
982 On UnixWare 2.x and 7.x you should install GnuPG with the 'plock'
983 privilege to get the same effect:
985 : $ filepriv -f plock /path/to/gpg
987 On some systems (e.g., Windows) GnuPG does not lock memory pages
988 and older GnuPG versions (<=1.0.4) issue the warning:
990 : gpg: Please note that you don't have secure memory
992 This warning can't be switched off by the above option because it
993 was thought to be too serious an issue. However, it confused users
994 too much, so the warning was eventually removed.
996 ** Large File Support doesn't work
998 :CUSTOM_ID: large-file-support-does-not-work
1001 LFS works correctly in post-1.0.4 versions. If configure doesn't
1002 detect it, try a different (i.e., better) compiler. egcs 1.1.2
1003 works fine, other gccs sometimes don't. BTW, several compilation
1004 problems of GnuPG 1.0.3 and 1.0.4 on HP-UX and Solaris were due to
1007 ** In the edit menu the trust values are not displayed correctly after signing uids. Why?
1009 :CUSTOM_ID: edit-menu-trust-not-show-correctly-after-signing-uids
1012 This happens because some information is stored immediately in
1013 the trustdb, but the actual trust calculation can be done after the
1014 save command. This is a "not easy to fix" design bug which will be
1015 addressed in some future release.
1017 ** What does "skipping pubkey 1: already loaded" mean?
1019 :CUSTOM_ID: what-does-skipping_pubkey_1_already_loaded-mean
1022 As of GnuPG 1.0.3, the RSA algorithm is included. If you still have
1023 a "load-extension rsa" in your options file, the above message
1024 occurs. Just remove the load command from the options file.
1026 ** GnuPG 1.0.4 doesn't create ~/.gnupg ...
1028 :CUSTOM_ID: gnupg-1.0.4-does-not-create-.gnupg
1031 That's a known bug, already fixed in newer versions.
1033 ** An Elgamal signature does not verify anymore since version 1.0.2
1035 :CUSTOM_ID: an-elgamal-signature-does-not-verify-anymore-since-version-1.0.2
1038 Use the option --emulate-md-encode-bug.
1040 ** Old versions of GnuPG can't verify Elgamal signatures
1042 :CUSTOM_ID: old-versions-of-gnupg-cant-verify-elgamal-signatures
1045 Update to GnuPG 1.0.2 or newer.
1047 ** When I use --clearsign, the plain text has sometimes extra dashes in it - why?
1049 :CUSTOM_ID: extra-dashes-in-clearsign-messages
1052 This is called dash-escaped text and is required by OpenPGP.
1053 It always happens when a line starts with a dash ("-") and is
1054 needed to make the lines that structure signature and text
1055 (i.e., "-----BEGIN PGP SIGNATURE-----") to be the only lines
1056 that start with two dashes.
1058 If you use GnuPG to process those messages, the extra dashes
1059 are removed. Good mail clients remove those extra dashes when
1060 displaying such a message.
1062 ** What is the thing with "can't handle multiple signatures"?
1064 :CUSTOM_ID: what-is-the-thing-with-cant_handle_multiple_signatures
1067 Due to different message formats GnuPG is not always able to split
1068 a file with multiple signatures unambiguously into its parts. This
1069 error message informs you that there is something wrong with the input.
1071 The only way to have multiple signatures in a file is by using the
1072 OpenPGP format with one-pass-signature packets (which is GnuPG's
1073 default) or the cleartext signed format.
1075 ** If I submit a key to a keyserver, nothing happens
1077 :CUSTOM_ID: if-i-submit-a-key-to-a-keyserver-nothing-happens
1080 You are most likely using GnuPG 1.0.2 or older on Windows. That's
1081 feature isn't yet implemented, but it's a bug not to say it. Newer
1082 versions issue a warning. Upgrade to 1.4.5 or newer.
1084 ** I get "gpg: waiting for lock ..."
1086 :CUSTOM_ID: i-get-gpg_waiting_for_lock
1089 A previous instance of gpg has most likely exited abnormally and left
1090 a lock file. Go to ~/.gnupg and look for .*.lock files and remove them.
1092 ** Older gpg binaries (e.g., 1.0) have problems with keys from newer gpg binaries
1094 :CUSTOM_ID: gpg-1.0-has-problems-with-keys-from-newer-gpg-versions
1097 As of 1.0.3, keys generated with gpg are created with preferences to
1098 TWOFISH (and AES since 1.0.4) and that also means that they have the
1099 capability to use the new MDC encryption method. This will go into
1100 OpenPGP soon, and is also suppoted by PGP 7. This new method avoids
1101 a (not so new) attack on all email encryption systems.
1103 This in turn means that pre-1.0.3 gpg binaries have problems with
1104 newer keys. Because of security and bug fixes, you should keep your
1105 GnuPG installation in a recent state anyway. As a workaround, you can
1106 force gpg to use a previous default cipher algo by putting:
1110 into your options file.
1112 ** With 1.0.4, I get "this cipher algorithm is deprecated ..."
1114 :CUSTOM_ID: with-1.0.4-i-get-this_cipher_algorithm_is_deprecated
1117 If you just generated a new key and get this message while
1118 encrypting, you've witnessed a bug in 1.0.4. It uses the new AES
1119 cipher Rijndael that is incorrectly being referred as "deprecated".
1120 Ignore this warning, more recent versions of gpg are corrected.
1122 ** Some dates are displayed as ????-??-??. Why?
1124 :CUSTOM_ID: some-dates-are-displayed-as-question-marks
1127 Due to constraints in most libc implementations, dates beyond
1128 2038-01-19 can't be displayed correctly. 64-bit OSes are not
1129 affected by this problem. To avoid printing wrong dates, GnuPG
1130 instead prints some question marks. To see the correct value, you
1131 can use the options --with-colons and --fixed-list-mode.
1133 ** I still have a problem. How do I report a bug?
1135 :CUSTOM_ID: i-still-have-a-problem-how-do-i-report-a-bug
1138 Are you sure that it's not been mentioned somewhere on the mailing
1139 lists? Did you have a look at the bug list (you'll find a link to
1140 the list of reported bugs on the documentation page). If you're
1141 not sure about it being a bug, you can send mail to the
1142 gnupg-devel list. Otherwise, use the bug tracking system
1143 [[http://bugs.gnupg.org][bugs.gnupg.org]].
1145 ** Why doesn't GnuPG support X.509 certificates?
1147 :CUSTOM_ID: why-doesnt-gnupg-support-x509-certificates
1150 That is only the case for GnuPG version 1.x. GnuPG 2.x fully
1151 supports X.509 and S/MIME using the gpgsm tool.
1153 ** Why do national characters in my user ID look funny?
1155 :CUSTOM_ID: why-do-national-characters-in-my-user-id-look-funny
1158 According to OpenPGP, GnuPG encodes user ID strings (and other
1159 things) using UTF-8. In this encoding of Unicode, most national
1160 characters get encoded as two- or three-byte sequences. For
1161 example, å (0xE5 in ISO-8859-1) becomes Ã¥ (0xC3,
1162 0xA5). This might also be the reason why keyservers can't find
1165 ** I get 'sed' errors when running ./configure on Mac OS X ...
1167 :CUSTOM_ID: i-get-sed-errors-when-running-configure-on-mac-os-x
1170 This problem has been fixed for all modern GnuPG versions.
1171 (By using an autoconf 2.50 generated configure script).
1173 ** Why does GnuPG 1.0.6 bail out on keyrings used with 1.0.7?
1175 :CUSTOM_ID: why-does-gnupg-1.0.6-bail-out-on-keyrings-used-with-1.0.7
1178 There is a small bug in 1.0.6 which didn't parse trust packets
1179 correctly. You may want to apply this patch if you can't upgrade:
1180 [[http://www.gnupg.org/developer/gpg-woody-fix.txt]].
1182 ** I upgraded to GnuPG version 1.0.7 and now it takes longer to load my keyrings. What can I do?
1184 :CUSTOM_ID: with-gpg-1.0.7-it-takes-longer-to-load-my-keyrings
1187 The way signature states are stored has changed so that v3 signatures
1188 can be supported. You can use the new --rebuild-keydb-caches migration
1189 command, which was built into this release and increases the speed of
1190 many operations for existing keyrings.
1192 ** Doesn't a fully trusted user ID on a key prevent warning messages when encrypting to other IDs on the key?
1194 :CUSTOM_ID: key-validation-bug-in-gpg-1.2.1
1197 No. That was actually a key validity bug in GnuPG 1.2.1 and earlier
1198 versions. As part of the development of GnuPG 1.2.2, a bug was
1199 discovered in the key validation code. This bug causes keys with
1200 more than one user ID to give all user IDs on the key the amount of
1201 validity given to the most-valid key. The bug has been fixed in GnuPG
1202 release 1.2.2, and upgrading is the recommended fix for this problem.
1203 More information and a patch for a some pre-1.2.2 versions of GnuPG
1206 [[http://lists.gnupg.org/pipermail/gnupg-announce/2003q2/000268.html]].
1208 ** I just compiled GnuPG from source on my GNU/Linux RPM-based system and it's not working. Why?
1210 :CUSTOM_ID: compiled-on-gnu-linux-rpm-based-system-and-not-working
1213 Many GNU/Linux distributions that are RPM-based will install a
1214 version of GnuPG as part of its standard installation, placing the
1215 binaries in the /usr/bin directory. Later, compiling and installing
1216 GnuPG from source other than from a source RPM won't normally
1217 overwrite these files, as the default location for placement of
1218 GnuPG binaries is in /usr/local/bin unless the '--prefix' switch
1219 is used during compile to specify an alternate location. Since the
1220 /usr/bin directory more than likely appears in your path before
1221 /usr/local/bin, the older RPM-version binaries will continue to
1222 be used when called since they were not replaced.
1224 To resolve this, uninstall the RPM-based version with 'rpm -e gnupg'
1225 before installing the binaries compiled from source. If dependency
1226 errors are displayed when attempting to uninstall the RPM (such as
1227 when Red Hat's up2date is also installed, which uses GnuPG), uninstall
1228 the RPM with 'rpm -e gnupg --nodeps' to force the uninstall. Any
1229 dependent files should be automatically replaced during the install
1230 of the compiled version. If the default /usr/local/bin directory is
1231 used, some packages such as SuSE's Yast Online Update may need to be
1232 configured to look for GnuPG binaries in the /usr/local/bin directory,
1233 or symlinks can be created in /usr/bin that point to the binaries
1234 located in /usr/local/bin.
1239 ** How does this whole thing work?
1241 :CUSTOM_ID: how-does-this-whole-thing-work
1244 To generate a secret/public keypair, run:
1246 : $ gpg --generate-key
1248 and choose the default values.
1250 Data that is encrypted with a public key can only be decrypted by
1251 the matching secret key. The secret key is protected by a password,
1252 the public key is not.
1254 So to send your friend a message, you would encrypt your message
1255 with his public key, and he would only be able to decrypt it by
1256 having the secret key and putting in the password to use his secret
1259 GnuPG is also useful for signing things. Files that are encrypted
1260 with the secret key can be decrypted with the public key. To sign
1261 something, a hash is taken of the data, and then the hash is in some
1262 form encoded with the secret key. If someone has your public key, they
1263 can verify that it is from you and that it hasn't changed by checking
1264 the encoded form of the hash with the public key.
1266 A keyring is just a large file that stores keys. You have a public
1267 keyring where you store yours and your friend's public keys. You have
1268 a secret keyring that you keep your secret key on, and should be very
1269 careful with. Never ever give anyone else access to it and use a *good*
1270 passphrase to protect the data in it.
1272 You can 'conventionally' encrypt something by using the option 'gpg -c'.
1273 It is encrypted using a passphrase, and does not use public and secret
1274 keys. If the person you send the data to knows that passphrase, they
1275 can decrypt it. This is usually most useful for encrypting things to
1276 yourself, although you can encrypt things to your own public key in the
1277 same way. It should be used for communication with partners you know
1278 and where it is easy to exchange the passphrases (e.g. with your boy
1279 friend or your wife). The advantage is that you can change the
1280 passphrase from time to time and decrease the risk, that many old
1281 messages may be decrypted by people who accidentally got your passphrase.
1283 You can add and copy keys to and from your keyring with the 'gpg
1284 --import' and 'gpg --export' command. 'gpg --export-secret-keys' will
1285 export secret keys. This is normally not useful, but you can generate
1286 the key on one machine then move it to another machine.
1288 Keys can be signed under the 'gpg --edit-key' option. When you sign a
1289 key, you are saying that you are certain that the key belongs to the
1290 person it says it comes from. You should be very sure that is really
1291 that person: You should verify the key fingerprint with:
1293 : $ gpg --fingerprint KeyID
1295 over the phone (if you really know the voice of the other person), at
1296 a key signing party (which are often held at computer conferences),
1297 or at a meeting of your local GNU/Linux User Group.
1299 Hmm, what else. You may use the option '-o filename' to force output
1300 to this filename (use '-' to force output to stdout). '-r' just lets
1301 you specify the recipient (which public key you encrypt with) on the
1302 command line instead of typing it interactively.
1304 Oh yeah, this is important. By default all data is encrypted in some
1305 weird binary format. If you want to have things appear in ASCII text
1306 that is readable, just add the '-a' option. But the preferred method
1307 is to use a MIME aware mail reader (Mutt, Pine and many more).
1309 There is a small security glitch in the OpenPGP (and therefore GnuPG)
1310 system; to avoid this you should always sign and encrypt a message
1311 instead of only encrypting it.
1313 ** Why are some signatures with an ELG-E key valid?
1315 :CUSTOM_ID: why-are-some-signatures-with-an-elg-e-key-valid
1318 These are Elgamal keys generated by GnuPG in v3 (RFC 1991) packets.
1319 The OpenPGP draft later changed the algorithm identifier for Elgamal
1320 keys which are usable for signatures and encryption from 16 to 20.
1321 GnuPG now uses 20 when it generates new Elgamal keys but still
1322 accepts 16 (which is according to OpenPGP "encryption only") if this
1323 key is in a v3 packet. GnuPG is the only program which had used
1324 these v3 Elgamal keys - so this assumption is quite safe.
1326 ** How does the whole trust thing work?
1328 :CUSTOM_ID: how-does-the-whole-trust-thing-work
1331 It works more or less like PGP. The difference is that the trust is
1332 computed at the time it is needed. This is one of the reasons for
1333 the trustdb which holds a list of valid key signatures. If you are
1334 not running in batch mode you will be asked to assign a trust
1335 parameter (ownertrust) to a key.
1337 You can see the validity (calculated trust value) using this
1340 : $ gpg --list-keys --with-colons
1342 If the first field is "pub" or "uid", the second field shows you the
1345 : o = Unknown (this key is new to the system)
1346 : e = The key has expired
1347 : q = Undefined (no value assigned)
1348 : n = Don't trust this key at all
1349 : m = There is marginal trust in this key
1350 : f = The key is full trusted
1351 : u = The key is ultimately trusted; this is only used
1352 : for keys for which the secret key is also available.
1353 : r = The key has been revoked
1354 : d = The key has been disabled
1356 The value in the "pub" record is the best one of all "uid" records.
1357 You can get a list of the assigned trust values (how much you trust
1358 the owner to correctly sign another person's key) with:
1360 : $ gpg --export-ownertrust
1362 The first field is the fingerprint of the primary key, the second
1363 field is the assigned value:
1365 : - = No ownertrust value yet assigned or calculated.
1366 : n = Never trust this keyholder to correctly verify others signatures.
1367 : m = Have marginal trust in the keyholders capability to sign other
1369 : f = Assume that the key holder really knows how to sign keys.
1370 : u = No need to trust ourself because we have the secret key.
1372 Keep these values confidential because they express your opinions
1373 about others. PGP stores this information with the keyring thus it
1374 is not a good idea to publish a PGP keyring instead of exporting
1375 the keyring. GnuPG stores the trust in the trustdb.gpg file so it
1376 is okay to give a gpg keyring away (but we have a --export command
1379 ** What kind of output is this: "key C26EE891.298, uid 09FB: ...."?
1381 :CUSTOM_ID: trustb-diagnostics-output-key-uid
1384 This is the internal representation of a user ID in the trustdb.
1385 "C26EE891" is the keyid, "298" is the local ID (a record number in
1386 the trustdb) and "09FB" is the last two bytes of a ripe-md-160 hash
1387 of the user ID for this key.
1389 ** How do I interpret some of the informational outputs?
1391 :CUSTOM_ID: how-do-i-interpret-some-of-the-informational-outputs
1394 While checking the validity of a key, GnuPG sometimes prints some
1395 information which is prefixed with information about the checked
1398 : "key 12345678.3456"
1400 This is about the key with key ID 12345678 and the internal number
1401 3456, which is the record number of the so called directory record
1404 : "uid 12345678.3456/ACDE"
1406 This is about the user ID for the same key. To identify the user ID
1407 the last two bytes of a ripe-md-160 over the user ID ring is printed.
1409 : "sig 12345678.3456/ACDE/9A8B7C6D"
1411 This is about the signature with key ID 9A8B7C6D for the above key
1412 and user ID, if it is a signature which is direct on a key, the user
1413 ID part is empty (..//..).
1415 ** Are the header lines of a cleartext signature part of the signed material?
1417 :CUSTOM_ID: are-header-lines-of-cleartext-sigs-part-of-the-signed-material
1420 No. For example you can add or remove "Comment:" lines. They have
1421 a purpose like the mail header lines. However a "Hash:" line is
1422 needed for OpenPGP signatures to tell the parser which hash
1425 ** What is the list of preferred algorithms?
1427 :CUSTOM_ID: what-is-the-list-of-preferred-algorithms
1430 The list of preferred algorithms is a list of cipher, hash and
1431 compression algorithms stored in the self-signature of a key during
1432 key generation. When you encrypt a document, GnuPG uses this list
1433 (which is then part of a public key) to determine which algorithms
1434 to use. Basically it tells other people what algorithms the
1435 recipient is able to handle and provides an order of preference.
1437 ** How do I change the list of preferred algorithms?
1439 :CUSTOM_ID: how-do-i-change-the-list-of-preferred-algorithms
1442 In version 1.0.7 or later, you can use the edit menu and set the
1443 new list of preference using the command "setpref"; the format of
1444 this command resembles the output of the command "pref". The
1445 preference is not changed immediately but the set preference will
1446 be used when a new user ID is created. If you want to update the
1447 preferences for existing user IDs, select those user IDs (or select
1448 none to update all) and enter the command "updpref". Note that the
1449 timestamp of the self-signature is increased by one second when
1450 running this command.
1452 ** How can I import all the missing signer keys?
1454 :CUSTOM_ID: how-can-i-import-all-the-missing-signer-keys
1457 If you imported a key and you want to also import all the signer's
1458 keys, you can do this with this command:
1460 : gpg --check-sigs --with-colon KEYID \
1461 : | awk -F: '$1 == "sig" && $2 == "?" { print $5 }' \
1462 : | sort | uniq | xargs echo gpg --recv-keys
1464 Note that the invocation of sort is also required to wait for the
1465 of the listing before before starting the import.
1468 * Bug reporting and hacking
1470 :CUSTOM_ID: bugreports-et-al
1473 ** Copyright assignments
1475 :CUSTOM_ID: copyright-assignments
1478 Like most core GNU projects, GnuPG requires the signing of a copyright
1479 assignment to the FSF. Without such an assignment we may only accept
1480 trivial patches. As a rule of thumb the sum of all changed lines by
1481 one contributor may not exceed about 15 lines. Exceptions are typo
1482 corrections and translations. See
1483 http://www.gnu.org/prep/maintain/html_node/Copyright-Papers.html for
1486 ** U.S. export restrictions
1488 :CUSTOM_ID: us-export-restrictions
1491 GnuPG has originally been developed in Germany because we have been
1492 able to do that without being affected by the US export restrictions.
1493 We had to reject any contributions from US citizens or from people
1494 living the the US. That changed by end of 2000 when the export
1495 restrictions were basically dropped for all kind of freely available
1496 software. However there are still some requirements in the US.
1497 Quoting David Shaw: mail
1499 For each release of GPG that I contributed to, I sent an email
1500 containing a pointer to the new source code to the Commerce
1501 Department. The rules changed slightly in 2004, so that you could
1502 send a single email and then be done until the information in that
1503 email changed, so I just sent "www.gnupg.org" and haven't bothered
1504 with the email since.
1507 The rules: http://www.bis.doc.gov/encryption/pubavailencsourcecodenofify.html
1508 The 2004 rule change: http://edocket.access.gpo.gov/2004/04-26992.htm
1513 :CUSTOM_ID: acknowledgements
1516 Many thanks to Nils Ellmenreich for maintaining this FAQ file for
1517 such a long time, David D. Scribner for continuing maintenance,
1518 Werner Koch for the original FAQ file, and to all posters to
1519 gnupg-users and gnupg-devel. They all provided most of the answers.
1520 Converted to org-mode and removed from the tarballs in October 2010.
1522 Copyright (C) 2000, 2001, 2002, 2003, 2010 Free Software Foundation,
1523 Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111, USA
1525 This file is free software; as a special exception the author gives
1526 unlimited permission to copy and/or distribute it, with or without
1527 modifications, as long as this notice is preserved.
1531 - 2010-11-14: Update "gpg: Warning: using insecure memory!"
1536 * COMMENT HTML style specifications
1538 #+begin_src emacs-lisp
1539 (defun org-faq-make-target ()
1540 "Make hard target for current headline."
1542 (if (not (org-on-heading-p))
1543 (error "Not on a headline"))
1544 (let ((h (org-trim (org-get-heading 'no-tags))))
1545 (if (string-match "[ \t]*\\?\\'" h)
1546 (setq h (replace-match "" t t h)))
1547 (while (string-match "[ \t]+" h)
1548 (setq h (replace-match "-" t t h)))
1549 (setq h (downcase h))
1550 (org-entry-put nil "CUSTOM_ID" h)))
1556 # org-export-html-style-include-default: nil
1557 # org-export-html-style-include-scripts: nil