summaryrefslogtreecommitdiff
path: root/crypto/block-luks.h
diff options
context:
space:
mode:
authorDaniel P. Berrange <berrange@redhat.com>2015-10-24 11:55:48 +0100
committerDaniel P. Berrange <berrange@redhat.com>2016-03-17 16:50:40 +0000
commit3e308f20edfd65a21c98eb2d8079dacd47957444 (patch)
treefc2adad357333b48dc7317340c194c55cfd3f7fb /crypto/block-luks.h
parent7d9690148ac25bc755a759adab7d63f517d092b1 (diff)
downloadqemu-3e308f20edfd65a21c98eb2d8079dacd47957444.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-luks.h')
-rw-r--r--crypto/block-luks.h28
1 files changed, 28 insertions, 0 deletions
diff --git a/crypto/block-luks.h b/crypto/block-luks.h
new file mode 100644
index 0000000000..0934138aaa
--- /dev/null
+++ b/crypto/block-luks.h
@@ -0,0 +1,28 @@
+/*
+ * QEMU Crypto block device encryption LUKS format
+ *
+ * Copyright (c) 2015-2016 Red Hat, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#ifndef QCRYPTO_BLOCK_LUKS_H__
+#define QCRYPTO_BLOCK_LUKS_H__
+
+#include "crypto/blockpriv.h"
+
+extern const QCryptoBlockDriver qcrypto_block_driver_luks;
+
+#endif /* QCRYPTO_BLOCK_LUKS_H__ */