Go to file
Werner Koch 492792378d gpg: Cache keybox searches.
* common/iobuf.c (iobuf_seek): Fix for temp streams.
* g10/pubkey-enc.c (get_session_key, get_it): Add some log_clock calls.
* g10/keydb.c (dump_search_desc): New.
(enum_keyblock_states, struct keyblock_cache): New.
(keyblock_cache_clear): New.
(keydb_get_keyblock, keydb_search): Implement a keyblock cache.
(keydb_update_keyblock, keydb_insert_keyblock, keydb_delete_keyblock)
(keydb_rebuild_caches, keydb_search_reset): Clear the cache.
--

Gpg uses the key database at several places without a central
coordination.  This leads to several scans of the keybox for the same
key.  To improve that we now use a simple cache to store a retrieved
keyblock in certain cases.  In theory this caching could also be done
for old keyrings, but it is a bit more work and questionable whether
it is needed; the keybox scheme is anyway much faster than keyrings.

Using a keybox with 20000 384 bit ECDSA/ECHD keypairs and a 252 byte
sample text we get these values for encrypt and decrypt operations on
an Core i5 4*3.33Ghz system.  The option --trust-model=always is used.
Times are given in milliseconds wall time.

|           | enc | dec | dec,q |
|-----------+-----+-----+-------|
| key 1     |  48 |  96 |    70 |
| key 10000 |  60 |  98 |    80 |
| key 20000 |  69 | 106 |    88 |
| 10 keys   | 540 | 290 |    70 |

The 10 keys test uses a mix of keys, the first one is used for
decryption but all keys are looked up so that information about are
printed.  The last column gives decryption results w/o information
printing (--quiet).

The keybox is always scanned sequentially without using any index.  By
adding an index to the keybox it will be possible to further reduce
the time required for keys stored to the end of the file.
2013-01-08 14:46:06 +01:00
agent ssh: Support ECDSA keys. 2012-12-12 18:47:21 +01:00
am Nuked almost all trailing white space. 2011-02-04 12:57:53 +01:00
artwork Define SUN_LEN also for W32. 2009-06-04 14:19:21 +00:00
common gpg: Cache keybox searches. 2013-01-08 14:46:06 +01:00
dirmngr Fix typos spotted during translations 2012-08-24 09:44:33 +02:00
doc faq: Add a section on copyright assignments 2012-12-19 11:05:05 +01:00
g10 gpg: Cache keybox searches. 2013-01-08 14:46:06 +01:00
g13 Change all quotes in strings and comments to the new GNU standard. 2012-06-05 19:29:22 +02:00
gl Change all quotes in strings and comments to the new GNU standard. 2012-06-05 19:29:22 +02:00
include Change all quotes in strings and comments to the new GNU standard. 2012-06-05 19:29:22 +02:00
kbx gpg: Set the node flags while retrieving a keyblock. 2013-01-07 21:14:52 +01:00
keyserver Change all quotes in strings and comments to the new GNU standard. 2012-06-05 19:29:22 +02:00
m4 config: Update npth.m4. 2012-12-10 09:40:40 +01:00
po Update and enable French translation 2012-08-24 17:42:36 +02:00
scd SCD: Fix the process of writing key or generating key. 2012-12-13 13:44:43 +09:00
scripts Extend gitlog-to-changelog option --tear-off. 2012-01-25 11:58:54 +01:00
sm Do not use a broken ttyname. 2012-11-20 19:03:49 +01:00
tests Change all quotes in strings and comments to the new GNU standard. 2012-06-05 19:29:22 +02:00
tools Fix left over use of jnlib on some platforms 2012-08-24 09:29:56 +02:00
.gitignore Add POT file to .gitignore 2012-08-24 17:41:21 +02:00
ABOUT-NLS Preparing a test release 2008-02-15 09:58:01 +00:00
AUTHORS State that disclaimers are not anymore needed for translations. 2012-12-18 19:56:24 +01:00
COPYING Changed to GPLv3. 2007-07-04 19:49:40 +00:00
COPYING.LIB Changed to GPLv3. 2007-07-04 19:49:40 +00:00
ChangeLog Generate the ChangeLog from commit logs. 2011-12-01 11:09:02 +01:00
ChangeLog-2011 Generate the ChangeLog from commit logs. 2011-12-01 11:09:02 +01:00
INSTALL Upgraded gettext. 2007-05-07 19:49:12 +00:00
Makefile.am Fix build system for Android by disabling tests since its x-compiled 2012-08-24 09:37:23 +02:00
NEWS Print the hash algorithm in colon mode key listing. 2012-05-24 10:13:39 +02:00
README Require libgcrypt 1.5 2011-03-08 12:23:59 +01:00
README.GIT Nuked almost all trailing white space. 2011-02-04 12:57:53 +01:00
README.maint Switch to the new automagic beta numbering scheme. 2012-05-11 10:20:29 +02:00
THANKS Support the Cherry ST-2000 card reader. 2011-12-02 18:09:58 +01:00
TODO Impleemned gpgsm's IMPORT --re-import feature. 2009-07-07 16:52:12 +00:00
acinclude.m4 Better support unsigned time_t 2010-10-27 11:26:53 +00:00
autogen.sh Fix non-portable use of chmod in autogen.sh. 2012-11-16 10:41:22 +01:00
configure.ac Check for inet_addr() in -lnsl. 2012-11-26 14:34:11 +01:00

README

                       The GNU Privacy Guard 2
                      =========================
                             Version 2.1

   THIS IS A DEVELOPMENT VERSION AND NOT INTENDED FOR REGULAR USE.

      Copyright 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005,
     2006, 2007, 2008, 2009, 2010, 2011 Free Software Foundation, Inc.


INTRODUCTION
============

GnuPG is GNU's tool for secure communication and data storage.  It can
be used to encrypt data and to create digital signatures.  It includes
an advanced key management facility and is compliant with the proposed
OpenPGP Internet standard as described in RFC4880 and the S/MIME
standard as described by several RFCs.

GnuPG is distributed under the terms of the GNU General Public
License.  See the file COPYING for details.  GnuPG works best on
GNU/Linux or *BSD systems.  Most other Unices are also supported but
are not as well tested as the Free Unices.

GnuPG 2.0 is the stable version of GnuPG integrating support for
OpenPGP and S/MIME.  It does not conflict with an installed 1.4
OpenPGP-only version.


BUILD INSTRUCTIONS
==================

GnuPG 2.1 depends on the following packages:

  libgpg-error (ftp://ftp.gnupg.org/gcrypt/libgpg-error/)
  libgcrypt    (ftp://ftp.gnupg.org/gcrypt/libgcrypt/)
  libksba      (ftp://ftp.gnupg.org/gcrypt/libksba/)
  libassuan    (ftp://ftp.gnupg.org/gcrypt/libassuan/)

You also need the Pinentry package for most function of GnuPG; however
it is not a build requirement.  Pinentry is available at
ftp://ftp.gnupg.org/gcrypt/pinentry/ .

You should get the latest versions of course, the GnuPG configure
script complains if a version is not sufficient.

After building and installing the above packages in the order as given
above, you may now continue with GnuPG installation (you may also just
try to build GnuPG to see whether your already installed versions are
sufficient).

As with all packages, you just have to do

 ./configure
 make
 make install

(Before doing install you might need to become root.)

If everything succeeds, you have a working GnuPG with support for
S/MIME and smartcards.  Note that there is no binary gpg but a gpg2 so
that this package won't conflict with a GnuPG 1.4 installation.  gpg2
behaves just like gpg.

In case of problem please ask on gnupg-users@gnupg.org for advise.

Note that the PKITS tests are always skipped unless you copy the PKITS
test data file into the tests/pkits directory.  There is no need to
run these test and some of them may even fail because the test scripts
are not yet complete.

You may run

  gpgconf --list-dirs

to view the default directories used by GnuPG.


MIGRATION FROM 1.4 or 2.0 to 2.1
================================

The major change in 2.1 is that gpg-agent now takes care of the
OpenPGP secret keys (those managed by GPG).  The former secring.gpg
will not be used anymore.  Newly generated keys are generated and
stored in the agent's key store (~/.gnupg/private-keys-v1.d/).  To
migrate your existing keys to the agent you should run this command

  gpg2 --import ~/.gnupg/secring.gpg

The agent will you ask for the passphrase of each key.  You may use
the Cancel button of the Pinentry to skip importing this key.  If you
want to stop the import process and you use one of the latest
pinentries, you should close the pinentry window instead of hitting
the cancel button.  Secret keys already imported are skipped by the
import command.  It is advisable to keep the secring.gpg for use with
older versions of GPG.

Note that gpg-agent now uses a fixed socket by default.  All tools
will start the gpg-agent as needed.  In general there is no more need
to set the GPG_AGENT_INFO environment variable.  The SSH_AUTH_SOCK
environment variable should be set to a fixed value.

GPG's smartcard commands --card-edit and --card-status as well as some
of the card related sub-commands of --edit-key are not yet fully
supported.  However, signing and decryption with a smartcard does
work.

The Dirmngr is now part of GnuPG proper.  Thus there is no more need
to install the separate dirmngr package.  The directroy layout of
Dirmngr changed to make use of the GnuPG directories; for example you
use /etc/gnupg/trusted-certs and /var/lib/gnupg/extra-certs.  Dirmngr
needs to be started as a system daemon.



DOCUMENTATION
=============

The complete documentation is in the texinfo manual named
`gnupg.info'.  Run "info gnupg" to read it.  If you want a a printable
copy of the manual, change to the "doc" directory and enter "make pdf"
For a HTML version enter "make html" and point your browser to
gnupg.html/index.html.  Standard man pages for all components are
provided as well.  An online version of the manual is available at
http://www.gnupg.org/documentation/manuals/gnupg/ .  A version of the
manual pertaining to the current development snapshot is at
http://www.gnupg.org/documentation/manuals/gnupg-devel/ .


GNUPG 1.4 AND GNUPG 2.0
=======================

GnuPG 2.0 is a newer version of GnuPG with additional support for
S/MIME.  It has a different design philosophy that splits
functionality up into several modules.  Both versions may be installed
simultaneously without any conflict (gpg is called gpg2 in GnuPG 2).
In fact, the gpg version from GnuPG 1.4 is able to make use of the
gpg-agent as included in GnuPG 2 and allows for seamless passphrase
caching.  The advantage of GnuPG 1.4 is its smaller size and no
dependency on other modules at run and build time.


HOW TO GET MORE INFORMATION
===========================

The primary WWW page is "http://www.gnupg.org"
The primary FTP site is "ftp://ftp.gnupg.org/gcrypt/"

See http://www.gnupg.org/download/mirrors.html for a list of mirrors
and use them if possible.  You may also find GnuPG mirrored on some of
the regular GNU mirrors.

We have some mailing lists dedicated to GnuPG:

   gnupg-announce@gnupg.org   For important announcements like new
                              versions and such stuff.  This is a
                              moderated list and has very low traffic.
                              Do not post to this list.

   gnupg-users@gnupg.org      For general user discussion and
                              help (English).

   gnupg-de@gnupg.org         German speaking counterpart of
                              gnupg-users.

   gnupg-ru@gnupg.org         Russian speaking counterpart of
                              gnupg-users.

   gnupg-devel@gnupg.org      GnuPG developers main forum.

You subscribe to one of the list by sending mail with a subject of
"subscribe" to x-request@gnupg.org, where x is the name of the mailing
list (gnupg-announce, gnupg-users, etc.).  An archive of the mailing
lists are available at http://www.gnupg.org/documentation/mailing-lists.html

Please direct bug reports to http://bugs.gnupg.org or post them direct
to the mailing list <gnupg-devel@gnupg.org>.

Please direct questions about GnuPG to the users mailing list or one
of the pgp newsgroups; please do not direct questions to one of the
authors directly as we are busy working on improvements and bug fixes.
The English and German mailing lists are watched by the authors and we
try to answer questions when time allows us to do so.

Commercial grade support for GnuPG is available; please see
http://www.gnupg.org/service.html .


  This file is Free Software; as a special exception the authors gives
  unlimited permission to copy and/or distribute it, with or without
  modifications, as long as this notice is preserved. For conditions
  of the whole package, please see the file COPYING.  This file is
  distributed in the hope that it will be useful, but WITHOUT ANY
  WARRANTY, to the extent permitted by law; without even the implied
  warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.