OSDN Git Service

crypto: add support for gcrypt's native XTS impl
authorDaniel P. Berrangé <berrange@redhat.com>
Mon, 14 Oct 2019 16:28:27 +0000 (17:28 +0100)
committerDaniel P. Berrangé <berrange@redhat.com>
Mon, 28 Oct 2019 15:20:28 +0000 (16:20 +0100)
commite0576942e005de0f9226913cb0750cf445a33565
tree52a3ab5a21585439d4a429efe671d7e5a8ddf607
parentb4296d7f88f3427c366af26b4fbd6765db88f846
crypto: add support for gcrypt's native XTS impl

Libgcrypt 1.8.0 added support for the XTS mode. Use this because long
term we wish to delete QEMU's XTS impl to avoid carrying private crypto
algorithm impls.

As an added benefit, using this improves performance from 531 MB/sec to
670 MB/sec, since we are avoiding several layers of function call
indirection.

This is even more noticable with the gcrypt builds in Fedora or RHEL-8
which have a non-upstream patch for FIPS mode which does mutex locking.
This is catastrophic for encryption performance with small block sizes,
meaning this patch improves encryption from 240 MB/sec to 670 MB/sec.

Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Reviewed-by: Stefano Garzarella <sgarzare@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
configure
crypto/Makefile.objs
crypto/cipher-gcrypt.c
tests/Makefile.include