diff options
author | Daniel P. Berrange <berrange@redhat.com> | 2016-07-22 13:53:34 +0100 |
---|---|---|
committer | Max Reitz <mreitz@redhat.com> | 2016-07-26 17:46:37 +0200 |
commit | 40c85028228d07c878cb58fc31222fb4d163a89f (patch) | |
tree | e06d68d1478a5d956e6fea4337de995665c1b21f /qapi/crypto.json | |
parent | 54a16a63d021b2e28f08082abb20b9431d3c97d3 (diff) | |
download | qemu-40c85028228d07c878cb58fc31222fb4d163a89f.zip qemu-40c85028228d07c878cb58fc31222fb4d163a89f.tar.gz qemu-40c85028228d07c878cb58fc31222fb4d163a89f.tar.bz2 |
crypto: add support for querying parameters for block encryption
When creating new block encryption volumes, we accept a list of
parameters to control the formatting process. It is useful to
be able to query what those parameters were for existing block
devices. Add a qcrypto_block_get_info() method which returns a
QCryptoBlockInfo instance to report this data.
Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
Message-id: 1469192015-16487-2-git-send-email-berrange@redhat.com
Reviewed-by: Eric Blake <eblake@redhat.com>
Signed-off-by: Max Reitz <mreitz@redhat.com>
Diffstat (limited to 'qapi/crypto.json')
-rw-r--r-- | qapi/crypto.json | 87 |
1 files changed, 87 insertions, 0 deletions
diff --git a/qapi/crypto.json b/qapi/crypto.json index 4c4a3e0..34d2583 100644 --- a/qapi/crypto.json +++ b/qapi/crypto.json @@ -224,3 +224,90 @@ 'discriminator': 'format', 'data': { 'qcow': 'QCryptoBlockOptionsQCow', 'luks': 'QCryptoBlockCreateOptionsLUKS' } } + + +## +# QCryptoBlockInfoBase: +# +# The common information that applies to all full disk +# encryption formats +# +# @format: the encryption format +# +# Since: 2.7 +## +{ 'struct': 'QCryptoBlockInfoBase', + 'data': { 'format': 'QCryptoBlockFormat' }} + + +## +# QCryptoBlockInfoLUKSSlot: +# +# Information about the LUKS block encryption key +# slot options +# +# @active: whether the key slot is currently in use +# @key-offset: offset to the key material in bytes +# @iters: #optional number of PBKDF2 iterations for key material +# @stripes: #optional number of stripes for splitting key material +# +# Since: 2.7 +## +{ 'struct': 'QCryptoBlockInfoLUKSSlot', + 'data': {'active': 'bool', + '*iters': 'int', + '*stripes': 'int', + 'key-offset': 'int' } } + + +## +# QCryptoBlockInfoLUKS: +# +# Information about the LUKS block encryption options +# +# @cipher-alg: the cipher algorithm for data encryption +# @cipher-mode: the cipher mode for data encryption +# @ivgen-alg: the initialization vector generator +# @ivgen-hash-alg: #optional the initialization vector generator hash +# @hash-alg: the master key hash algorithm +# @payload-offset: offset to the payload data in bytes +# @master-key-iters: number of PBKDF2 iterations for key material +# @uuid: unique identifier for the volume +# @slots: information about each key slot +# +# Since: 2.7 +## +{ 'struct': 'QCryptoBlockInfoLUKS', + 'data': {'cipher-alg': 'QCryptoCipherAlgorithm', + 'cipher-mode': 'QCryptoCipherMode', + 'ivgen-alg': 'QCryptoIVGenAlgorithm', + '*ivgen-hash-alg': 'QCryptoHashAlgorithm', + 'hash-alg': 'QCryptoHashAlgorithm', + 'payload-offset': 'int', + 'master-key-iters': 'int', + 'uuid': 'str', + 'slots': [ 'QCryptoBlockInfoLUKSSlot' ] }} + +## +# QCryptoBlockInfoQCow: +# +# Information about the QCow block encryption options +# +# Since: 2.7 +## +{ 'struct': 'QCryptoBlockInfoQCow', + 'data': { }} + + +## +# QCryptoBlockInfo: +# +# Information about the block encryption options +# +# Since: 2.7 +## +{ 'union': 'QCryptoBlockInfo', + 'base': 'QCryptoBlockInfoBase', + 'discriminator': 'format', + 'data': { 'qcow': 'QCryptoBlockInfoQCow', + 'luks': 'QCryptoBlockInfoLUKS' } } |