]> git.ipfire.org Git - thirdparty/qemu.git/commit
crypto: fully drop built-in cipher provider
authorDaniel P. Berrangé <berrange@redhat.com>
Tue, 6 May 2025 14:07:08 +0000 (15:07 +0100)
committerDaniel P. Berrangé <berrange@redhat.com>
Thu, 22 May 2025 10:24:25 +0000 (11:24 +0100)
commit5a56f60d7c2e241bf972b8eca31286cf7f3cd7c1
tree8e47d27f1ea06e6953c7a2d9bdbf9a4bb50be352
parent01ce649e5d260d4d1a466d10dfaeabeeb2b7478d
crypto: fully drop built-in cipher provider

When originally creating the internal crypto cipher APIs, they were
wired up to use the built-in D3DES and AES implementations, as a way
to gracefully transition to the new APIs without introducing an
immediate hard dep on any external crypto libraries for the VNC
password auth (D3DES) or the qcow2 encryption (AES).

In the 6.1.0 release we dropped the built-in D3DES impl, and also
the XTS mode for the AES impl, leaving only AES with ECB/CBC modes.
The rational was that with the system emulators, it is expected that
3rd party crypto libraries will be available.

The qcow2 LUKS impl is preferred to the legacy raw AES impl, and by
default that requires AES in XTS mode, limiting the usefulness of
the built-in cipher provider.

The built-in AES impl has known timing attacks and is only suitable
for use cases where a security boundary is already not expected to
be provided (TCG).

Providing a built-in cipher impl thus potentially misleads users,
should they configure a QEMU without any crypto library, and try
to use it with the LUKS backend, even if that requires a non-default
configuration choice.

Complete what we started in 6.1.0 and purge the remaining AES
support.

Use of either gnutls, nettle, or libcrypt is now mandatory for any
cipher support, except for TCG impls.

Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Reviewed-by: Alex Bennée <alex.bennee@linaro.org>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
crypto/cipher-builtin.c.inc [deleted file]
crypto/cipher-stub.c.inc [new file with mode: 0644]
crypto/cipher.c