home *** CD-ROM | disk | FTP | other *** search
/ com!online 2002 May / comcd0502.iso / top100com / gnupg-w32-1.0.6 / FAQ < prev    next >
Encoding:
Text File  |  2002-03-04  |  39.6 KB  |  915 lines

  1.  
  2. GNUPG FREQUENTLY ASKED QUESTIONS
  3.  
  4.  
  5. Version: 1.2
  6. Last-Modified: Apr 4, 2001
  7. Maintained-by: Nils Ellmenreich <nils 'at' gnupg.org>
  8.  
  9.  
  10. This is the GnuPG FAQ. The latest HTML version is available  
  11.  here.   <http://www.gnupg.org/faq.html>
  12.  
  13. The index is generated automatically, so there may be errors here.  Not
  14. all questions may be in the section they belong to. Suggestions about
  15. how 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
  19. here. 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.  
  27.  
  28.  1. GENERAL
  29.    1.1) What is GnuPG?
  30.    1.2) Is GnuPG compatible with PGP?
  31.  
  32.  2. SOURCES of INFORMATION
  33.    2.1) Where can I find more information?
  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 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 an user id because it is already deleted on my public
  47.     keyring?
  48.    4.6) What are trust, validity and ownertrust?
  49.    4.7) How do I sign a patch file?
  50.    4.8) Where is the "encrypt-to-self" option?
  51.    4.9) How can I get rid of the Version and Comment headers in armored
  52.     messages?
  53.    4.10) What does the "You are using the xxxx character set." mean?
  54.    4.11) How can a get list of key IDs used to encrypt a message?
  55.    4.12) I can't decrypt my symmetrical only (-c) encrypted message with
  56.     a new version of GnuPG.
  57.    4.13) How can I used GnuPG in an automated environment?
  58.    4.14) Which email-client can I use with GnuPG?
  59.    4.15) Can't we have a gpg library?
  60.    4.16) I have successfully generated a revocation certificate, but I don't
  61.     understand how to send it to the key servers.
  62.  
  63.  5. COMPATIBILITY ISSUES 
  64.    5.1) How can I encrypt a message with GnuPG so that PGP is able to decrypt it?
  65.    5.2) How do I migrate from PGP 2.x to GnuPG?
  66.    5.3) (removed)
  67.    5.4) Why is PGP 5.x not able to encrypt messages with some keys?
  68.    5.5) Why is PGP 5.x not able to verify my messages?
  69.    5.6) How do I transfer owner trust values from PGP to GnuPG?
  70.    5.7) PGP does not like my secret key.
  71.  
  72.  6. PROBLEMS and ERROR MESSAGES
  73.    6.1) Why do I get "gpg: Warning: using insecure memory!"
  74.    6.2) Large File Support doesn't work ..
  75.    6.3) In the edit menu the trust values is not displayed correctly after
  76.     signing uids - why?
  77.    6.4) What does "skipping pubkey 1: already loaded" mean?
  78.    6.5) GnuPG 1.0.4 doesn't create ~/.gnupg ...
  79.    6.6) An ElGamal signature does not verify anymore since version 1.0.2 ...
  80.    6.7) Old versions of GnuPG can't verify ElGamal signatures
  81.    6.8) When I use --clearsign, the plain text has sometimes extra dashes 
  82.     in it - why?
  83.    6.9) What is the thing with "can't handle multiple signatures"?
  84.    6.10) If I submit a key to a keyserver, nothing happens ...
  85.    6.11) I get "gpg: waiting for lock ..."
  86.    6.12) Older gpg's (e.g., 1.0) have problems with keys from newer gpgs ...
  87.    6.13) With 1.0.4, I get "this cipher algorithm is deprecated ..."
  88.    6.14) Some dates are displayed as ????-??-??, why?
  89.    6.15) I still have a problem. How do I report a bug?
  90.    6.16) Why doesn't GnuPG support X509 certificates?
  91.  
  92.  7. ADVANCED TOPICS
  93.    7.1) How does this whole thing work?
  94.    7.2) Why are some signatures with an ELG-E key valid?
  95.    7.3) How does the whole trust thing work?
  96.    7.4) What kind of output is this: "key C26EE891.298, uid 09FB: ...."?
  97.    7.5) How do I interpret some of the informational outputs?
  98.    7.6) Are the header lines of a cleartext signature part of the signed
  99.     material?
  100.    7.7) What is the list of preferred algorithms?
  101.    7.8) How do I change the list of preferred algorithms?
  102.  
  103.  8. ACKNOWLEDGEMENTS
  104.  
  105.  
  106. 1. GENERAL
  107.  
  108. 1.1) What is GnuPG?
  109.  
  110.     GnuPG stands for GNU Privacy Guard and <http://www.gnupg.org>
  111.     is GNU's tool for secure communication and data storage.
  112.     It can be used to encrypt data and to create digital signatures.
  113.     It includes an advanced key management facility and is compliant
  114.     with the proposed OpenPGP Internet standard as described in
  115.     RFC 2440. As <http://www.gnupg.org/rfc2440.html>
  116.     such, it is aimed to be compatible with PGP from NAI Inc.
  117.  
  118. 1.2) Is GnuPG compatible with PGP?
  119.  
  120.     In general, yes. GnuPG and newer PGP releases should be implementing
  121.     the OpenPGP standard. But there are some interoperability
  122.     problems. See questions 5.1ff. for details.
  123.  
  124. 2. SOURCES of INFORMATION
  125.  
  126. 2.1) Where can I find more information?
  127.  
  128.     Here's a list of on-line resources:  
  129.  
  130.      <http://www.gnupg.org/docs.html> is the
  131.     documentation page. Have a look at the HOWTOs and the GNU Privacy
  132.     Handbook (GPH, available in English, Spanish and Russian). The
  133.     latter provides a detailed user's guide to GnuPG. You'll also find a
  134.     document about how to convert from PGP 2.x to GnuPG.
  135.  
  136.      On <http://lists.gnupg.org> 
  137.     you'll find a searchable online archive of the GnuPG mailing
  138.     lists. Most interesting should be gnupg-users for all user-related
  139.     issues and gnupg-devel if you want to get in touch with the
  140.     developers.
  141.  
  142.     *PLEASE:*
  143.     Before posting to a list, read this FAQ and the available
  144.     documentation. In addition, search the list archive - maybe your
  145.     question has already been discussed. This way you help people focus
  146.     on topics that have not yet been resolved.
  147.  
  148.      The GnuPG source distribution contains a subdirectory 
  149.     ./doc where some additional documentation is located
  150.     (mainly interesting for hackers, not the casual user).
  151.  
  152. 2.2) Where do I get GnuPG?
  153.  
  154.     You can download the GNU Privacy Guard from its primary FTP server
  155.     ftp.gnupg.org or from
  156.     one of the mirrors: <http://www.gnupg.org/mirror.html>
  157.     The current version is 1.0.4, please upgrade to this version as it
  158.     fixes a security bug regarding the verification of multiple signatures.
  159.  
  160.  
  161. 3. INSTALLATION 
  162.  
  163. 3.1) Which OSes does GnuPG run on?
  164.  
  165.     It should run on most Unices as well as Windows 95 and Windows NT. A
  166.     list of OSes reported to be OK is presented at 
  167.     http://www.gnupg.org/gnupg.html#supsys .
  168.  
  169. 3.2) Which random gatherer should I use?
  170.  
  171.     "Good" random numbers are crucial for the security of your
  172.     encryption. Different operating systems provide a variety of more or
  173.     less quality random data. Linux and *BSD provide kernel generated
  174.     random data through /dev/random - this should be the preferred
  175.     choice on these systems. Also Solaris users with the SUNWski package
  176.     installed have a /dev/random. In these cases, use the configure
  177.     option --enable-static-rnd=linux. In addition, there's
  178.     also the kernel random device by Andi Maier 
  179.         < http://www.cosy.sbg.ac.at/~andi>
  180.     <http://www.cosy.sbg.ac.at/~andi>, but it's still beta. Use at
  181.     own risk!
  182.  
  183.     On other systems, the Entropy Gathering Daemon (EGD) is a good
  184.     choice. It is a perl-daemon that monitors system activity and hashes
  185.     it into random data. See the download page <http://www.gnupg.org/download.html> 
  186.     how to obtain egd. Use --enable-static-rnd=egd here.
  187.  
  188.     If the above options do not work, you can use the random number
  189.     generator "unix". This is *very* slow and should be
  190.     avoided. The random quality isn't very good so don't use it on
  191.     sensitive data.
  192.  
  193. 3.3) How do I include support for RSA and IDEA?
  194.  
  195.     RSA is included as of GnuPG 1.0.3.
  196.  
  197.     The official GnuPG distribution does not contain IDEA due to a
  198.     patent restriction. The patent does not expire before 2007 so don't
  199.     expect official support before then.
  200.  
  201.     However, there is an unofficial modules to include it even
  202.     in earlier version of GnuPG. It's available from  
  203.         <ftp://ftp.gnupg.org/pub/gcrypt/contrib/>
  204.     <ftp://ftp.gnupg.org/pub/gcrypt/contrib/>. Look for idea.c. 
  205.  
  206.     Compilation directives are in the headers of these files. Then add
  207.     the following line to your ~/.gnupg/options: 
  208.     load-extension idea 
  209.  
  210. 4. USAGE
  211.  
  212. 4.1) What is the recommended key size?
  213.  
  214.     1024 bit for DSA signatures; even for plain ElGamal
  215.     signatures this is sufficient as the size of the hash
  216.     is probably the weakest link if the key size is larger
  217.     than 1024 bits.  Encryption keys may have greater sizes,
  218.     but you should then check the fingerprint of this key:
  219.     "gpg --fingerprint --fingerprint <user ID>".
  220.  
  221.     As for the key algorithms, you should stick with the default (i.e.,
  222.     DSA signature and ElGamal encryption). A ElGamal signing key has the
  223.     following disadvantages: the signature is larger, it is hard to
  224.     create such a key useful for signatures which can withstand some
  225.     real world attacks, you don't get any extra security compared to
  226.     DSA, there might be compatibility problems with certain PGP
  227.     versions. It has only been introduced because at the time it was
  228.     not clear whether there is was patent on DSA.
  229.  
  230.  
  231.  
  232. 4.2) Why does it sometimes take so long to create keys?
  233.  
  234.     The problem here is that we need a lot of random bytes and for that
  235.     we (on Linux the /dev/random device) must collect some random data.
  236.     It is really not easy to fill the Linux internal entropy buffer; I
  237.     talked to Ted Ts'o and he commented that the best way to fill the
  238.     buffer is to play with your keyboard.  Good security has its price.
  239.     What I do is to hit several times on the shift, control, alternate,
  240.     and caps lock keys, because these keys do not produce output to the
  241.     screen. This way you get your keys really fast (it's the same thing
  242.     PGP2 does).
  243.  
  244.     Another problem might be another program which eats up your random
  245.     bytes (a program (look at your daemons) that reads from
  246.     /dev/[u]random).
  247.  
  248. 4.3) And it really takes long when I work on a remote system. Why?
  249.  
  250.     Don't do this at all! You should never create keys or even use GnuPG
  251.     on a remote system because you normally have no physical control
  252.     over your secret key ring (which is in most cases vulnerable to
  253.     advanced dictionary attacks) - I strongly encourage everyone to only
  254.     create keys on a local computer (a disconnected laptop is probably
  255.     the best choice) and if you need it on your connected box (I know:
  256.     We all do this) be sure to have a strong password for your account
  257.     and for your secret key and that you can trust your system
  258.     administrator.
  259.  
  260.     When I check GnuPG on a remote system via ssh (I have no Alpha here
  261.     ;-) I have the same problem.  It takes a *very* long time to create
  262.     the keys, so I use a special option, --quick-random, to generate
  263.     insecure keys which are only good for some tests.
  264.  
  265. 4.4) What is the difference between options and commands?
  266.  
  267.     If you do a 'gpg --help', you will get two separate lists. The first
  268.     is a list of commands. The second is a list of options. Whenever you
  269.     run GPG, you *must* pick exactly one command (with one
  270.     exception, see below). You *may* pick one or more options.
  271.     The command should, just by convention, come at the end of the
  272.     argument list, after all the options. If the command takes a file
  273.     (all the basic ones do), the filename comes at the very end. So the
  274.     basic way to run gpg is: 
  275.  
  276.     gpg [--option something] [--option2] [--option3 something] --command file 
  277.  
  278.     Some options take arguments, for example the --output option (which
  279.     can be abbreviated -o) is an option that takes a filename. The
  280.     option's argument must follow immediately after the option itself,
  281.     otherwise gpg doesn't know which option the argument is supposed to
  282.     go with. As an option, --output and its filename must come before
  283.     the command. The --recipient (-r) option takes a name or keyid to
  284.     encrypt the message to, which must come right after the -r argument.
  285.     The --encrypt (or -e) command comes after all the options followed
  286.     by the file you wish to encrypt. So use 
  287.  
  288.     gpg -r alice -o secret.txt -e test.txt 
  289.  
  290.     If you write the options out in full, it is easier to read 
  291.  
  292.     gpg --recipient alice --output secret.txt --encrypt test.txt 
  293.  
  294.     If you're saving it in a file called ".txt" then you'd probably
  295.     expect to see ASCII-armored text in there, so you need to add the
  296.     --armor (-a) option, which doesn't take any arguments.  
  297.  
  298.     gpg --armor --recipient alice --output secret.txt --encrypt test.txt
  299.  
  300.     If you imagine square brackets around the optional parts, it becomes
  301.     a bit clearer: 
  302.  
  303.     gpg [--armor] [--recipient alice] [--output secret.txt] --encrypt test.txt 
  304.  
  305.     The optional parts can be rearranged any way you want.  
  306.  
  307.     gpg --output secret.txt --recipient alice --armor --encrypt test.txt
  308.  
  309.     If your filename begins with a hyphen (e.g. "-a.txt"), gnupg assumes
  310.     this is an option and may complain.  To avoid this you have either
  311.     to use "./-a.txt" or stop the option and command processing with two
  312.     hyphens: "-- -a.txt".
  313.  
  314.     *The exception:* signing and encrypting at the same time. Use
  315.      gpg [--options] --sign --encrypt foo.txt 
  316.  
  317.  
  318. 4.5) I can't delete an user id because it is already deleted on my public
  319. keyring?
  320.  
  321.     Because you can only select from the public key ring, there is no
  322.     direct way to do this.  However it is not very complicated to do it
  323.     anyway.  Create a new user id with exactly the same name and you
  324.     will see that there are now two identical user ids on the secret
  325.     ring.  Now select this user id and delete it.  Both user ids will be
  326.     removed from the secret ring.
  327.  
  328. 4.6) What are trust, validity and ownertrust?
  329.  
  330.     "ownertrust" is used instead of "trust" to make clear that this is
  331.     the value you have assigned to a key to express how much you trust
  332.     the owner of this key to correctly sign (and so introduce) other
  333.     keys.  "validity", or calculated trust, is a value which says how
  334.     much GnuPG thinks a key is valid (that it really belongs to the one
  335.     who claims to be the owner of the key).  For more see the chapter
  336.     "The Web of Trust" in the Manual.
  337.  
  338. 4.7) How do I sign a patch file?
  339.  
  340.     Use "gpg --clearsign --not-dash-escaped ...".  The problem with
  341.     --clearsign is that all lines starting with a dash are quoted with
  342.     "- "; obviously diff produces many of lines starting with a dash and
  343.     these are then quoted and that is not good for patch ;-).  To use a
  344.     patch file without removing the cleartext signature, the special
  345.     option --not-dash-escaped may be used to suppress generation of
  346.     these escape sequences.  You should not mail such a patch because
  347.     spaces and line endings are also subject to the signature and a
  348.     mailer may not preserve these.  If you want to mail a file you can
  349.     simply sign it using your MUA.
  350.  
  351. 4.8) Where is the "encrypt-to-self" option?
  352.  
  353.     Use "--encrypt-to your_keyid".  You can use more than one of these
  354.     options. To temporary override the use of this additional keys, you
  355.     can use the option "--no-encrypt-to".
  356.  
  357. 4.9) How can I get rid of the Version and Comment headers in armored
  358. messages?
  359.  
  360.     Use "--no-version --comment ''".  Note that the left over blank line
  361.     is required by the protocol.
  362.  
  363. 4.10) What does the "You are using the xxxx character set." mean?
  364.  
  365.     This note is printed when UTF8 mapping has to be done.  Make sure
  366.     that the displayed charset is the one you have activated on your
  367.     system "iso-8859-1" is the most used one, so this is the default.
  368.     You can change the charset with the option "--charset".  It is
  369.     important that you active character set matches the one displayed -
  370.     if not, restrict yourself to plain 7 bit ASCII and no mapping has to
  371.     be done.
  372.  
  373. 4.11) How can a get list of key IDs used to encrypt a message?
  374.  
  375.      gpg --batch --decrypt --list-only --status-fd 1 2>/dev/null | \
  376.     awk '/^\[GNUPG:\] ENC_TO / { print $3 }' 
  377.  
  378. 4.12) I can't decrypt my symmetrical only (-c) encrypted message with
  379.     a new version of GnuPG.
  380.  
  381.     There used to be a bug in GnuPG < 1.0.1 which happens only if 3DES
  382.     or Twofish has been used for symmetric only encryption (this has
  383.     never been the default).  The bug has been fixed but to enable you
  384.     to decrypt old messages, you should run gpg with the option
  385.     "--emulate-3des-s2k-bug", decrypt the message and encrypt it again
  386.     without this option.  The option will be removed in 1.1, so better
  387.     re-encrypt your message now.
  388.  
  389. 4.13) How can I used GnuPG in an automated environment?
  390.  
  391.     You should use the option --batch and don't use pass phrases as
  392.     there is usually no way to store it more secure than the secret
  393.     keyring itself. The suggested way to create the keys for the
  394.     automated environment is:
  395.  
  396.      On a secure machine:
  397.       If you want to do automatic signing, create a signing
  398.     subkey for your key (edit menu, choose "addkey" and the DSA).  [H
  399.     LI] Make sure that you use a passphrase (Needed by the current
  400.     implementation)  gpg --export-secret-subkeys --no-comment foo
  401.     >secring.auto  Copy secring.auto and the public keyring to a
  402.     test directory.   Cd to this directory.   gpg --homedir
  403.     . --edit foo and use "passwd" to remove the pass-phrase from the
  404.     subkeys.  You may also want to remove all unused subkeys.  
  405.     copy secring.auto to a floppy and carry it to the target box 
  406.     On the target machine:   Install secring.auto as secret
  407.     keyring.   Now you can start your new service.  It is a good
  408.     idea to install some intrusion detection system so that you
  409.     hopefully get a notice of an successful intrusion, so that you in
  410.     turn can revoke all the subkeys installed on that machine and
  411.     install new subkeys.  
  412.  
  413. 4.14) Which email-client can I use with GnuPG?
  414.  
  415.     Using GnuPG to encrypt email is one of the most popular
  416.     uses. Several mail clients or mail user-agents (MUA) support GnuPG
  417.     at varying degrees. Simplifying a bit, there are two ways a mail can
  418.     be encrypted with GnuPG: the "old style" ASCII armor, i.e. plain
  419.     text encryption, and RFC2015 style (previously PGP/MIME, now
  420.     OpenPGP). The latter has full MIME support. Some MUAs support only
  421.     one of them, so whichever you actually use depends on your needs as
  422.     well as the capabilities of your addressee.
  423.  
  424.     The following list is probably not exhaustive:
  425.  
  426.     OpenPGP: Mutt (Unix), Emacs/Mew, Becky2 (Windows, with plugin),
  427.              TkRat (Unix). There is effort for a Mozilla plugin and
  428.          Emacs/GNUS has support in the current CVS.
  429.  
  430.     ASCII:   Emacs/{VM,GNUS}/MailCrypt, Mutt(Unix), Pine(Unix), and
  431.              probably many more.
  432.  
  433.     A good overview of PGP-support is present at 
  434.     http://cryptorights.org/pgp-users/pgp-mail-clients.html. 
  435.     Direct GnuPG support is not mentioned, however, it certain cases it
  436.     may be possible to use a wrapper. 
  437.  
  438.  
  439. 4.15) Can't we have a gpg library?
  440.  
  441.     This has been frequently requested. However, the current viewpoint
  442.     of the GnuPG maintainers is that this would lead to several security
  443.     issues and will therefore not be implemented in the foreseeable
  444.     future. However, for some areas of areas of application gpgme could
  445.     do the trick. You'll find it at 
  446.     ftp://ftp.guug.de/pub/gcrypt/alpha/gpgme
  447.  
  448.  
  449. 4.16) I have successfully generated a revocation certificate, but I don't
  450.     understand how to send it to the key servers.
  451.  
  452.     Most keyservers don't accept a 'bare' revocation certificate. You
  453.     have to import the certificate into gpg first:
  454.     gpg --import my-revocation.asc
  455.     then send the revoked key to the keyservers:
  456.     gpg --keyserver certserver.pgp.com --send-keys mykeyid
  457.     (or use a keyserver web interface for this).
  458.  
  459. 5. COMPATIBILITY ISSUES 
  460.  
  461.  
  462. 5.1) How can I encrypt a message with GnuPG so that PGP is able to decrypt it?
  463.  
  464.     It depends on the PGP version.
  465.  
  466.      PGP 2.x 
  467.  
  468.     You can't do that because PGP 2.x normally uses IDEA which is not
  469.     supported by GnuPG as it is patented (see 3.3), but if you
  470.     have a modified version of PGP you can try this:
  471.  
  472.      gpg --rfc1991 --cipher-algo 3des ...  
  473.  
  474.     Please don't pipe the data to encrypt to gpg but provide it using a
  475.     filename; otherwise, PGP 2 will not be able to handle it.
  476.  
  477.     As for conventional encryption, you can't do this for PGP 2.  
  478.  
  479.  
  480.      PGP 5.x and higher
  481.  
  482.     You need to provide two additional options: 
  483.     --compress-algo 1 --cipher-algo cast5  
  484.  
  485.     You may also use "3des" instead of "cast5", "blowfish" does not
  486.     work with all versions of pgp5.  You may also want to put 
  487.     compress-algo 1  into your ~/.gnupg/options file - this does
  488.     not affect normal gnupg operation.
  489.  
  490.     This applies to conventional encryption as well.
  491.  
  492. 5.2) How do I migrate from PGP 2.x to GnuPG?
  493.  
  494.     PGP 2 uses the RSA and IDEA encryption algorithms. Whereas the RSA
  495.     patent has expired and RSA is included as of GnuPG 1.0.3, the IDEA
  496.     algorithm is still patented until 2007. Under certain conditions you
  497.     may use IDEA even today. In that case, you may refer to Question
  498.     3.3 about how to add IDEA support to GnuPG and read
  499.     http://www.gnupg.org/gph/en/pgp2x.html
  500.     to perform the migration. 
  501.  
  502.  
  503. 5.3) (removed)
  504.  
  505.     (empty)
  506.  
  507. 5.4) Why is PGP 5.x not able to encrypt messages with some keys?
  508.  
  509.     PGP Inc refuses to accept ElGamal keys of type 20 even for
  510.     encryption.  They only support type 16 (which is identical at least
  511.     for decryption).  To be more inter-operable, GnuPG (starting with
  512.     version 0.3.3) now also uses type 16 for the ElGamal subkey which is
  513.     created if the default key algorithm is chosen.  You may add an type
  514.     16 ElGamal key to your public key which is easy as your key
  515.     signatures are still valid.
  516.  
  517. 5.5) Why is PGP 5.x not able to verify my messages?
  518.  
  519.     PGP 5.x does not accept V4 signatures for data material but OpenPGP
  520.     requests generation of V4 signatures for all kind of data, that's why 
  521.     GnuPG defaults to them.  Use the option "--force-v3-sigs" to generate 
  522.     V3 signatures for data.
  523.  
  524. 5.6) How do I transfer owner trust values from PGP to GnuPG?
  525.  
  526.     There is a script in the tools directory to help you: After you have
  527.     imported the PGP keyring you can give this command: 
  528.  
  529.     $ lspgpot pgpkeyring | gpg --import-ownertrust 
  530.  
  531.     where pgpkeyring is the original keyring and not the GnuPG one you
  532.     might have created in the first step.
  533.  
  534. 5.7) PGP does not like my secret key.
  535.  
  536.     Older PGPs probably bail out on some private comment packets used by
  537.     GnuPG.  These packets are fully in compliance with OpenPGP; however
  538.     PGP is not really OpenPGP aware.  A workaround is to export the
  539.     secret keys with this command: 
  540.      $ gpg --export-secret-keys --no-comment -a your-key-id 
  541.  
  542.     Another possibility is this: by default, GnuPG encrypts your secret
  543.     key using the Blowfish symmetric algorithm. Older PGPs will only
  544.     understand 3DES, CAST5, or IDEA symmetric algorithms. Using the
  545.     following method you can re-encrypt your secret gpg key with a
  546.     different algo:
  547.  
  548.      $ gpg --s2k-cipher-algo=CAST5 --s2k-digest-algo=SHA1 \
  549.           --compress-algo=1  --edit-key <username>
  550.  
  551.     Then use passwd to change the password (just change it to the same
  552.     thing, but it will encrypt the key with CAST5 this time).
  553.  
  554.     Now you can export it and PGP should be able to handle it.
  555.  
  556.     For PGP 6.x the following options work to export a key:
  557.      $ gpg --s2k-cipher-algo 3des --compress-algo 1 --rfc1991 \
  558.            --export-secret-keys <Key-ID>
  559.  
  560. 6. PROBLEMS and ERROR MESSAGES
  561.  
  562. 6.1) Why do I get "gpg: Warning: using insecure memory!"
  563.  
  564.     On many systems this program should be installed as
  565.     setuid(root). This is necessary to lock memory pages.  Locking
  566.     memory pages prevents the operating system from writing them
  567.     to disk and thereby keeping your secret keys really secret. If you
  568.     get no warning message about insecure memory your operating system
  569.     supports locking without being root. The program drops root
  570.     privileges as soon as locked memory is allocated.
  571.  
  572.     On UnixWare 2.x and 7.x you should install GnuPG with the
  573.     'plock' privilege to get the same effect:
  574.     filepriv -f plock /path/to/gpg
  575.  
  576.     If you can't or don't want to install GnuPG setuid(root), you can
  577.     use the option "--no-secmem-warning" or put 
  578.     no-secmem-warning  in your ~/.gnupg/options file (this
  579.     disables the warning).
  580.  
  581.     On some systems (e.g., Windows) GnuPG does not lock memory pages
  582.     and older GnuPG versions (<=1.0.4) issue the warning
  583.     gpg: Please note that you don't have secure memory
  584.     This warning can't be switched off by the above option because it
  585.     was thought to be a too serious issue. However, it confused users
  586.     too much so the warning was eventually removed.
  587.  
  588. 6.2) Large File Support doesn't work ..
  589.  
  590.     LFS is correctly working in post-1.0.4 CVS. If configure doesn't
  591.     detect it correctly, try a different (i.e., better) compiler. egcs
  592.     1.1.2 works fine, other gccs sometimes don't. BTW, several
  593.     compilation problems of GnuPG 1.0.3 and 1.0.4 on HP-UX and Solaris
  594.     were due to broken LFS support.
  595.  
  596. 6.3) In the edit menu the trust values is not displayed correctly after
  597. signing uids - why?
  598.  
  599.     This happens because the some informations are stored immediately in
  600.     the trustdb, but the actual trust calculation can be done after the
  601.     save command.  This is a not easy to fix design bug which will be
  602.     addressed in some future release.
  603.  
  604. 6.4) What does "skipping pubkey 1: already loaded" mean?
  605.  
  606.     As of GnuPG 1.0.3, the RSA algorithm is included. If you still have
  607.     a "load-extension rsa" in your .options files, the above message
  608.     occurs. Just remove the load command from the .options file.
  609.  
  610. 6.5) GnuPG 1.0.4 doesn't create ~/.gnupg ...
  611.  
  612.     That's a known bug, already fixed in the CVS (and will be in the
  613.     next release, of course).
  614.  
  615. 6.6) An ElGamal signature does not verify anymore since version 1.0.2 ...
  616.  
  617.     Use the option --emulate-md-encode-bug.
  618.  
  619. 6.7) Old versions of GnuPG can't verify ElGamal signatures
  620.  
  621.     Update to GnuPG 1.0.2 or newer.
  622.  
  623.  
  624. 6.8) When I use --clearsign, the plain text has sometimes extra dashes 
  625. in it - why?
  626.  
  627.     This is called dash-escaped text and required by OpenPGP.
  628.     It always happens when a line starts with a dash ("-") and is needed
  629.     to make the lines that structure signature and text
  630.     (i.e., "-----BEGIN PGP SIGNATURE-----") to be the only lines that
  631.     start with two dashes.
  632.  
  633.     If you use GnuPG to process those messages, the extra dashes are removed.
  634.     Good mail clients remove those extra dashes when displaying such a 
  635.     message.      
  636.  
  637. 6.9) What is the thing with "can't handle multiple signatures"?
  638.  
  639.     Due to different message formats GnuPG is not always able to split a
  640.     file with multiple signatures unambiguously into its parts.  This
  641.     error message informs you that there is something wrong with the input.
  642.  
  643.     The only way to have multiple signatures in a file is by using the 
  644.     OpenPGP format with one-pass-signature packets (which is GnuPG's
  645.     default) or the cleartext signed format.
  646.  
  647. 6.10) If I submit a key to a keyserver, nothing happens ...
  648.  
  649.     You are most likely using GnuPG on Windows 1.0.2 or older. That's
  650.     feature isn't yet implemented, but it's a bug not to say it. Newer
  651.     versions issue a warning. Upgrade to 1.0.4 or newer.
  652.  
  653. 6.11) I get "gpg: waiting for lock ..."
  654.  
  655.     A previous gpg has most likely exited abnormally and left a lock
  656.     file. Go to ~/.gnupg and look for .*.lock files and remove them.
  657.  
  658. 6.12) Older gpg's (e.g., 1.0) have problems with keys from newer gpgs ...
  659.  
  660.     As of 1.0.3, keys generated with gpg are created with preferences to
  661.     TWOFISH (and AES since 1.0.4) and that also means that they have the
  662.     capability to use the new MDC encryption method.  This will go into
  663.     OpenPGP soon and is also suppoted by PGP 7.  This new method avoids
  664.     a (not so new) attack on all email encryption systems.
  665.  
  666.     This in turn means that pre-1.0.3 gpg's have problems with newer
  667.     key. Because of security fixes, you should keep your gpg
  668.     installation in a recent state anyway. As a workaround, you can
  669.     force gpg to use a previous default cipher algo by putting 
  670.     cipher-algo cast5 into your options file.
  671.  
  672. 6.13) With 1.0.4, I get "this cipher algorithm is deprecated ..."
  673.  
  674.     If you just generated a new key and get this message while
  675.     encrypting, you've witnessed a bug in 1.0.4. It uses the new AES
  676.     cipher Rijndael that is incorrectly being referred as
  677.     "deprecated". Ignore this warning, more recent versions of gpg are
  678.     corrected.
  679.  
  680. 6.14) Some dates are displayed as ????-??-??, why?
  681.  
  682.     Due to constraints in most libc implementations, dates beyond
  683.     2038-01-19 can't be displayed correctly. 64 bit OSes are not
  684.     affected by this problem.  To avoid printing wrong dates, GnuPG
  685.     instead prints some question marks.  To see the correct value, you
  686.     can use the options --with-colons and --fixed-list-mode.
  687.  
  688. 6.15) I still have a problem. How do I report a bug?
  689.  
  690.     Are you sure that it's not been mentioned somewhere on the mailing
  691.     lists? Did you have a look at the bug list (You'll find a link to
  692.     the list of reported bugs on the documentation page). If you're not
  693.     sure about it being a bug, you can send mail to the gnupg-devel
  694.     list. Otherwise, use the GUUG bug tracking system 
  695.     http://bugs.guug.de/Reporting.html.   
  696.  
  697. 6.16) Why doesn't GnuPG support X509 certificates?
  698.  
  699.     GnuPG, first and foremost, is an implementation of the OpenPGP
  700.     standard (RFC 2440), which is a competing infrastructure, different
  701.     from X509.
  702.  
  703.     They are both public-key cryptosystems, but how the public keys are
  704.     actually handled is different.
  705.  
  706. 7. ADVANCED TOPICS
  707.  
  708. 7.1) How does this whole thing work?
  709.  
  710.     To generate a secret/public keypair, run  gpg --gen-key
  711.      and choose the default values.
  712.  
  713.     Data that is encrypted with a public key can only be decrypted by
  714.     the matching secret key.  The secret key is protected by a password,
  715.     the public key is not.
  716.  
  717.     So to send your friend a message, you would encrypt your message
  718.     with his public key, and he would only be able to decrypt it by
  719.     having the secret key and putting in the password to use his secret
  720.     key.
  721.  
  722.     GnuPG is also useful for signing things.  Things that are encrypted
  723.     with the secret key can be decrypted with the public key. To sign
  724.     something, a hash is taken of the data, and then the hash is in some
  725.     form encoded with the secret key. If someone has your public key, they
  726.     can verify that it is from you and that it hasn't changed by checking
  727.     the encoded form of the hash with the public key.
  728.  
  729.     A keyring is just a large file that stores keys. You have a public
  730.     keyring where you store yours and your friend's public keys.  You have
  731.     a secret keyring that you keep your secret key on, and be very careful
  732.     with this secret keyring: Never ever give anyone else access to it and
  733.     use a *good* passphrase to protect the data in it.
  734.  
  735.     You can 'conventionally' encrypt something by using the option 'gpg
  736.     -c'.  It is encrypted using a passphrase, and does not use public and
  737.     secret keys.  If the person you send the data to knows that
  738.     passphrase, they can decrypt it. This is usually most useful for
  739.     encrypting things to yourself, although you can encrypt things to your
  740.     own public key in the same way.  It should be used for communication
  741.     with partners you know and where it is easy to exchange the
  742.     passphrases (e.g. with your boy friend or your wife).  The advantage
  743.     is that you can change the passphrase from time to time and decrease
  744.     the risk, that many old messages may be decrypted by people who
  745.     accidently got your passphrase.
  746.  
  747.     You can add and copy keys to and from your keyring with the 'gpg
  748.     --import' and 'gpg --export' option. 'gpg --export-secret-keys' will
  749.     export secret keys. This is normally not useful, but you can generate
  750.     the key on one machine then move it to another machine.
  751.  
  752.     Keys can be signed under the 'gpg --edit-key' option.  When you sign a
  753.     key, you are saying that you are certain that the key belongs to the
  754.     person it says it comes from.  You should be very sure that is really
  755.     that person: You should verify the key fingerprint
  756.         gpg --fingerprint user-id
  757.     over phone (if you really know the voice of the other person) or at a
  758.     key signing party (which are often held at computer conferences) or at
  759.     a meeting of your local GNU/Linux User Group.
  760.  
  761.     Hmm, what else.  You may use the option "-o filename" to force output
  762.     to this filename (use "-" to force output to stdout). "-r" just lets
  763.     you specify the recipient (which public key you encrypt with) on the
  764.     command line instead of typing it interactively.
  765.  
  766.     Oh yeah, this is important. By default all data is encrypted in some
  767.     weird binary format.  If you want to have things appear in ASCII text
  768.     that is readable, just add the '-a' option.  But the preferred method
  769.     is to use a MIME aware mail reader (Mutt, Pine and many more).
  770.  
  771.     There is a small security glitch in the OpenPGP (and therefore GnuPG)
  772.     system; to avoid this you should always sign and encrypt a message
  773.     instead of only encrypting it.
  774.  
  775.  
  776. 7.2) Why are some signatures with an ELG-E key valid?
  777.  
  778.     These are ElGamal Key generated by GnuPG in v3 (rfc1991) packets.
  779.     The OpenPGP draft later changed the algorithm identifier for ElGamal
  780.     keys which are usable for signatures and encryption from 16 to 20.
  781.     GnuPG now uses 20 when it generates new ElGamal keys but still
  782.     accept 16 (which is according to OpenPGP "encryption only") if this
  783.     key is in a v3 packet.  GnuPG is the only program which had used
  784.     these v3 ElGamal keys - so this assumption is quite safe.
  785.  
  786.  
  787. 7.3) How does the whole trust thing work?
  788.  
  789.     It works more or less like PGP.  The difference is that the trust is
  790.     computed at the time it is needed. This is one of the reasons for
  791.     the trustdb which holds a list of valid key signatures.  If you are
  792.     not running in batch mode you will be asked to assign a trust
  793.     parameter (ownertrust) to a key.
  794.  
  795.  
  796.  
  797.     You can see the validity (calculated trust value) using this
  798.     command.
  799.      gpg --list-keys --with-colons  
  800.  
  801.     If the first field is "pub" or "uid", the second field shows you the
  802.     trust: 
  803.  
  804.      o = Unknown (this key is new to the system) 
  805.      e = The key has expired 
  806.      q = Undefined (no value assigned) 
  807.      n = Don't trust    this key at all
  808.      m = There is marginal trust in this key 
  809.      f = The key    is full trusted 
  810.      u = The key is ultimately trusted; this is only used
  811.          for keys for which the secret key is also available.  
  812.      r = The key    has been revoked 
  813.      d = The key has been disabled 
  814.  
  815.     The value in the "pub" record is the best one of all "uid" records.
  816.  
  817.     You can get a list of the assigned trust values (how much you trust
  818.     the owner to correctly sign another person's key)
  819.  
  820.      gpg --list-ownertrust  The first field is the
  821.     fingerprint of the primary key, the second field is the assigned
  822.     value: 
  823.  
  824.      - = No Ownertrust value yet assigned.  
  825.      n = Never trust this keyholder to correctly verify others signatures.  
  826.      m = Have marginal trust in the keyholders capability to sign other
  827.          keys.  
  828.      f = Assume that the key holder really knows how to sign keys.  
  829.      u = No need to trust ourself because we have the secret key.  
  830.  
  831.     Keep these values confidential because they express your opinions
  832.     about others.  PGP stores this information with the keyring thus it
  833.     is not a good idea to publish a PGP keyring instead of exporting the
  834.     keyring.  gnupg stores the trust in the trust-DB so it is okay to
  835.     give a gpg keyring away (but we have a --export command too).
  836.  
  837. 7.4) What kind of output is this: "key C26EE891.298, uid 09FB: ...."?
  838.  
  839.     This is the internal representation of an user id in the trustdb.
  840.     "C26EE891" is the keyid, "298" is the local id (a record number in
  841.     the trustdb) and "09FB" is the last two bytes of a ripe-md-160 hash
  842.     of the user id for this key.
  843.  
  844. 7.5) How do I interpret some of the informational outputs?
  845.  
  846.     While checking the validity of a key, GnuPG sometimes prints some
  847.     information which is prefixed with information about the checked
  848.     item.   "key 12345678.3456"  This is about the key
  849.     with key ID 12345678 and the internal number 3456, which is the
  850.     record number of the so called directory record in the trustdb.  
  851.      "uid 12345678.3456/ACDE"  This is about the user ID for
  852.     the same key.  To identify the user ID the last two bytes of a
  853.     ripe-md-160 over the user ID ring is printed.   "sig
  854.     12345678.3456/ACDE/9A8B7C6D"  This is about the signature
  855.     with key ID 9A8B7C6D for the above key and user ID, if it is a
  856.     signature which is direct on a key, the user ID part is empty
  857.     (..//..).
  858.  
  859. 7.6) Are the header lines of a cleartext signature part of the signed
  860. material?
  861.  
  862.     No.  For example you can add or remove "Comment:" lines.  They have
  863.     a purpose like the mail header lines.  However a "Hash:" line is
  864.     needed for OpenPGP signatures to tell the parser which hash
  865.     algorithm to use.
  866.  
  867.  
  868. 7.7) What is the list of preferred algorithms?
  869.  
  870.     The list of preferred algorithms is a list of cypher, hash and
  871.     compression algorithms stored in the self-signature of a key during
  872.     key generation. When you encrypt a document, GnuPG uses this list
  873.     (which is then part of a public key) to determine which algorithms
  874.     to use. Basically it tells other people what algorithms the
  875.     recipient is able to handle and provides an order of preference.
  876.  
  877. 7.8) How do I change the list of preferred algorithms?
  878.  
  879.     Currently the default is hard-wired into the GnuPG source code.
  880.     You'll have to change g10/keygen.c and recompile. The
  881.     function you'll have to change is keygen_add_std_prefs.  
  882.     The code is pretty self-explanatory. The constants used to
  883.     denote the algorithms are defined in include/cipher.h.
  884.  
  885.     After having done that, generate a new key pair (or a new encryption
  886.     subkey) with the modified executable. This new key will have the
  887.     modified preferences and can then be used with unmodified executables.
  888.  
  889.     To modify the preferences of an existing key, use a modified
  890.     executable (see above) to change the expiry date and then save the
  891.     key. The use your original expiry date and save the key again. Now
  892.     you've got the prefs changed and can use the key again with your
  893.     unmodified executable.
  894.  
  895.     Changing the list of preferences with an unmodified GnuPG
  896.     executable (possibly in the edit-key menu) is on the TODO list and
  897.     planned for future releases.
  898.  
  899.  
  900. 8. ACKNOWLEDGEMENTS
  901.  
  902.     Many thanks to Werner Koch for the original FAQ file and to all
  903.     posters to gnupg-users and gnupg-devel. They all provided most of
  904.     the answers.
  905.  
  906.     Also thanks to Casper Dik for providing me with a script to generate
  907.     this FAQ (he uses it for the excellent Solaris2 FAQ).
  908.  
  909.  
  910. Copyright (C) 2000 Free Software Foundation, Inc. , 
  911. 59 Temple Place - Suite 330, Boston, MA 02111, USA 
  912.  
  913. Verbatim copying and distribution of this entire article is permitted in
  914. any medium, provided this notice is preserved.
  915.