2015-03-13 20:39:26 +03:00
|
|
|
# -*- Mode: Python -*-
|
2020-07-29 21:50:24 +03:00
|
|
|
# vim: filetype=python
|
2015-03-13 20:39:26 +03:00
|
|
|
#
|
2017-01-13 17:41:23 +03:00
|
|
|
|
|
|
|
##
|
2017-08-24 22:14:08 +03:00
|
|
|
# = Cryptography
|
2017-01-13 17:41:23 +03:00
|
|
|
##
|
2015-03-13 20:39:26 +03:00
|
|
|
|
|
|
|
##
|
2016-11-17 18:54:52 +03:00
|
|
|
# @QCryptoTLSCredsEndpoint:
|
2015-03-13 20:39:26 +03:00
|
|
|
#
|
|
|
|
# The type of network endpoint that will be using the credentials.
|
|
|
|
# Most types of credential require different setup / structures
|
2023-04-28 13:54:29 +03:00
|
|
|
# depending on whether they will be used in a server versus a client.
|
2015-03-13 20:39:26 +03:00
|
|
|
#
|
|
|
|
# @client: the network endpoint is acting as the client
|
|
|
|
#
|
|
|
|
# @server: the network endpoint is acting as the server
|
|
|
|
#
|
|
|
|
# Since: 2.5
|
|
|
|
##
|
|
|
|
{ 'enum': 'QCryptoTLSCredsEndpoint',
|
|
|
|
'prefix': 'QCRYPTO_TLS_CREDS_ENDPOINT',
|
|
|
|
'data': ['client', 'server']}
|
crypto: add QCryptoSecret object class for password/key handling
Introduce a new QCryptoSecret object class which will be used
for providing passwords and keys to other objects which need
sensitive credentials.
The new object can provide secret values directly as properties,
or indirectly via a file. The latter includes support for file
descriptor passing syntax on UNIX platforms. Ordinarily passing
secret values directly as properties is insecure, since they
are visible in process listings, or in log files showing the
CLI args / QMP commands. It is possible to use AES-256-CBC to
encrypt the secret values though, in which case all that is
visible is the ciphertext. For ad hoc developer testing though,
it is fine to provide the secrets directly without encryption
so this is not explicitly forbidden.
The anticipated scenario is that libvirtd will create a random
master key per QEMU instance (eg /var/run/libvirt/qemu/$VMNAME.key)
and will use that key to encrypt all passwords it provides to
QEMU via '-object secret,....'. This avoids the need for libvirt
(or other mgmt apps) to worry about file descriptor passing.
It also makes life easier for people who are scripting the
management of QEMU, for whom FD passing is significantly more
complex.
Providing data inline (insecure, only for ad hoc dev testing)
$QEMU -object secret,id=sec0,data=letmein
Providing data indirectly in raw format
printf "letmein" > mypasswd.txt
$QEMU -object secret,id=sec0,file=mypasswd.txt
Providing data indirectly in base64 format
$QEMU -object secret,id=sec0,file=mykey.b64,format=base64
Providing data with encryption
$QEMU -object secret,id=master0,file=mykey.b64,format=base64 \
-object secret,id=sec0,data=[base64 ciphertext],\
keyid=master0,iv=[base64 IV],format=base64
Note that 'format' here refers to the format of the ciphertext
data. The decrypted data must always be in raw byte format.
More examples are shown in the updated docs.
Reviewed-by: Eric Blake <eblake@redhat.com>
Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
2015-10-14 11:58:38 +03:00
|
|
|
|
|
|
|
##
|
2016-11-17 18:54:52 +03:00
|
|
|
# @QCryptoSecretFormat:
|
crypto: add QCryptoSecret object class for password/key handling
Introduce a new QCryptoSecret object class which will be used
for providing passwords and keys to other objects which need
sensitive credentials.
The new object can provide secret values directly as properties,
or indirectly via a file. The latter includes support for file
descriptor passing syntax on UNIX platforms. Ordinarily passing
secret values directly as properties is insecure, since they
are visible in process listings, or in log files showing the
CLI args / QMP commands. It is possible to use AES-256-CBC to
encrypt the secret values though, in which case all that is
visible is the ciphertext. For ad hoc developer testing though,
it is fine to provide the secrets directly without encryption
so this is not explicitly forbidden.
The anticipated scenario is that libvirtd will create a random
master key per QEMU instance (eg /var/run/libvirt/qemu/$VMNAME.key)
and will use that key to encrypt all passwords it provides to
QEMU via '-object secret,....'. This avoids the need for libvirt
(or other mgmt apps) to worry about file descriptor passing.
It also makes life easier for people who are scripting the
management of QEMU, for whom FD passing is significantly more
complex.
Providing data inline (insecure, only for ad hoc dev testing)
$QEMU -object secret,id=sec0,data=letmein
Providing data indirectly in raw format
printf "letmein" > mypasswd.txt
$QEMU -object secret,id=sec0,file=mypasswd.txt
Providing data indirectly in base64 format
$QEMU -object secret,id=sec0,file=mykey.b64,format=base64
Providing data with encryption
$QEMU -object secret,id=master0,file=mykey.b64,format=base64 \
-object secret,id=sec0,data=[base64 ciphertext],\
keyid=master0,iv=[base64 IV],format=base64
Note that 'format' here refers to the format of the ciphertext
data. The decrypted data must always be in raw byte format.
More examples are shown in the updated docs.
Reviewed-by: Eric Blake <eblake@redhat.com>
Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
2015-10-14 11:58:38 +03:00
|
|
|
#
|
|
|
|
# The data format that the secret is provided in
|
|
|
|
#
|
2023-04-28 13:54:29 +03:00
|
|
|
# @raw: raw bytes. When encoded in JSON only valid UTF-8 sequences
|
|
|
|
# can be used
|
|
|
|
#
|
crypto: add QCryptoSecret object class for password/key handling
Introduce a new QCryptoSecret object class which will be used
for providing passwords and keys to other objects which need
sensitive credentials.
The new object can provide secret values directly as properties,
or indirectly via a file. The latter includes support for file
descriptor passing syntax on UNIX platforms. Ordinarily passing
secret values directly as properties is insecure, since they
are visible in process listings, or in log files showing the
CLI args / QMP commands. It is possible to use AES-256-CBC to
encrypt the secret values though, in which case all that is
visible is the ciphertext. For ad hoc developer testing though,
it is fine to provide the secrets directly without encryption
so this is not explicitly forbidden.
The anticipated scenario is that libvirtd will create a random
master key per QEMU instance (eg /var/run/libvirt/qemu/$VMNAME.key)
and will use that key to encrypt all passwords it provides to
QEMU via '-object secret,....'. This avoids the need for libvirt
(or other mgmt apps) to worry about file descriptor passing.
It also makes life easier for people who are scripting the
management of QEMU, for whom FD passing is significantly more
complex.
Providing data inline (insecure, only for ad hoc dev testing)
$QEMU -object secret,id=sec0,data=letmein
Providing data indirectly in raw format
printf "letmein" > mypasswd.txt
$QEMU -object secret,id=sec0,file=mypasswd.txt
Providing data indirectly in base64 format
$QEMU -object secret,id=sec0,file=mykey.b64,format=base64
Providing data with encryption
$QEMU -object secret,id=master0,file=mykey.b64,format=base64 \
-object secret,id=sec0,data=[base64 ciphertext],\
keyid=master0,iv=[base64 IV],format=base64
Note that 'format' here refers to the format of the ciphertext
data. The decrypted data must always be in raw byte format.
More examples are shown in the updated docs.
Reviewed-by: Eric Blake <eblake@redhat.com>
Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
2015-10-14 11:58:38 +03:00
|
|
|
# @base64: arbitrary base64 encoded binary data
|
2022-05-03 10:37:32 +03:00
|
|
|
#
|
crypto: add QCryptoSecret object class for password/key handling
Introduce a new QCryptoSecret object class which will be used
for providing passwords and keys to other objects which need
sensitive credentials.
The new object can provide secret values directly as properties,
or indirectly via a file. The latter includes support for file
descriptor passing syntax on UNIX platforms. Ordinarily passing
secret values directly as properties is insecure, since they
are visible in process listings, or in log files showing the
CLI args / QMP commands. It is possible to use AES-256-CBC to
encrypt the secret values though, in which case all that is
visible is the ciphertext. For ad hoc developer testing though,
it is fine to provide the secrets directly without encryption
so this is not explicitly forbidden.
The anticipated scenario is that libvirtd will create a random
master key per QEMU instance (eg /var/run/libvirt/qemu/$VMNAME.key)
and will use that key to encrypt all passwords it provides to
QEMU via '-object secret,....'. This avoids the need for libvirt
(or other mgmt apps) to worry about file descriptor passing.
It also makes life easier for people who are scripting the
management of QEMU, for whom FD passing is significantly more
complex.
Providing data inline (insecure, only for ad hoc dev testing)
$QEMU -object secret,id=sec0,data=letmein
Providing data indirectly in raw format
printf "letmein" > mypasswd.txt
$QEMU -object secret,id=sec0,file=mypasswd.txt
Providing data indirectly in base64 format
$QEMU -object secret,id=sec0,file=mykey.b64,format=base64
Providing data with encryption
$QEMU -object secret,id=master0,file=mykey.b64,format=base64 \
-object secret,id=sec0,data=[base64 ciphertext],\
keyid=master0,iv=[base64 IV],format=base64
Note that 'format' here refers to the format of the ciphertext
data. The decrypted data must always be in raw byte format.
More examples are shown in the updated docs.
Reviewed-by: Eric Blake <eblake@redhat.com>
Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
2015-10-14 11:58:38 +03:00
|
|
|
# Since: 2.6
|
|
|
|
##
|
|
|
|
{ 'enum': 'QCryptoSecretFormat',
|
|
|
|
'prefix': 'QCRYPTO_SECRET_FORMAT',
|
|
|
|
'data': ['raw', 'base64']}
|
2015-11-19 20:09:01 +03:00
|
|
|
|
|
|
|
##
|
2016-11-17 18:54:52 +03:00
|
|
|
# @QCryptoHashAlgorithm:
|
2015-11-19 20:09:01 +03:00
|
|
|
#
|
|
|
|
# The supported algorithms for computing content digests
|
|
|
|
#
|
|
|
|
# @md5: MD5. Should not be used in any new code, legacy compat only
|
2023-04-28 13:54:29 +03:00
|
|
|
#
|
2015-11-19 20:09:01 +03:00
|
|
|
# @sha1: SHA-1. Should not be used in any new code, legacy compat only
|
2023-04-28 13:54:29 +03:00
|
|
|
#
|
2024-03-22 17:09:09 +03:00
|
|
|
# @sha224: SHA-224. (since 2.7)
|
2023-04-28 13:54:29 +03:00
|
|
|
#
|
2015-11-19 20:09:01 +03:00
|
|
|
# @sha256: SHA-256. Current recommended strong hash.
|
2023-04-28 13:54:29 +03:00
|
|
|
#
|
2024-03-22 17:09:09 +03:00
|
|
|
# @sha384: SHA-384. (since 2.7)
|
2023-04-28 13:54:29 +03:00
|
|
|
#
|
2024-03-22 17:09:09 +03:00
|
|
|
# @sha512: SHA-512. (since 2.7)
|
2023-04-28 13:54:29 +03:00
|
|
|
#
|
2024-03-22 17:09:09 +03:00
|
|
|
# @ripemd160: RIPEMD-160. (since 2.7)
|
2022-05-03 10:37:32 +03:00
|
|
|
#
|
2015-11-19 20:09:01 +03:00
|
|
|
# Since: 2.6
|
|
|
|
##
|
|
|
|
{ 'enum': 'QCryptoHashAlgorithm',
|
|
|
|
'prefix': 'QCRYPTO_HASH_ALG',
|
2016-03-11 21:33:08 +03:00
|
|
|
'data': ['md5', 'sha1', 'sha224', 'sha256', 'sha384', 'sha512', 'ripemd160']}
|
2015-11-19 20:09:01 +03:00
|
|
|
|
|
|
|
##
|
2016-11-17 18:54:52 +03:00
|
|
|
# @QCryptoCipherAlgorithm:
|
2015-11-19 20:09:01 +03:00
|
|
|
#
|
|
|
|
# The supported algorithms for content encryption ciphers
|
|
|
|
#
|
|
|
|
# @aes-128: AES with 128 bit / 16 byte keys
|
2023-04-28 13:54:29 +03:00
|
|
|
#
|
2015-11-19 20:09:01 +03:00
|
|
|
# @aes-192: AES with 192 bit / 24 byte keys
|
2023-04-28 13:54:29 +03:00
|
|
|
#
|
2015-11-19 20:09:01 +03:00
|
|
|
# @aes-256: AES with 256 bit / 32 byte keys
|
2023-04-28 13:54:29 +03:00
|
|
|
#
|
|
|
|
# @des: DES with 56 bit / 8 byte keys. Do not use except in VNC.
|
|
|
|
# (since 6.1)
|
|
|
|
#
|
2016-12-08 05:33:28 +03:00
|
|
|
# @3des: 3DES(EDE) with 192 bit / 24 byte keys (since 2.9)
|
2023-04-28 13:54:29 +03:00
|
|
|
#
|
2016-02-10 20:07:42 +03:00
|
|
|
# @cast5-128: Cast5 with 128 bit / 16 byte keys
|
2023-04-28 13:54:29 +03:00
|
|
|
#
|
2016-02-10 20:07:42 +03:00
|
|
|
# @serpent-128: Serpent with 128 bit / 16 byte keys
|
2023-04-28 13:54:29 +03:00
|
|
|
#
|
2016-02-10 20:07:42 +03:00
|
|
|
# @serpent-192: Serpent with 192 bit / 24 byte keys
|
2023-04-28 13:54:29 +03:00
|
|
|
#
|
2016-02-10 20:07:42 +03:00
|
|
|
# @serpent-256: Serpent with 256 bit / 32 byte keys
|
2023-04-28 13:54:29 +03:00
|
|
|
#
|
2016-02-10 20:07:42 +03:00
|
|
|
# @twofish-128: Twofish with 128 bit / 16 byte keys
|
2023-04-28 13:54:29 +03:00
|
|
|
#
|
2016-02-10 20:07:42 +03:00
|
|
|
# @twofish-192: Twofish with 192 bit / 24 byte keys
|
2023-04-28 13:54:29 +03:00
|
|
|
#
|
2016-02-10 20:07:42 +03:00
|
|
|
# @twofish-256: Twofish with 256 bit / 32 byte keys
|
2022-05-03 10:37:32 +03:00
|
|
|
#
|
2023-12-07 18:47:35 +03:00
|
|
|
# @sm4: SM4 with 128 bit / 16 byte keys (since 9.0)
|
|
|
|
#
|
2015-11-19 20:09:01 +03:00
|
|
|
# Since: 2.6
|
|
|
|
##
|
|
|
|
{ 'enum': 'QCryptoCipherAlgorithm',
|
|
|
|
'prefix': 'QCRYPTO_CIPHER_ALG',
|
2016-02-10 20:07:42 +03:00
|
|
|
'data': ['aes-128', 'aes-192', 'aes-256',
|
crypto: replace 'des-rfb' cipher with 'des'
Currently the crypto layer exposes support for a 'des-rfb'
algorithm which is just normal single-DES, with the bits
in each key byte reversed. This special key munging is
required by the RFB protocol password authentication
mechanism.
Since the crypto layer is generic shared code, it makes
more sense to do the key byte munging in the VNC server
code, and expose normal single-DES support.
Replacing cipher 'des-rfb' by 'des' looks like an incompatible
interface change, but it doesn't matter. While the QMP schema
allows any QCryptoCipherAlgorithm for the 'cipher-alg' field
in QCryptoBlockCreateOptionsLUKS, the code restricts what can
be used at runtime. Thus the only effect is a change in error
message.
Original behaviour:
$ qemu-img create -f luks --object secret,id=sec0,data=123 -o cipher-alg=des-rfb,key-secret=sec0 demo.luks 1G
Formatting 'demo.luks', fmt=luks size=1073741824 key-secret=sec0 cipher-alg=des-rfb
qemu-img: demo.luks: Algorithm 'des-rfb' not supported
New behaviour:
$ qemu-img create -f luks --object secret,id=sec0,data=123 -o cipher-alg=des-rfb,key-secret=sec0 demo.luks 1G
Formatting 'demo.luks', fmt=luks size=1073741824 key-secret=sec0 cipher-alg=des-fish
qemu-img: demo.luks: Invalid parameter 'des-rfb'
Reviewed-by: Markus Armbruster <armbru@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2021-06-29 16:25:32 +03:00
|
|
|
'des', '3des',
|
2016-02-10 20:07:42 +03:00
|
|
|
'cast5-128',
|
2016-02-10 20:07:42 +03:00
|
|
|
'serpent-128', 'serpent-192', 'serpent-256',
|
2023-12-07 18:47:35 +03:00
|
|
|
'twofish-128', 'twofish-192', 'twofish-256',
|
|
|
|
'sm4']}
|
2015-11-19 20:09:01 +03:00
|
|
|
|
|
|
|
##
|
2016-11-17 18:54:52 +03:00
|
|
|
# @QCryptoCipherMode:
|
2015-11-19 20:09:01 +03:00
|
|
|
#
|
|
|
|
# The supported modes for content encryption ciphers
|
|
|
|
#
|
|
|
|
# @ecb: Electronic Code Book
|
2023-04-28 13:54:29 +03:00
|
|
|
#
|
2015-11-19 20:09:01 +03:00
|
|
|
# @cbc: Cipher Block Chaining
|
2023-04-28 13:54:29 +03:00
|
|
|
#
|
2016-02-11 17:05:21 +03:00
|
|
|
# @xts: XEX with tweaked code book and ciphertext stealing
|
2023-04-28 13:54:29 +03:00
|
|
|
#
|
2016-09-26 12:23:22 +03:00
|
|
|
# @ctr: Counter (Since 2.8)
|
2022-05-03 10:37:32 +03:00
|
|
|
#
|
2015-11-19 20:09:01 +03:00
|
|
|
# Since: 2.6
|
|
|
|
##
|
|
|
|
{ 'enum': 'QCryptoCipherMode',
|
|
|
|
'prefix': 'QCRYPTO_CIPHER_MODE',
|
2016-09-26 12:23:22 +03:00
|
|
|
'data': ['ecb', 'cbc', 'xts', 'ctr']}
|
2015-10-15 14:35:28 +03:00
|
|
|
|
|
|
|
##
|
2016-11-17 18:54:52 +03:00
|
|
|
# @QCryptoIVGenAlgorithm:
|
2015-10-15 14:35:28 +03:00
|
|
|
#
|
2023-04-28 13:54:29 +03:00
|
|
|
# The supported algorithms for generating initialization vectors for
|
|
|
|
# full disk encryption. The 'plain' generator should not be used for
|
|
|
|
# disks with sector numbers larger than 2^32, except where
|
|
|
|
# compatibility with pre-existing Linux dm-crypt volumes is required.
|
2015-10-15 14:35:28 +03:00
|
|
|
#
|
|
|
|
# @plain: 64-bit sector number truncated to 32-bits
|
2023-04-28 13:54:29 +03:00
|
|
|
#
|
2015-10-15 14:35:28 +03:00
|
|
|
# @plain64: 64-bit sector number
|
2023-04-28 13:54:29 +03:00
|
|
|
#
|
|
|
|
# @essiv: 64-bit sector number encrypted with a hash of the encryption
|
|
|
|
# key
|
2022-05-03 10:37:32 +03:00
|
|
|
#
|
2015-10-15 14:35:28 +03:00
|
|
|
# Since: 2.6
|
|
|
|
##
|
|
|
|
{ 'enum': 'QCryptoIVGenAlgorithm',
|
|
|
|
'prefix': 'QCRYPTO_IVGEN_ALG',
|
|
|
|
'data': ['plain', 'plain64', 'essiv']}
|
2015-10-24 13:44:13 +03:00
|
|
|
|
|
|
|
##
|
2016-11-17 18:54:52 +03:00
|
|
|
# @QCryptoBlockFormat:
|
2015-10-24 13:44:13 +03:00
|
|
|
#
|
|
|
|
# The supported full disk encryption formats
|
|
|
|
#
|
2023-04-28 13:54:29 +03:00
|
|
|
# @qcow: QCow/QCow2 built-in AES-CBC encryption. Use only for
|
|
|
|
# liberating data from old images.
|
|
|
|
#
|
|
|
|
# @luks: LUKS encryption format. Recommended for new images
|
2015-10-24 13:44:13 +03:00
|
|
|
#
|
|
|
|
# Since: 2.6
|
|
|
|
##
|
|
|
|
{ 'enum': 'QCryptoBlockFormat',
|
|
|
|
# 'prefix': 'QCRYPTO_BLOCK_FORMAT',
|
2015-10-24 13:55:48 +03:00
|
|
|
'data': ['qcow', 'luks']}
|
2015-10-24 13:44:13 +03:00
|
|
|
|
|
|
|
##
|
2016-11-17 18:54:52 +03:00
|
|
|
# @QCryptoBlockOptionsBase:
|
2015-10-24 13:44:13 +03:00
|
|
|
#
|
2023-04-28 13:54:29 +03:00
|
|
|
# The common options that apply to all full disk encryption formats
|
2015-10-24 13:44:13 +03:00
|
|
|
#
|
|
|
|
# @format: the encryption format
|
|
|
|
#
|
|
|
|
# Since: 2.6
|
|
|
|
##
|
|
|
|
{ 'struct': 'QCryptoBlockOptionsBase',
|
|
|
|
'data': { 'format': 'QCryptoBlockFormat' }}
|
|
|
|
|
|
|
|
##
|
2016-11-17 18:54:52 +03:00
|
|
|
# @QCryptoBlockOptionsQCow:
|
2015-10-24 13:44:13 +03:00
|
|
|
#
|
|
|
|
# The options that apply to QCow/QCow2 AES-CBC encryption format
|
|
|
|
#
|
2017-03-15 15:57:06 +03:00
|
|
|
# @key-secret: the ID of a QCryptoSecret object providing the
|
2023-04-28 13:54:29 +03:00
|
|
|
# decryption key. Mandatory except when probing image for
|
|
|
|
# metadata only.
|
2015-10-24 13:44:13 +03:00
|
|
|
#
|
|
|
|
# Since: 2.6
|
|
|
|
##
|
|
|
|
{ 'struct': 'QCryptoBlockOptionsQCow',
|
|
|
|
'data': { '*key-secret': 'str' }}
|
|
|
|
|
2015-10-24 13:55:48 +03:00
|
|
|
##
|
2016-11-17 18:54:52 +03:00
|
|
|
# @QCryptoBlockOptionsLUKS:
|
2015-10-24 13:55:48 +03:00
|
|
|
#
|
|
|
|
# The options that apply to LUKS encryption format
|
|
|
|
#
|
2017-03-15 15:57:06 +03:00
|
|
|
# @key-secret: the ID of a QCryptoSecret object providing the
|
2023-04-28 13:54:29 +03:00
|
|
|
# decryption key. Mandatory except when probing image for
|
|
|
|
# metadata only.
|
2022-05-03 10:37:32 +03:00
|
|
|
#
|
2015-10-24 13:55:48 +03:00
|
|
|
# Since: 2.6
|
|
|
|
##
|
|
|
|
{ 'struct': 'QCryptoBlockOptionsLUKS',
|
|
|
|
'data': { '*key-secret': 'str' }}
|
|
|
|
|
|
|
|
##
|
2016-11-17 18:54:52 +03:00
|
|
|
# @QCryptoBlockCreateOptionsLUKS:
|
2015-10-24 13:55:48 +03:00
|
|
|
#
|
|
|
|
# The options that apply to LUKS encryption format initialization
|
|
|
|
#
|
2023-04-28 13:54:29 +03:00
|
|
|
# @cipher-alg: the cipher algorithm for data encryption Currently
|
|
|
|
# defaults to 'aes-256'.
|
|
|
|
#
|
|
|
|
# @cipher-mode: the cipher mode for data encryption Currently defaults
|
|
|
|
# to 'xts'
|
|
|
|
#
|
|
|
|
# @ivgen-alg: the initialization vector generator Currently defaults
|
|
|
|
# to 'plain64'
|
|
|
|
#
|
|
|
|
# @ivgen-hash-alg: the initialization vector generator hash Currently
|
|
|
|
# defaults to 'sha256'
|
|
|
|
#
|
|
|
|
# @hash-alg: the master key hash algorithm Currently defaults to
|
|
|
|
# 'sha256'
|
|
|
|
#
|
|
|
|
# @iter-time: number of milliseconds to spend in PBKDF passphrase
|
2024-03-22 17:09:09 +03:00
|
|
|
# processing. Currently defaults to 2000. (since 2.8)
|
2022-05-03 10:37:32 +03:00
|
|
|
#
|
2015-10-24 13:55:48 +03:00
|
|
|
# Since: 2.6
|
|
|
|
##
|
|
|
|
{ 'struct': 'QCryptoBlockCreateOptionsLUKS',
|
|
|
|
'base': 'QCryptoBlockOptionsLUKS',
|
|
|
|
'data': { '*cipher-alg': 'QCryptoCipherAlgorithm',
|
|
|
|
'*cipher-mode': 'QCryptoCipherMode',
|
|
|
|
'*ivgen-alg': 'QCryptoIVGenAlgorithm',
|
|
|
|
'*ivgen-hash-alg': 'QCryptoHashAlgorithm',
|
2016-09-06 20:43:00 +03:00
|
|
|
'*hash-alg': 'QCryptoHashAlgorithm',
|
2024-02-19 18:12:59 +03:00
|
|
|
'*iter-time': 'int' }}
|
2015-10-24 13:55:48 +03:00
|
|
|
|
2015-10-24 13:44:13 +03:00
|
|
|
##
|
2016-11-17 18:54:52 +03:00
|
|
|
# @QCryptoBlockOpenOptions:
|
2015-10-24 13:44:13 +03:00
|
|
|
#
|
2023-04-28 13:54:29 +03:00
|
|
|
# The options that are available for all encryption formats when
|
|
|
|
# opening an existing volume
|
2015-10-24 13:44:13 +03:00
|
|
|
#
|
|
|
|
# Since: 2.6
|
|
|
|
##
|
|
|
|
{ 'union': 'QCryptoBlockOpenOptions',
|
|
|
|
'base': 'QCryptoBlockOptionsBase',
|
|
|
|
'discriminator': 'format',
|
2015-10-24 13:55:48 +03:00
|
|
|
'data': { 'qcow': 'QCryptoBlockOptionsQCow',
|
|
|
|
'luks': 'QCryptoBlockOptionsLUKS' } }
|
2015-10-24 13:44:13 +03:00
|
|
|
|
|
|
|
##
|
2016-11-17 18:54:52 +03:00
|
|
|
# @QCryptoBlockCreateOptions:
|
2015-10-24 13:44:13 +03:00
|
|
|
#
|
2023-04-28 13:54:29 +03:00
|
|
|
# The options that are available for all encryption formats when
|
|
|
|
# initializing a new volume
|
2015-10-24 13:44:13 +03:00
|
|
|
#
|
|
|
|
# Since: 2.6
|
|
|
|
##
|
|
|
|
{ 'union': 'QCryptoBlockCreateOptions',
|
|
|
|
'base': 'QCryptoBlockOptionsBase',
|
|
|
|
'discriminator': 'format',
|
2015-10-24 13:55:48 +03:00
|
|
|
'data': { 'qcow': 'QCryptoBlockOptionsQCow',
|
|
|
|
'luks': 'QCryptoBlockCreateOptionsLUKS' } }
|
2016-07-22 15:53:34 +03:00
|
|
|
|
|
|
|
##
|
2016-11-17 18:54:52 +03:00
|
|
|
# @QCryptoBlockInfoBase:
|
2016-07-22 15:53:34 +03:00
|
|
|
#
|
2023-04-28 13:54:29 +03:00
|
|
|
# The common information that applies to all full disk encryption
|
|
|
|
# formats
|
2016-07-22 15:53:34 +03:00
|
|
|
#
|
|
|
|
# @format: the encryption format
|
|
|
|
#
|
|
|
|
# Since: 2.7
|
|
|
|
##
|
|
|
|
{ 'struct': 'QCryptoBlockInfoBase',
|
|
|
|
'data': { 'format': 'QCryptoBlockFormat' }}
|
|
|
|
|
|
|
|
##
|
2016-11-17 18:54:52 +03:00
|
|
|
# @QCryptoBlockInfoLUKSSlot:
|
2016-07-22 15:53:34 +03:00
|
|
|
#
|
2023-04-28 13:54:29 +03:00
|
|
|
# Information about the LUKS block encryption key slot options
|
2016-07-22 15:53:34 +03:00
|
|
|
#
|
|
|
|
# @active: whether the key slot is currently in use
|
2023-04-28 13:54:29 +03:00
|
|
|
#
|
2016-07-22 15:53:34 +03:00
|
|
|
# @key-offset: offset to the key material in bytes
|
2023-04-28 13:54:29 +03:00
|
|
|
#
|
2017-03-15 15:57:06 +03:00
|
|
|
# @iters: number of PBKDF2 iterations for key material
|
2023-04-28 13:54:29 +03:00
|
|
|
#
|
2017-03-15 15:57:06 +03:00
|
|
|
# @stripes: number of stripes for splitting key material
|
2016-07-22 15:53:34 +03:00
|
|
|
#
|
|
|
|
# Since: 2.7
|
|
|
|
##
|
|
|
|
{ 'struct': 'QCryptoBlockInfoLUKSSlot',
|
|
|
|
'data': {'active': 'bool',
|
|
|
|
'*iters': 'int',
|
|
|
|
'*stripes': 'int',
|
|
|
|
'key-offset': 'int' } }
|
|
|
|
|
|
|
|
##
|
2016-11-17 18:54:52 +03:00
|
|
|
# @QCryptoBlockInfoLUKS:
|
2016-07-22 15:53:34 +03:00
|
|
|
#
|
|
|
|
# Information about the LUKS block encryption options
|
|
|
|
#
|
|
|
|
# @cipher-alg: the cipher algorithm for data encryption
|
2023-04-28 13:54:29 +03:00
|
|
|
#
|
2016-07-22 15:53:34 +03:00
|
|
|
# @cipher-mode: the cipher mode for data encryption
|
2023-04-28 13:54:29 +03:00
|
|
|
#
|
2016-07-22 15:53:34 +03:00
|
|
|
# @ivgen-alg: the initialization vector generator
|
2023-04-28 13:54:29 +03:00
|
|
|
#
|
2017-03-15 15:57:06 +03:00
|
|
|
# @ivgen-hash-alg: the initialization vector generator hash
|
2023-04-28 13:54:29 +03:00
|
|
|
#
|
2016-07-22 15:53:34 +03:00
|
|
|
# @hash-alg: the master key hash algorithm
|
2023-04-28 13:54:29 +03:00
|
|
|
#
|
2024-01-30 08:37:24 +03:00
|
|
|
# @detached-header: whether the LUKS header is detached (Since 9.0)
|
|
|
|
#
|
2016-07-22 15:53:34 +03:00
|
|
|
# @payload-offset: offset to the payload data in bytes
|
2023-04-28 13:54:29 +03:00
|
|
|
#
|
2016-07-22 15:53:34 +03:00
|
|
|
# @master-key-iters: number of PBKDF2 iterations for key material
|
2023-04-28 13:54:29 +03:00
|
|
|
#
|
2016-07-22 15:53:34 +03:00
|
|
|
# @uuid: unique identifier for the volume
|
2023-04-28 13:54:29 +03:00
|
|
|
#
|
2016-07-22 15:53:34 +03:00
|
|
|
# @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',
|
2024-01-30 08:37:24 +03:00
|
|
|
'detached-header': 'bool',
|
2016-07-22 15:53:34 +03:00
|
|
|
'payload-offset': 'int',
|
|
|
|
'master-key-iters': 'int',
|
|
|
|
'uuid': 'str',
|
|
|
|
'slots': [ 'QCryptoBlockInfoLUKSSlot' ] }}
|
|
|
|
|
|
|
|
##
|
2016-11-17 18:54:52 +03:00
|
|
|
# @QCryptoBlockInfo:
|
2016-07-22 15:53:34 +03:00
|
|
|
#
|
|
|
|
# Information about the block encryption options
|
|
|
|
#
|
|
|
|
# Since: 2.7
|
|
|
|
##
|
|
|
|
{ 'union': 'QCryptoBlockInfo',
|
|
|
|
'base': 'QCryptoBlockInfoBase',
|
|
|
|
'discriminator': 'format',
|
2018-06-18 11:40:06 +03:00
|
|
|
'data': { 'luks': 'QCryptoBlockInfoLUKS' } }
|
2020-06-25 15:55:36 +03:00
|
|
|
|
2020-06-25 15:55:37 +03:00
|
|
|
##
|
|
|
|
# @QCryptoBlockLUKSKeyslotState:
|
|
|
|
#
|
|
|
|
# Defines state of keyslots that are affected by the update
|
|
|
|
#
|
2022-05-03 10:37:36 +03:00
|
|
|
# @active: The slots contain the given password and marked as active
|
2023-04-28 13:54:29 +03:00
|
|
|
#
|
|
|
|
# @inactive: The slots are erased (contain garbage) and marked as
|
|
|
|
# inactive
|
2020-06-25 15:55:37 +03:00
|
|
|
#
|
|
|
|
# Since: 5.1
|
|
|
|
##
|
|
|
|
{ 'enum': 'QCryptoBlockLUKSKeyslotState',
|
|
|
|
'data': [ 'active', 'inactive' ] }
|
|
|
|
|
|
|
|
##
|
|
|
|
# @QCryptoBlockAmendOptionsLUKS:
|
|
|
|
#
|
2023-04-28 13:54:29 +03:00
|
|
|
# This struct defines the update parameters that activate/de-activate
|
|
|
|
# set of keyslots
|
2020-06-25 15:55:37 +03:00
|
|
|
#
|
|
|
|
# @state: the desired state of the keyslots
|
|
|
|
#
|
2023-04-28 13:54:29 +03:00
|
|
|
# @new-secret: The ID of a QCryptoSecret object providing the password
|
|
|
|
# to be written into added active keyslots
|
2020-06-25 15:55:37 +03:00
|
|
|
#
|
2023-04-28 13:54:29 +03:00
|
|
|
# @old-secret: Optional (for deactivation only) If given will
|
|
|
|
# deactivate all keyslots that match password located in
|
|
|
|
# QCryptoSecret with this ID
|
2020-06-25 15:55:37 +03:00
|
|
|
#
|
2023-04-28 13:54:29 +03:00
|
|
|
# @iter-time: Optional (for activation only) Number of milliseconds to
|
|
|
|
# spend in PBKDF passphrase processing for the newly activated
|
|
|
|
# keyslot. Currently defaults to 2000.
|
2020-06-25 15:55:37 +03:00
|
|
|
#
|
2023-04-28 13:54:29 +03:00
|
|
|
# @keyslot: Optional. ID of the keyslot to activate/deactivate. For
|
|
|
|
# keyslot activation, keyslot should not be active already (this
|
|
|
|
# is unsafe to update an active keyslot), but possible if 'force'
|
|
|
|
# parameter is given. If keyslot is not given, first free keyslot
|
|
|
|
# will be written.
|
2020-06-25 15:55:37 +03:00
|
|
|
#
|
2023-04-28 13:54:29 +03:00
|
|
|
# For keyslot deactivation, this parameter specifies the exact
|
|
|
|
# keyslot to deactivate
|
2020-06-25 15:55:37 +03:00
|
|
|
#
|
2023-04-28 13:54:29 +03:00
|
|
|
# @secret: Optional. The ID of a QCryptoSecret object providing the
|
|
|
|
# password to use to retrieve current master key. Defaults to the
|
|
|
|
# same secret that was used to open the image
|
2020-06-25 15:55:37 +03:00
|
|
|
#
|
2022-04-22 16:28:07 +03:00
|
|
|
# Since: 5.1
|
2020-06-25 15:55:37 +03:00
|
|
|
##
|
|
|
|
{ 'struct': 'QCryptoBlockAmendOptionsLUKS',
|
|
|
|
'data': { 'state': 'QCryptoBlockLUKSKeyslotState',
|
|
|
|
'*new-secret': 'str',
|
|
|
|
'*old-secret': 'str',
|
|
|
|
'*keyslot': 'int',
|
|
|
|
'*iter-time': 'int',
|
|
|
|
'*secret': 'str' } }
|
2020-06-25 15:55:36 +03:00
|
|
|
|
|
|
|
##
|
|
|
|
# @QCryptoBlockAmendOptions:
|
|
|
|
#
|
2023-04-28 13:54:29 +03:00
|
|
|
# The options that are available for all encryption formats when
|
|
|
|
# amending encryption settings
|
2020-06-25 15:55:36 +03:00
|
|
|
#
|
|
|
|
# Since: 5.1
|
|
|
|
##
|
|
|
|
{ 'union': 'QCryptoBlockAmendOptions',
|
|
|
|
'base': 'QCryptoBlockOptionsBase',
|
|
|
|
'discriminator': 'format',
|
|
|
|
'data': {
|
2020-06-25 15:55:37 +03:00
|
|
|
'luks': 'QCryptoBlockAmendOptionsLUKS' } }
|
2020-10-20 13:47:58 +03:00
|
|
|
|
|
|
|
##
|
|
|
|
# @SecretCommonProperties:
|
|
|
|
#
|
|
|
|
# Properties for objects of classes derived from secret-common.
|
|
|
|
#
|
2023-04-28 13:54:29 +03:00
|
|
|
# @loaded: if true, the secret is loaded immediately when applying
|
|
|
|
# this option and will probably fail when processing the next
|
|
|
|
# option. Don't use; only provided for compatibility.
|
|
|
|
# (default: false)
|
2020-10-20 13:47:58 +03:00
|
|
|
#
|
2023-04-28 13:54:29 +03:00
|
|
|
# @format: the data format that the secret is provided in
|
|
|
|
# (default: raw)
|
2020-10-20 13:47:58 +03:00
|
|
|
#
|
2023-04-28 13:54:29 +03:00
|
|
|
# @keyid: the name of another secret that should be used to decrypt
|
|
|
|
# the provided data. If not present, the data is assumed to be
|
|
|
|
# unencrypted.
|
2020-10-20 13:47:58 +03:00
|
|
|
#
|
2023-04-28 13:54:29 +03:00
|
|
|
# @iv: the random initialization vector used for encryption of this
|
|
|
|
# particular secret. Should be a base64 encrypted string of the
|
|
|
|
# 16-byte IV. Mandatory if @keyid is given. Ignored if @keyid is
|
|
|
|
# absent.
|
2020-10-20 13:47:58 +03:00
|
|
|
#
|
|
|
|
# Features:
|
2023-04-28 13:54:29 +03:00
|
|
|
#
|
|
|
|
# @deprecated: Member @loaded is deprecated. Setting true doesn't
|
|
|
|
# make sense, and false is already the default.
|
2020-10-20 13:47:58 +03:00
|
|
|
#
|
|
|
|
# Since: 2.6
|
|
|
|
##
|
|
|
|
{ 'struct': 'SecretCommonProperties',
|
|
|
|
'data': { '*loaded': { 'type': 'bool', 'features': ['deprecated'] },
|
|
|
|
'*format': 'QCryptoSecretFormat',
|
|
|
|
'*keyid': 'str',
|
|
|
|
'*iv': 'str' } }
|
|
|
|
|
|
|
|
##
|
|
|
|
# @SecretProperties:
|
|
|
|
#
|
|
|
|
# Properties for secret objects.
|
|
|
|
#
|
|
|
|
# Either @data or @file must be provided, but not both.
|
|
|
|
#
|
|
|
|
# @data: the associated with the secret from
|
|
|
|
#
|
|
|
|
# @file: the filename to load the data associated with the secret from
|
|
|
|
#
|
|
|
|
# Since: 2.6
|
|
|
|
##
|
|
|
|
{ 'struct': 'SecretProperties',
|
|
|
|
'base': 'SecretCommonProperties',
|
|
|
|
'data': { '*data': 'str',
|
|
|
|
'*file': 'str' } }
|
|
|
|
|
|
|
|
##
|
|
|
|
# @SecretKeyringProperties:
|
|
|
|
#
|
|
|
|
# Properties for secret_keyring objects.
|
|
|
|
#
|
|
|
|
# @serial: serial number that identifies a key to get from the kernel
|
|
|
|
#
|
|
|
|
# Since: 5.1
|
|
|
|
##
|
|
|
|
{ 'struct': 'SecretKeyringProperties',
|
|
|
|
'base': 'SecretCommonProperties',
|
2024-06-04 16:59:31 +03:00
|
|
|
'data': { 'serial': 'int32' },
|
|
|
|
'if': 'CONFIG_SECRET_KEYRING' }
|
2020-10-20 13:47:58 +03:00
|
|
|
|
|
|
|
##
|
|
|
|
# @TlsCredsProperties:
|
|
|
|
#
|
|
|
|
# Properties for objects of classes derived from tls-creds.
|
|
|
|
#
|
|
|
|
# @verify-peer: if true the peer credentials will be verified once the
|
2023-04-28 13:54:29 +03:00
|
|
|
# handshake is completed. This is a no-op for anonymous
|
|
|
|
# credentials. (default: true)
|
2020-10-20 13:47:58 +03:00
|
|
|
#
|
|
|
|
# @dir: the path of the directory that contains the credential files
|
|
|
|
#
|
2023-04-28 13:54:29 +03:00
|
|
|
# @endpoint: whether the QEMU network backend that uses the
|
|
|
|
# credentials will be acting as a client or as a server
|
|
|
|
# (default: client)
|
2020-10-20 13:47:58 +03:00
|
|
|
#
|
|
|
|
# @priority: a gnutls priority string as described at
|
2023-04-28 13:54:29 +03:00
|
|
|
# https://gnutls.org/manual/html_node/Priority-Strings.html
|
2020-10-20 13:47:58 +03:00
|
|
|
#
|
|
|
|
# Since: 2.5
|
|
|
|
##
|
|
|
|
{ 'struct': 'TlsCredsProperties',
|
|
|
|
'data': { '*verify-peer': 'bool',
|
|
|
|
'*dir': 'str',
|
|
|
|
'*endpoint': 'QCryptoTLSCredsEndpoint',
|
|
|
|
'*priority': 'str' } }
|
|
|
|
|
|
|
|
##
|
|
|
|
# @TlsCredsAnonProperties:
|
|
|
|
#
|
|
|
|
# Properties for tls-creds-anon objects.
|
|
|
|
#
|
2023-04-28 13:54:29 +03:00
|
|
|
# @loaded: if true, the credentials are loaded immediately when
|
|
|
|
# applying this option and will ignore options that are processed
|
|
|
|
# later. Don't use; only provided for compatibility.
|
|
|
|
# (default: false)
|
2020-10-20 13:47:58 +03:00
|
|
|
#
|
|
|
|
# Features:
|
2023-04-28 13:54:29 +03:00
|
|
|
#
|
|
|
|
# @deprecated: Member @loaded is deprecated. Setting true doesn't
|
|
|
|
# make sense, and false is already the default.
|
2020-10-20 13:47:58 +03:00
|
|
|
#
|
|
|
|
# Since: 2.5
|
|
|
|
##
|
|
|
|
{ 'struct': 'TlsCredsAnonProperties',
|
|
|
|
'base': 'TlsCredsProperties',
|
|
|
|
'data': { '*loaded': { 'type': 'bool', 'features': ['deprecated'] } } }
|
|
|
|
|
|
|
|
##
|
|
|
|
# @TlsCredsPskProperties:
|
|
|
|
#
|
|
|
|
# Properties for tls-creds-psk objects.
|
|
|
|
#
|
2023-04-28 13:54:29 +03:00
|
|
|
# @loaded: if true, the credentials are loaded immediately when
|
|
|
|
# applying this option and will ignore options that are processed
|
|
|
|
# later. Don't use; only provided for compatibility.
|
|
|
|
# (default: false)
|
2020-10-20 13:47:58 +03:00
|
|
|
#
|
2023-04-28 13:54:29 +03:00
|
|
|
# @username: the username which will be sent to the server. For
|
|
|
|
# clients only. If absent, "qemu" is sent and the property will
|
|
|
|
# read back as an empty string.
|
2020-10-20 13:47:58 +03:00
|
|
|
#
|
|
|
|
# Features:
|
2023-04-28 13:54:29 +03:00
|
|
|
#
|
|
|
|
# @deprecated: Member @loaded is deprecated. Setting true doesn't
|
|
|
|
# make sense, and false is already the default.
|
2020-10-20 13:47:58 +03:00
|
|
|
#
|
|
|
|
# Since: 3.0
|
|
|
|
##
|
|
|
|
{ 'struct': 'TlsCredsPskProperties',
|
|
|
|
'base': 'TlsCredsProperties',
|
|
|
|
'data': { '*loaded': { 'type': 'bool', 'features': ['deprecated'] },
|
|
|
|
'*username': 'str' } }
|
|
|
|
|
|
|
|
##
|
|
|
|
# @TlsCredsX509Properties:
|
|
|
|
#
|
|
|
|
# Properties for tls-creds-x509 objects.
|
|
|
|
#
|
2023-04-28 13:54:29 +03:00
|
|
|
# @loaded: if true, the credentials are loaded immediately when
|
|
|
|
# applying this option and will ignore options that are processed
|
|
|
|
# later. Don't use; only provided for compatibility.
|
|
|
|
# (default: false)
|
2020-10-20 13:47:58 +03:00
|
|
|
#
|
|
|
|
# @sanity-check: if true, perform some sanity checks before using the
|
2023-04-28 13:54:29 +03:00
|
|
|
# credentials (default: true)
|
2020-10-20 13:47:58 +03:00
|
|
|
#
|
2023-04-28 13:54:29 +03:00
|
|
|
# @passwordid: For the server-key.pem and client-key.pem files which
|
|
|
|
# contain sensitive private keys, it is possible to use an
|
|
|
|
# encrypted version by providing the @passwordid parameter. This
|
|
|
|
# provides the ID of a previously created secret object containing
|
|
|
|
# the password for decryption.
|
2020-10-20 13:47:58 +03:00
|
|
|
#
|
|
|
|
# Features:
|
2023-04-28 13:54:29 +03:00
|
|
|
#
|
|
|
|
# @deprecated: Member @loaded is deprecated. Setting true doesn't
|
|
|
|
# make sense, and false is already the default.
|
2020-10-20 13:47:58 +03:00
|
|
|
#
|
|
|
|
# Since: 2.5
|
|
|
|
##
|
|
|
|
{ 'struct': 'TlsCredsX509Properties',
|
|
|
|
'base': 'TlsCredsProperties',
|
|
|
|
'data': { '*loaded': { 'type': 'bool', 'features': ['deprecated'] },
|
|
|
|
'*sanity-check': 'bool',
|
|
|
|
'*passwordid': 'str' } }
|
2022-05-25 12:01:11 +03:00
|
|
|
##
|
|
|
|
# @QCryptoAkCipherAlgorithm:
|
|
|
|
#
|
|
|
|
# The supported algorithms for asymmetric encryption ciphers
|
|
|
|
#
|
|
|
|
# @rsa: RSA algorithm
|
|
|
|
#
|
|
|
|
# Since: 7.1
|
|
|
|
##
|
|
|
|
{ 'enum': 'QCryptoAkCipherAlgorithm',
|
|
|
|
'prefix': 'QCRYPTO_AKCIPHER_ALG',
|
|
|
|
'data': ['rsa']}
|
|
|
|
|
|
|
|
##
|
|
|
|
# @QCryptoAkCipherKeyType:
|
|
|
|
#
|
|
|
|
# The type of asymmetric keys.
|
|
|
|
#
|
|
|
|
# Since: 7.1
|
|
|
|
##
|
|
|
|
{ 'enum': 'QCryptoAkCipherKeyType',
|
|
|
|
'prefix': 'QCRYPTO_AKCIPHER_KEY_TYPE',
|
|
|
|
'data': ['public', 'private']}
|
|
|
|
|
|
|
|
##
|
|
|
|
# @QCryptoRSAPaddingAlgorithm:
|
|
|
|
#
|
|
|
|
# The padding algorithm for RSA.
|
|
|
|
#
|
|
|
|
# @raw: no padding used
|
2023-04-28 13:54:29 +03:00
|
|
|
#
|
2022-05-25 12:01:11 +03:00
|
|
|
# @pkcs1: pkcs1#v1.5
|
|
|
|
#
|
|
|
|
# Since: 7.1
|
|
|
|
##
|
|
|
|
{ 'enum': 'QCryptoRSAPaddingAlgorithm',
|
|
|
|
'prefix': 'QCRYPTO_RSA_PADDING_ALG',
|
|
|
|
'data': ['raw', 'pkcs1']}
|
|
|
|
|
|
|
|
##
|
|
|
|
# @QCryptoAkCipherOptionsRSA:
|
|
|
|
#
|
|
|
|
# Specific parameters for RSA algorithm.
|
|
|
|
#
|
|
|
|
# @hash-alg: QCryptoHashAlgorithm
|
2023-04-28 13:54:29 +03:00
|
|
|
#
|
2022-05-25 12:01:11 +03:00
|
|
|
# @padding-alg: QCryptoRSAPaddingAlgorithm
|
|
|
|
#
|
|
|
|
# Since: 7.1
|
|
|
|
##
|
|
|
|
{ 'struct': 'QCryptoAkCipherOptionsRSA',
|
|
|
|
'data': { 'hash-alg':'QCryptoHashAlgorithm',
|
|
|
|
'padding-alg': 'QCryptoRSAPaddingAlgorithm'}}
|
|
|
|
|
|
|
|
##
|
|
|
|
# @QCryptoAkCipherOptions:
|
|
|
|
#
|
|
|
|
# The options that are available for all asymmetric key algorithms
|
|
|
|
# when creating a new QCryptoAkCipher.
|
|
|
|
#
|
2024-02-05 10:47:09 +03:00
|
|
|
# @alg: encryption cipher algorithm
|
|
|
|
#
|
2022-05-25 12:01:11 +03:00
|
|
|
# Since: 7.1
|
|
|
|
##
|
|
|
|
{ 'union': 'QCryptoAkCipherOptions',
|
|
|
|
'base': { 'alg': 'QCryptoAkCipherAlgorithm' },
|
|
|
|
'discriminator': 'alg',
|
|
|
|
'data': { 'rsa': 'QCryptoAkCipherOptionsRSA' }}
|