Home GnuPG
Diffusion GnuPG f8943ce098f6

g10/sign: sign_file: use iobuf_read for higher detached signing speed

Description

g10/sign: sign_file: use iobuf_read for higher detached signing speed

* g10/sign.c (sign_file): Use iobuf_read instead of iobuf_get for
reading data from detached file.

This patch reduces iobuf_read per byte processing overhead and speeds
up detached signing.

Detached signing speed on AMD Ryzen 5800X (4.3GiB file, SHA256):

gpg process
user time

before: 3.951s
after: 1.898s (2.0x faster)

  • GnuPG-bug-id: T5826
  • Signed-off-by: Jussi Kivilinna <jussi.kivilinna@iki.fi>

Details