gnupg/sm
Werner Koch 08ff55bd44
kbx: Use custom estream buffering
* kbx/keybox-init.c (ll_buffer_size): New var intialized to 128k
(stream_buffers): New var.
(keybox_set_buffersize): New.
(_keybox_ll_open, _keybox_ll_close): Implement buffering.

* sm/gpgsm.c (oKbxBufferSize): New.
(opts): Add option --kbx-buffer-size.
(main): Call keybox_set_buffersize.

* g10/gpg.c: Include keybox.h.
* (oKbxBufferSize): New.
(opts): Add option --kbx-buffer-size.
(main): Call keybox_set_buffersize.
--

Running a test on Windows using a pubring.kbx with
Total number of blobs:     2098
              openpgp:     1294
                 x509:      803
and a size of 42MiB with

gpgsm -k --with-validation --disable-dirmngr --kbx-buffer-size N >nul

gives these performance figures using procmon

| N(k) | file events | time(s) |
|------+-------------+---------|
|    0 |     4900000 |      86 |
|   16 |     2456000 |      58 |
|   32 |     1233000 |      43 |
|   64 |      622000 |      37 |
|  128 |      317000 |      32 |
|  256 |      164000 |      31 |
|  512 |       88000 |      30 |

Using _open instead of CreateFile give the same number of file events
but increased the time slight by one second for the measured buffer
size of 64k and 128k.   Benchmarks for gpg have not been conducted.
2023-05-08 09:40:14 +02:00
..
ChangeLog-2011 Generate the ChangeLog from commit logs. 2011-12-01 11:09:02 +01:00
Makefile.am build: Remove Windows CE support. 2022-12-09 14:06:08 +09:00
call-agent.c agent: Add trustlist flag "de-vs". 2023-04-03 14:10:33 +02:00
call-dirmngr.c dirmngr: Distinguish between "no crl" and "crl not trusted". 2023-03-09 18:28:39 +01:00
certchain.c gpgsm: Cache the non-existence of the policy file. 2023-05-04 14:35:31 +02:00
certcheck.c sm: Avoid memory leaks and double double-free 2021-05-20 13:51:47 +02:00
certdump.c gpgsm: New option --no-pretty-dn 2023-03-16 09:46:05 +01:00
certlist.c gpgsm: Improve cert lookup callback from dirmngr. 2023-02-26 19:14:22 +01:00
certreqgen-ui.c gpgsm: Replace all assert calls by log_assert. 2020-07-08 14:40:34 +02:00
certreqgen.c gpgsm: Replace all assert calls by log_assert. 2020-07-08 14:40:34 +02:00
decrypt.c gpgsm: Remove conditional compilation for older libksba versions. 2023-03-31 09:35:07 +02:00
delete.c sm: Implement delete key in keyboxd mode 2020-09-21 09:20:40 +02:00
encrypt.c gpgsm: New option --require-compliance 2022-03-08 19:28:16 +01:00
export.c sm: Ask for the password for password based decryption (pwri) 2021-05-17 15:42:27 +02:00
fingerprint.c gpgsm: Allow ECC encryption keys with just keyAgreement specified. 2022-10-25 11:57:23 +02:00
gpgsm-w32info.rc w32: Add icons and version information. 2013-05-07 21:35:48 +02:00
gpgsm.c kbx: Use custom estream buffering 2023-05-08 09:40:14 +02:00
gpgsm.h agent: Add trustlist flag "de-vs". 2023-04-03 14:10:33 +02:00
import.c sm: Fix use of value NONE in gnupg_isotime_t type. 2022-02-18 11:11:12 +09:00
keydb.c kbx: Add extra flags to fopen for use by Windows. 2023-05-04 14:37:48 +02:00
keydb.h sm: Implement initial support for keyboxd. 2020-09-10 13:05:17 +02:00
keylist.c gpgsm: Print revocation date and reason in cert listings. 2022-12-05 16:42:08 +01:00
minip12.c sm: Fix reporting of bad passphrase error 2022-09-09 18:23:11 +02:00
minip12.h sm: Silence some output on --quiet 2021-02-24 08:40:06 +01:00
misc.c sm: Print diagnostic about CRL problems due to Tor mode. 2022-04-11 17:57:14 +02:00
passphrase.c gpg,common,scd,sm: Function prototype fixes for modern compiler. 2022-09-13 16:34:00 +09:00
passphrase.h Change all http://www.gnu.org in license notices to https:// 2016-11-05 12:02:19 +01:00
qualified.c Replace most of the remaining stdio calls by estream calls. 2020-10-20 12:15:56 +02:00
server.c Remove remaining support for WindowsCE 2022-06-03 10:08:21 +02:00
sign.c agent: Add trustlist flag "de-vs". 2023-04-03 14:10:33 +02:00
t-minip12.c sm: Add support to export ECC private keys. 2020-04-27 19:54:39 +02:00
verify.c gpgsm: Strip trailing zeroes from detached signatures. 2023-03-08 11:00:00 +01:00