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

  1.  
  2.             GnuPG - The GNU Privacy Guard
  3.            -------------------------------
  4.                 Version 1.0
  5.  
  6.     Copyright 1998, 1999, 2000, 2001 Free Software Foundation, Inc.
  7.  
  8.     This file is free software; as a special exception the author gives
  9.     unlimited permission to copy and/or distribute it, with or without
  10.     modifications, as long as this notice is preserved.
  11.  
  12.     This file is distributed in the hope that it will be useful, but
  13.     WITHOUT ANY WARRANTY, to the extent permitted by law; without even the
  14.     implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
  15.  
  16.     Intro
  17.     -----
  18.  
  19.     GnuPG is GNU's tool for secure communication and data storage.
  20.     It can be used to encrypt data and to create digital signatures.
  21.     It includes an advanced key management facility and is compliant
  22.     with the proposed OpenPGP Internet standard as described in RFC2440.
  23.  
  24.     GnuPG works best on GNU/Linux or *BSD systems.  Most other Unices
  25.     are also supported but are not as well tested as the Free Unices.
  26.     See http://www.gnupg.org/gnupg.html#supsys for a list of systems
  27.     which are known to work.
  28.  
  29.     See the file COPYING for copyright and warranty information.
  30.  
  31.     Because GnuPG does not use use any patented algorithm it cannot be
  32.     compatible with PGP2 versions.  PGP 2.x uses IDEA (which is patented
  33.     worldwide).
  34.  
  35.     The default algorithms are DSA and ElGamal.  ElGamal for signing
  36.     is still available, but because of the larger size of such
  37.     signatures it is deprecated (Please note that the GnuPG
  38.     implementation of ElGamal signatures is *not* insecure).  Symmetric
  39.     algorithms are: AES, 3DES, Blowfish, CAST5 and Twofish 
  40.     Digest algorithms available are MD5, RIPEMD160 and SHA1.
  41.  
  42.  
  43.     Installation
  44.     ------------
  45.  
  46.     Please read the file INSTALL!
  47.  
  48.     Here is a quick summary:
  49.  
  50.     1) Check that you have unmodified sources.    The below on how to do this.
  51.        Don't skip it - this is an important step!
  52.  
  53.     2)    Unpack the TAR.  With GNU tar you can do it this way:
  54.     "tar xzvf gnupg-x.y.z.tar.gz"
  55.  
  56.     3) "cd gnupg-x.y.z"
  57.  
  58.     4)    "./configure"
  59.  
  60.     5) "make"
  61.  
  62.     6) "make install"
  63.  
  64.     7) You end up with a "gpg" binary in /usr/local/bin.
  65.        Note: Because some old programs rely on the existence of a
  66.        binary named "gpgm" (which was build by some Beta versions
  67.        of GnuPG); you may want to install a symbolic link to it:
  68.        "cd /usr/local/bin; ln -s gpg gpgm"
  69.  
  70.     8) To avoid swapping out of sensitive data, you can install "gpg" as
  71.        suid root.  If you don't do so, you may want to add the option
  72.        "no-secmem-warning" to ~/.gnupg/options
  73.  
  74.  
  75.     How to Verify the Source
  76.     ------------------------
  77.  
  78.     In order to check that the version of GnuPG which you are going to
  79.     install is an original and unmodified one, you can do it in one of
  80.     the following ways:
  81.  
  82.     a) If you already have a trusted Version of GnuPG installed, you
  83.        can simply check the supplied signature:
  84.  
  85.     $ gpg --verify gnupg-x.y.z.tar.gz.asc
  86.  
  87.        This checks that the detached signature gnupg-x.y.z.tar.gz.asc
  88.        is indeed a a signature of gnupg-x.y.z.tar.gz.  The key used to
  89.        create this signature is:
  90.  
  91.        "pub  1024D/57548DCD 1998-07-07 Werner Koch (gnupg sig) <dd9jn@gnu.org>"
  92.  
  93.        If you do not have this key, you can get it from the source in
  94.        the file g10/pubring.asc (use "gpg --import g10/pubring.gpg" to
  95.        add it to the keyring) or from any keyserver.  You have to make
  96.        sure that this is really the key and not a faked one. You can do
  97.        this by comparing the output of:
  98.  
  99.         $ gpg --fingerprint 0x57548DCD
  100.  
  101.        with the elsewhere published fingerprint
  102.  
  103.        Please note, that you have to use an old version of GnuPG to
  104.        do all this stuff.  *Never* use the version which you are going
  105.        to check!
  106.  
  107.  
  108.     b) If you don't have any of the above programs, you have to verify
  109.        the MD5 checksum:
  110.  
  111.     $ md5sum gnupg-x.y.z.tar.gz
  112.  
  113.        This should yield an output _similar_ to this:
  114.  
  115.     fd9351b26b3189c1d577f0970f9dcadc  gnupg-x.y.z.tar.gz
  116.  
  117.        Now check that this checksum is _exactly_ the same as the one
  118.        published via the announcement list and probably via Usenet.
  119.  
  120.  
  121.  
  122.     Documentation
  123.     -------------
  124.  
  125.     The manual will be distributed separate under the name "gph".
  126.     An online version of the latest manual draft is available at the
  127.     GnuPG web pages:
  128.  
  129.     http://www.gnupg.org/gph/
  130.  
  131.     A list of frequently asked questions is available in GnuPG's
  132.     distibution in the file doc/FAQ and online as:
  133.  
  134.     http://www.gnupg.org/faq.html
  135.  
  136.     A couple of HOWTO documents are available online; for a listing see:
  137.  
  138.     http://www.gnupg.org/docs.html#howtos
  139.  
  140.     A man page with a description of all commands and options gets installed
  141.     along with the program. 
  142.  
  143.  
  144.     Introduction
  145.     ------------
  146.  
  147.     Here is a brief overview on how to use GnuPG - it is strongly suggested
  148.     that you read the manual and other information about the use of
  149.     cryptography.  GnuPG is only a tool, secure usage requires that
  150.     YOU KNOW WHAT YOU ARE DOING.
  151.  
  152.     If you already have a DSA key from PGP 5 (they call them DH/ElGamal)
  153.     you can simply copy the pgp keyrings over the GnuPG keyrings after
  154.     running gpg once to create the correct directory.
  155.  
  156.     The normal way to create a key is
  157.  
  158.     gpg --gen-key
  159.  
  160.     This asks some questions and then starts key generation. To create
  161.     good random numbers for the key parameters, GnuPG needs to gather
  162.     enough noise (entropy) from your system.  If you see no progress
  163.     during key generation you should start some other activities such
  164.     as mouse moves or hitting on the CTRL and SHIFT keys.
  165.  
  166.     Generate a key ONLY on a machine where you have direct physical
  167.     access - don't do it over the network or on a machine used also
  168.     by others - especially if you have no access to the root account.
  169.  
  170.     When you are asked for a passphrase use a good one which you can
  171.     easy remember.  Don't make the passphrase too long because you have
  172.     to type it for every decryption or signing; but, - AND THIS IS VERY
  173.     IMPORTANT - use a good one that is not easily to guess because the
  174.     security of the whole system relies on your secret key and the
  175.     passphrase that protects it when someone gains access to your secret
  176.     keyring.  A good way to select a passphrase is to figure out a short
  177.     nonsense sentence which makes some sense for you and modify it by
  178.     inserting extra spaces, non-letters and changing the case of some
  179.     characters - this is really easy to remember especially if you
  180.     associate some pictures with it.
  181.  
  182.     Next, you should create a revocation certificate in case someone
  183.     gets knowledge of your secret key or you forgot your passphrase
  184.  
  185.     gpg --gen-revoke your_user_id
  186.  
  187.     Run this command and store the revocation certificate away.  The output
  188.     is always ASCII armored, so that you can print it and (hopefully
  189.     never) re-create it if your electronic media fails.
  190.  
  191.     Now you can use your key to create digital signatures
  192.  
  193.     gpg -s file
  194.  
  195.     This creates a file "file.gpg" which is compressed and has a
  196.     signature attached.
  197.  
  198.     gpg -sa file
  199.  
  200.     Same as above, but creates a file "file.asc" which is ASCII armored
  201.     and and ready for sending by mail.    It is better to use your
  202.     mailers features to create signatures (The mailer uses GnuPG to do
  203.     this) because the mailer has the ability to MIME encode such
  204.     signatures - but this is not a security issue.
  205.  
  206.     gpg -s -o out file
  207.  
  208.     Creates a signature of "file", but writes the output to the file
  209.     "out".
  210.  
  211.     Everyone who knows your public key (you can and should publish
  212.     your key by putting it on a key server, a web page or in your .plan
  213.     file) is now able to check whether you really signed this text
  214.  
  215.     gpg --verify file
  216.  
  217.     GnuPG now checks whether the signature is valid and prints an
  218.     appropriate message.  If the signature is good, you know at least
  219.     that the person (or machine) has access to the secret key which
  220.     corresponds to the published public key.
  221.  
  222.     If you run gpg without an option it will verify the signature and
  223.     create a new file that is identical to the original.  gpg can also
  224.     run as a filter, so that you can pipe data to verify trough it
  225.  
  226.     cat signed-file | gpg | wc -l
  227.  
  228.     which will check the signature of signed-file and then display the
  229.     number of lines in the original file.
  230.  
  231.     To send a message encrypted to someone you can use
  232.  
  233.     gpg -e -r heine file
  234.  
  235.     This encrypts "file" with the public key of the user "heine" and
  236.     writes it to "file.gpg"
  237.  
  238.     echo "hello" | gpg -ea -r heine | mail heine
  239.  
  240.     Ditto, but encrypts "hello\n" and mails it as ASCII armored message
  241.     to the user with the mail address heine.
  242.  
  243.     gpg -se -r heine file
  244.  
  245.     This encrypts "file" with the public key of "heine" and writes it
  246.     to "file.gpg" after signing it with your user id.
  247.  
  248.     gpg -se -r heine -u Suttner file
  249.  
  250.     Ditto, but sign the file with your alternative user id "Suttner"
  251.  
  252.  
  253.     GnuPG has some options to help you publish public keys.  This is
  254.     called "exporting" a key, thus
  255.  
  256.     gpg --export >all-my-keys
  257.  
  258.     exports all the keys in the keyring and writes them (in a binary
  259.     format) to "all-my-keys".  You may then mail "all-my-keys" as an
  260.     MIME attachment to someone else or put it on an FTP server. To
  261.     export only some user IDs, you give them as arguments on the command
  262.     line.
  263.  
  264.     To mail a public key or put it on a web page you have to create
  265.     the key in ASCII armored format
  266.  
  267.     gpg --export --armor | mail panther@tiger.int
  268.  
  269.     This will send all your public keys to your friend panther.
  270.  
  271.     If you have received a key from someone else you can put it
  272.     into your public keyring.  This is called "importing"
  273.  
  274.     gpg --import [filenames]
  275.  
  276.     New keys are appended to your keyring and already existing
  277.     keys are updated. Note that GnuPG does not import keys that
  278.     are not self-signed.
  279.  
  280.     Because anyone can claim that a public key belongs to her
  281.     we must have some way to check that a public key really belongs
  282.     to the owner.  This can be achieved by comparing the key during
  283.     a phone call.  Sure, it is not very easy to compare a binary file
  284.     by reading the complete hex dump of the file - GnuPG (and nearly
  285.     every other program used for management of cryptographic keys)
  286.     provides other solutions.
  287.  
  288.     gpg --fingerprint <username>
  289.  
  290.     prints the so called "fingerprint" of the given username which
  291.     is a sequence of hex bytes (which you may have noticed in mail
  292.     sigs or on business cards) that uniquely identifies the public
  293.     key - different keys will always have different fingerprints.
  294.     It is easy to compare fingerprints by phone and I suggest
  295.     that you print your fingerprint on the back of your business
  296.     card.  To see the fingerprints of the secondary keys, you can
  297.     give the command twice; but this is normally not needed.
  298.  
  299.     If you don't know the owner of the public key you are in trouble.
  300.     Suppose however that friend of yours knows someone who knows someone
  301.     who has met the owner of the public key at some computer conference.
  302.     Suppose that all the people between you and the public key holder
  303.     may now act as introducers to you.    Introducers signing keys thereby
  304.     certify that they know the owner of the keys they sign.  If you then
  305.     trust all the introducers to have correctly signed other keys, you
  306.     can be be sure that the other key really belongs to the one who
  307.     claims to own it..
  308.  
  309.     There are 2 steps to validate a key:
  310.     1. First check that there is a complete chain
  311.        of signed keys from the public key you want to use
  312.        and your key and verify each signature.
  313.     2. Make sure that you have full trust in the certificates
  314.        of all the introduces between the public key holder and
  315.        you.
  316.     Step 2 is the more complicated part because there is no easy way
  317.     for a computer to decide who is trustworthy and who is not.  GnuPG
  318.     leaves this decision to you and will ask you for a trust value
  319.     (here also referenced as the owner-trust of a key) for every key
  320.     needed to check the chain of certificates.    You may choose from:
  321.       a) "I don't know" - then it is not possible to use any
  322.      of the chains of certificates, in which this key is used
  323.      as an introducer, to validate the target key.    Use this if
  324.      you don't know the introducer.
  325.       b) "I do not trust" - Use this if you know that the introducer
  326.      does not do a good job in certifying other keys.  The effect
  327.      is the same as with a) but for a) you may later want to
  328.      change the value because you got new information about this
  329.      introducer.
  330.       c) "I trust marginally" - Use this if you assume that the
  331.      introducer knows what he is doing.  Together with some
  332.      other marginally trusted keys, GnuPG validates the target
  333.      key then as good.
  334.       d) "I fully trust" - Use this if you really know that this
  335.      introducer does a good job when certifying other keys.
  336.      If all the introducer are of this trust value, GnuPG
  337.      normally needs only one chain of signatures to validate
  338.      a target key okay. (But this may be adjusted with the help
  339.      of some options).
  340.     This information is confidential because it gives your personal
  341.     opinion on the trustworthiness of someone else.  Therefore this data
  342.     is not stored in the keyring but in the "trustdb"
  343.     (~/.gnupg/trustdb.gpg).  Do not assign a high trust value just
  344.     because the introducer is a friend of yours - decide how well she
  345.     understands the implications of key signatures and you may want to
  346.     tell her more about public key cryptography so you can later change
  347.     the trust value you assigned.
  348.  
  349.     Okay, here is how GnuPG helps you with key management.  Most stuff
  350.     is done with the --edit-key command
  351.  
  352.     gpg --edit-key <keyid or username>
  353.  
  354.     GnuPG displays some information about the key and then prompts
  355.     for a command (enter "help" to see a list of commands and see
  356.     the man page for a more detailed explanation).  To sign a key
  357.     you select the user ID you want to sign by entering the number
  358.     that is displayed in the leftmost column (or do nothing if the
  359.     key has only one user ID) and then enter the command "sign" and
  360.     follow all the prompts.  When you are ready, give the command
  361.     "save" (or use "quit" to cancel your actions).
  362.  
  363.     If you want to sign the key with another of your user IDs, you
  364.     must give an "-u" option on the command line together with the
  365.     "--edit-key".
  366.  
  367.     Normally you want to sign only one user ID because GnuPG
  368.     uses only one and this keeps the public key certificate
  369.     small.  Because such key signatures are very important you
  370.     should make sure that the signatories of your key sign a user ID
  371.     which is very likely to stay for a long time - choose one with an
  372.     email address you have full control of or do not enter an email
  373.     address at all.  In future GnuPG will have a way to tell which
  374.     user ID is the one with an email address you prefer - because
  375.     you have no signatures on this email address it is easy to change
  376.     this address.  Remember, your signatories sign your public key (the
  377.     primary one) together with one of your user IDs - so it is not possible
  378.     to change the user ID later without voiding all the signatures.
  379.  
  380.     Tip: If you hear about a key signing party on a computer conference
  381.     join it because this is a very convenient way to get your key
  382.     certified (But remember that signatures have nothing to to with the
  383.     trust you assign to a key).
  384.  
  385.  
  386.     8 Ways to Specify a User ID
  387.     --------------------------
  388.     There are several ways to specify a user ID, here are some examples.
  389.  
  390.     * Only by the short keyid (prepend a zero if it begins with A..F):
  391.  
  392.     "234567C4"
  393.     "0F34E556E"
  394.     "01347A56A"
  395.     "0xAB123456
  396.  
  397.     * By a complete keyid:
  398.  
  399.     "234AABBCC34567C4"
  400.     "0F323456784E56EAB"
  401.     "01AB3FED1347A5612"
  402.     "0x234AABBCC34567C4"
  403.  
  404.     * By a fingerprint:
  405.  
  406.     "1234343434343434C434343434343434"
  407.     "123434343434343C3434343434343734349A3434"
  408.     "0E12343434343434343434EAB3484343434343434"
  409.  
  410.       The first one is MD5 the others are ripemd160 or sha1.
  411.  
  412.     * By an exact string:
  413.  
  414.     "=Heinrich Heine <heinrichh@uni-duesseldorf.de>"
  415.  
  416.     * By an email address:
  417.  
  418.     "<heinrichh@uni-duesseldorf.de>"
  419.  
  420.     * By word match
  421.  
  422.     "+Heinrich Heine duesseldorf"
  423.  
  424.       All words must match exactly (not case sensitive) and appear in
  425.       any order in the user ID.  Words are any sequences of letters,
  426.       digits, the underscore and characters with bit 7 set.
  427.  
  428.     * By the Local ID (from the trust DB):
  429.  
  430.     "#34"
  431.  
  432.       This may be used by a MUA to specify an exact key after selecting
  433.       a key from GnuPG (by using a special option or an extra utility)
  434.  
  435.     * Or by the usual substring:
  436.  
  437.     "Heine"
  438.     "*Heine"
  439.  
  440.       The '*' indicates substring search explicitly.
  441.  
  442.  
  443.     Batch mode
  444.     ----------
  445.     If you use the option "--batch", GnuPG runs in non-interactive mode and
  446.     never prompts for input data.  This does not even allow entering the
  447.     passphrase.  Until we have a better solution (something like ssh-agent),
  448.     you can use the option "--passphrase-fd n", which works like PGP's
  449.     PGPPASSFD.
  450.  
  451.     Batch mode also causes GnuPG to terminate as soon as a BAD signature is
  452.     detected.
  453.  
  454.  
  455.     Exit status
  456.     -----------
  457.     GnuPG returns with an exit status of 1 if in batch mode and a bad signature
  458.     has been detected or 2 or higher for all other errors.  You should parse
  459.     stderr or, better, the output of the fd specified with --status-fd to get
  460.     detailed information about the errors.
  461.  
  462.  
  463.     How to Get More Information
  464.     ---------------------------
  465.  
  466.     The primary WWW page is "http://www.gnupg.org"
  467.     The primary FTP site is "ftp://ftp.gnupg.org/gcrypt/"
  468.  
  469.     See http://www.gnupg.org/mirrors.html for a list of mirrors
  470.     and use them if possible.  You may also find GnuPG mirrored on
  471.     some of the regular GNU mirrors.
  472.  
  473.     We have some mailing lists dedicated to GnuPG:
  474.  
  475.     gnupg-announce@gnupg.org    For important announcements like
  476.                     new versions and  such stuff.
  477.                     This is a moderated list and has
  478.                     very low traffic.
  479.     gnupg-users@gnupg.org        For general user discussion and
  480.                     help.
  481.     gnupg-i18n@gnupg.org        Discussion about internationalization
  482.                     issues.
  483.     gnupg-devel@gnupg.org        GnuPG developers main forum.
  484.  
  485.     You subscribe to one of the list by sending mail with a subject
  486.     of "subscribe" to x-request@gnupg.org, where x is the name of the
  487.     mailing list (gnupg-announce, gnupg-users, etc.).  An archive of
  488.     the mailing lists is available at http://lists.gnupg.org .
  489.  
  490.     The gnupg.org domain is hosted in Germany to avoid possible legal
  491.     problems (technical advices may count as a violation of ITAR).
  492.  
  493.     Please direct bug reports to <gnupg-bugs@gnu.org> or post
  494.     them direct to the mailing list <gnupg-devel@gnupg.org>.
  495.  
  496.     Please direct questions about GnuPG to the users mailing list or
  497.     one of the pgp newsgroups; please do not direct questions to one
  498.     of the authors directly as we are busy working on improvements
  499.     and bug fixes.  Both mailing lists are watched by the authors
  500.     and we try to answer questions when time allows us to do so.
  501.  
  502.     Commercial grade support for GnuPG is available; please see
  503.     the GNU service directory or search other resources.
  504.