home *** CD-ROM | disk | FTP | other *** search
/ Chip 2007 November / CPNL0711.ISO / communic / email / gpg4win-light-1.1.2.exe / share / gnupg / FAQ next >
Text File  |  2007-08-16  |  57KB  |  1,302 lines

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