summaryrefslogtreecommitdiffstats
path: root/crypto/block.c
diff options
context:
space:
mode:
authorDaniel P. Berrange <berrange@redhat.com>2015-10-24 11:55:48 +0100
committerTimothy Pearson <tpearson@raptorengineering.com>2019-11-29 19:49:38 -0600
commit91f625b9bc8e8c0a44cb52e09cd7ecc6ceee1576 (patch)
tree16a7170984de3d95e3cefd710e70dbc5a36b78f2 /crypto/block.c
parent2c52968d12d6d8366a0a5de401de055fe47eece7 (diff)
downloadhqemu-91f625b9bc8e8c0a44cb52e09cd7ecc6ceee1576.zip
hqemu-91f625b9bc8e8c0a44cb52e09cd7ecc6ceee1576.tar.gz
crypto: implement the LUKS block encryption format
Provide a block encryption implementation that follows the LUKS/dm-crypt specification. This supports all combinations of hash, cipher algorithm, cipher mode and iv generator that are implemented by the current crypto layer. There is support for opening existing volumes formatted by dm-crypt, and for formatting new volumes. In the latter case it will only use key slot 0. Reviewed-by: Eric Blake <eblake@redhat.com> Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
Diffstat (limited to 'crypto/block.c')
-rw-r--r--crypto/block.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/crypto/block.c b/crypto/block.c
index 3c27ef0..524ed91 100644
--- a/crypto/block.c
+++ b/crypto/block.c
@@ -21,9 +21,11 @@
#include "qemu/osdep.h"
#include "crypto/blockpriv.h"
#include "crypto/block-qcow.h"
+#include "crypto/block-luks.h"
static const QCryptoBlockDriver *qcrypto_block_drivers[] = {
[Q_CRYPTO_BLOCK_FORMAT_QCOW] = &qcrypto_block_driver_qcow,
+ [Q_CRYPTO_BLOCK_FORMAT_LUKS] = &qcrypto_block_driver_luks,
};
OpenPOWER on IntegriCloud