1
0
mirror of git://git.gnupg.org/gnupg.git synced 2024-06-13 00:09:51 +02:00
gnupg/common
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
..
argparse.c common: Add meta option ignore-invalid-option. 2012-12-18 18:06:41 +01:00
argparse.h common: Add meta option ignore-invalid-option. 2012-12-18 18:06:41 +01:00
asshelp.c Change all quotes in strings and comments to the new GNU standard. 2012-06-05 19:29:22 +02:00
asshelp.h Change license for some files in common to LGPLv3+/GPLv2+. 2012-04-20 15:48:48 +02:00
asshelp2.c Change license for some files in common to LGPLv3+/GPLv2+. 2012-04-20 15:48:48 +02:00
audit.c Change all quotes in strings and comments to the new GNU standard. 2012-06-05 19:29:22 +02:00
audit.h Nuked almost all trailing white space. 2011-02-04 12:57:53 +01:00
b64dec.c Change license for some files in common to LGPLv3+/GPLv2+. 2012-04-20 15:48:48 +02:00
b64enc.c Change license for some files in common to LGPLv3+/GPLv2+. 2012-04-20 15:48:48 +02:00
ChangeLog-2011 Generate the ChangeLog from commit logs. 2011-12-01 11:09:02 +01:00
ChangeLog.jnlib Generate the ChangeLog from commit logs. 2011-12-01 11:09:02 +01:00
common-defs.h Changed to GPLv3. 2007-07-04 19:49:40 +00:00
convert.c Change license for some files in common to LGPLv3+/GPLv2+. 2012-04-20 15:48:48 +02:00
dns-cert.c Change license for some files in common to LGPLv3+/GPLv2+. 2012-04-20 15:48:48 +02:00
dns-cert.h Change license for some files in common to LGPLv3+/GPLv2+. 2012-04-20 15:48:48 +02:00
dotlock.c Change all quotes in strings and comments to the new GNU standard. 2012-06-05 19:29:22 +02:00
dotlock.h Change all quotes in strings and comments to the new GNU standard. 2012-06-05 19:29:22 +02:00
dynload.h Change JNLIB license to LGPLv3+ or GPLv2+. 2011-09-30 12:53:34 +02:00
estream-printf.c Change all quotes in strings and comments to the new GNU standard. 2012-06-05 19:29:22 +02:00
estream-printf.h Change all quotes in strings and comments to the new GNU standard. 2012-06-05 19:29:22 +02:00
estream.c Change all quotes in strings and comments to the new GNU standard. 2012-06-05 19:29:22 +02:00
estream.h Change all quotes in strings and comments to the new GNU standard. 2012-06-05 19:29:22 +02:00
exaudit.awk Nuked almost all trailing white space. 2011-02-04 12:57:53 +01:00
exechelp-posix.c Change all quotes in strings and comments to the new GNU standard. 2012-06-05 19:29:22 +02:00
exechelp-w32.c Change all quotes in strings and comments to the new GNU standard. 2012-06-05 19:29:22 +02:00
exechelp-w32ce.c Change all quotes in strings and comments to the new GNU standard. 2012-06-05 19:29:22 +02:00
exechelp.h Change license for some files in common to LGPLv3+/GPLv2+. 2012-04-20 15:48:48 +02:00
exstatus.awk Nuked almost all trailing white space. 2011-02-04 12:57:53 +01:00
gc-opt-flags.h Nuked almost all trailing white space. 2011-02-04 12:57:53 +01:00
get-passphrase.c Change all quotes in strings and comments to the new GNU standard. 2012-06-05 19:29:22 +02:00
get-passphrase.h Change license for some files in common to LGPLv3+/GPLv2+. 2012-04-20 15:48:48 +02:00
gettime.c Change license for some files in common to LGPLv3+/GPLv2+. 2012-04-20 15:48:48 +02:00
gettime.h remove doubled words in a comment 2012-04-26 09:52:25 +02:00
gpgrlhelp.c Change license for some files in common to LGPLv3+/GPLv2+. 2012-04-20 15:48:48 +02:00
helpfile.c Change all quotes in strings and comments to the new GNU standard. 2012-06-05 19:29:22 +02:00
homedir.c Change all quotes in strings and comments to the new GNU standard. 2012-06-05 19:29:22 +02:00
http.c Change all quotes in strings and comments to the new GNU standard. 2012-06-05 19:29:22 +02:00
http.h Change license for some files in common to LGPLv3+/GPLv2+. 2012-04-20 15:48:48 +02:00
i18n.c Change license for some files in common to LGPLv3+/GPLv2+. 2012-04-20 15:48:48 +02:00
i18n.h Nuked almost all trailing white space. 2011-02-04 12:57:53 +01:00
init.c Change license for some files in common to LGPLv3+/GPLv2+. 2012-04-20 15:48:48 +02:00
init.h Change license for some files in common to LGPLv3+/GPLv2+. 2012-04-20 15:48:48 +02:00
iobuf.c gpg: Cache keybox searches. 2013-01-08 14:46:06 +01:00
iobuf.h Change license for some files in common to LGPLv3+/GPLv2+. 2012-04-20 15:48:48 +02:00
isascii.c Changed to GPLv3. 2007-07-04 19:49:40 +00:00
keyserver.h Initial code checking for backup - not yet working. 2011-01-10 14:30:17 +01:00
libjnlib-config.h Change JNLIB license to LGPLv3+ or GPLv2+. 2011-09-30 12:53:34 +02:00
localename.c Change license for some files in common to LGPLv3+/GPLv2+. 2012-04-20 15:48:48 +02:00
logging.c Make log_clock easier to read. 2013-01-08 14:35:27 +01:00
logging.h New function log_clock. 2013-01-07 16:51:24 +01:00
Makefile.am common: Remove generated files only during maintainer-clean. 2012-05-08 15:14:58 +02:00
membuf.c Change license for some files in common to LGPLv3+/GPLv2+. 2012-04-20 15:48:48 +02:00
membuf.h Change license for some files in common to LGPLv3+/GPLv2+. 2012-04-20 15:48:48 +02:00
miscellaneous.c Change license for some files in common to LGPLv3+/GPLv2+. 2012-04-20 15:48:48 +02:00
mischelp.c Change JNLIB license to LGPLv3+ or GPLv2+. 2011-09-30 12:53:34 +02:00
mischelp.h Change JNLIB license to LGPLv3+ or GPLv2+. 2011-09-30 12:53:34 +02:00
mkerrors Nuked almost all trailing white space. 2011-02-04 12:57:53 +01:00
mkerrtok Nuked almost all trailing white space. 2011-02-04 12:57:53 +01:00
mkstrtable.awk Nuked almost all trailing white space. 2011-02-04 12:57:53 +01:00
openpgp-oid.c Change license for some files in common to LGPLv3+/GPLv2+. 2012-04-20 15:48:48 +02:00
openpgpdefs.h Change license for some files in common to LGPLv3+/GPLv2+. 2012-04-20 15:48:48 +02:00
percent.c Change license for some files in common to LGPLv3+/GPLv2+. 2012-04-20 15:48:48 +02:00
pka.c Change license for some files in common to LGPLv3+/GPLv2+. 2012-04-20 15:48:48 +02:00
pka.h Change license for some files in common to LGPLv3+/GPLv2+. 2012-04-20 15:48:48 +02:00
README This commit was manufactured by cvs2svn to create branch 2003-08-05 17:11:04 +00:00
README.jnlib Nuked almost all trailing white space. 2011-02-04 12:57:53 +01:00
session-env.c Do not use a broken ttyname. 2012-11-20 19:03:49 +01:00
session-env.h Change license for some files in common to LGPLv3+/GPLv2+. 2012-04-20 15:48:48 +02:00
sexp-parse.h Change license for some files in common to LGPLv3+/GPLv2+. 2012-04-20 15:48:48 +02:00
sexputil.c Change license for some files in common to LGPLv3+/GPLv2+. 2012-04-20 15:48:48 +02:00
signal.c Change license for some files in common to LGPLv3+/GPLv2+. 2012-04-20 15:48:48 +02:00
simple-pwquery.c Do not use a broken ttyname. 2012-11-20 19:03:49 +01:00
simple-pwquery.h Nuked almost all trailing white space. 2011-02-04 12:57:53 +01:00
srv.c Fix left over use of jnlib on some platforms 2012-08-24 09:29:56 +02:00
srv.h Change license for some files in common to LGPLv3+/GPLv2+. 2012-04-20 15:48:48 +02:00
ssh-utils.c ssh: Support ECDSA keys. 2012-12-12 18:47:21 +01:00
ssh-utils.h Change license for some files in common to LGPLv3+/GPLv2+. 2012-04-20 15:48:48 +02:00
status.c Nuked almost all trailing white space. 2011-02-04 12:57:53 +01:00
status.h Add tweaks for the not anymore patented IDEA algorithm. 2012-05-08 18:18:32 +02:00
stringhelp.c Change all quotes in strings and comments to the new GNU standard. 2012-06-05 19:29:22 +02:00
stringhelp.h Change JNLIB license to LGPLv3+ or GPLv2+. 2011-09-30 12:53:34 +02:00
strlist.c Change JNLIB license to LGPLv3+ or GPLv2+. 2011-09-30 12:53:34 +02:00
strlist.h Change JNLIB license to LGPLv3+ or GPLv2+. 2011-09-30 12:53:34 +02:00
sysutils.c Change license for some files in common to LGPLv3+/GPLv2+. 2012-04-20 15:48:48 +02:00
sysutils.h Change license for some files in common to LGPLv3+/GPLv2+. 2012-04-20 15:48:48 +02:00
t-b64.c Change all quotes in strings and comments to the new GNU standard. 2012-06-05 19:29:22 +02:00
t-convert.c Nuked almost all trailing white space. 2011-02-04 12:57:53 +01:00
t-dns-cert.c Change all quotes in strings and comments to the new GNU standard. 2012-06-05 19:29:22 +02:00
t-dotlock.c Change all quotes in strings and comments to the new GNU standard. 2012-06-05 19:29:22 +02:00
t-exechelp.c Fixed set but unused variable bugs 2011-08-10 14:11:30 +02:00
t-gettime.c Change all quotes in strings and comments to the new GNU standard. 2012-06-05 19:29:22 +02:00
t-helpfile.c Change all quotes in strings and comments to the new GNU standard. 2012-06-05 19:29:22 +02:00
t-openpgp-oid.c Move OpenPGP OID helpers to common/. 2011-01-31 18:19:14 +01:00
t-percent.c Nuked almost all trailing white space. 2011-02-04 12:57:53 +01:00
t-session-env.c Nuked almost all trailing white space. 2011-02-04 12:57:53 +01:00
t-sexputil.c Nuked almost all trailing white space. 2011-02-04 12:57:53 +01:00
t-ssh-utils.c Change all quotes in strings and comments to the new GNU standard. 2012-06-05 19:29:22 +02:00
t-stringhelp.c Change JNLIB license to LGPLv3+ or GPLv2+. 2011-09-30 12:53:34 +02:00
t-support.c Change JNLIB license to LGPLv3+ or GPLv2+. 2011-09-30 12:53:34 +02:00
t-support.h Change JNLIB license to LGPLv3+ or GPLv2+. 2011-09-30 12:53:34 +02:00
t-sysutils.c Nuked almost all trailing white space. 2011-02-04 12:57:53 +01:00
t-timestuff.c Fix timegm regression test. 2012-03-27 19:46:20 +02:00
t-w32-reg.c Change JNLIB license to LGPLv3+ or GPLv2+. 2011-09-30 12:53:34 +02:00
tlv.c Change license for some files in common to LGPLv3+/GPLv2+. 2012-04-20 15:48:48 +02:00
tlv.h Change license for some files in common to LGPLv3+/GPLv2+. 2012-04-20 15:48:48 +02:00
ttyio.c Change all quotes in strings and comments to the new GNU standard. 2012-06-05 19:29:22 +02:00
ttyio.h Change license for some files in common to LGPLv3+/GPLv2+. 2012-04-20 15:48:48 +02:00
types.h Change JNLIB license to LGPLv3+ or GPLv2+. 2011-09-30 12:53:34 +02:00
userids.c Change license for some files in common to LGPLv3+/GPLv2+. 2012-04-20 15:48:48 +02:00
userids.h Change license for some files in common to LGPLv3+/GPLv2+. 2012-04-20 15:48:48 +02:00
utf8conv.c utf8conv.c: Add hacks for Android. 2012-12-13 16:11:21 +01:00
utf8conv.h Change JNLIB license to LGPLv3+ or GPLv2+. 2011-09-30 12:53:34 +02:00
util.h Do not use a broken ttyname. 2012-11-20 19:03:49 +01:00
w32-afunix.c Change JNLIB license to LGPLv3+ or GPLv2+. 2011-09-30 12:53:34 +02:00
w32-afunix.h Change JNLIB license to LGPLv3+ or GPLv2+. 2011-09-30 12:53:34 +02:00
w32-reg.c Change JNLIB license to LGPLv3+ or GPLv2+. 2011-09-30 12:53:34 +02:00
w32help.h Change JNLIB license to LGPLv3+ or GPLv2+. 2011-09-30 12:53:34 +02:00
xasprintf.c Change license for some files in common to LGPLv3+/GPLv2+. 2012-04-20 15:48:48 +02:00
xmalloc.c Change JNLIB license to LGPLv3+ or GPLv2+. 2011-09-30 12:53:34 +02:00
xmalloc.h Change JNLIB license to LGPLv3+ or GPLv2+. 2011-09-30 12:53:34 +02:00
xreadline.c Change license for some files in common to LGPLv3+/GPLv2+. 2012-04-20 15:48:48 +02:00
yesno.c Nuked almost all trailing white space. 2011-02-04 12:57:53 +01:00

Stuff used by several modules of GnuPG.

These directories use it:

gpg
sm
agent

These directories don't use it:

kbx