aboutsummaryrefslogtreecommitdiff
path: root/qapi/crypto.json
diff options
context:
space:
mode:
authorLei He <helei.sig11@bytedance.com>2022-05-25 17:01:11 +0800
committerDaniel P. Berrangé <berrange@redhat.com>2022-05-26 11:41:42 +0100
commitdaa55f3ecf2d413295eb2d539e7629fc05d7bc92 (patch)
tree639cc0324c1d77d6ca4417b42e75fe5b1b8ab7bb /qapi/crypto.json
parent58b53669e87fed0d70903e05cd42079fbbdbc195 (diff)
qapi: crypto-akcipher: Introduce akcipher types to qapi
Introduce akcipher types, also include RSA related types. Signed-off-by: Lei He <helei.sig11@bytedance.com> Signed-off-by: zhenwei pi <pizhenwei@bytedance.com> Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
Diffstat (limited to 'qapi/crypto.json')
-rw-r--r--qapi/crypto.json64
1 files changed, 64 insertions, 0 deletions
diff --git a/qapi/crypto.json b/qapi/crypto.json
index 15c24f0078..653e6e3f3d 100644
--- a/qapi/crypto.json
+++ b/qapi/crypto.json
@@ -534,3 +534,67 @@
'data': { '*loaded': { 'type': 'bool', 'features': ['deprecated'] },
'*sanity-check': 'bool',
'*passwordid': 'str' } }
+##
+# @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
+# @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
+# @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.
+#
+# Since: 7.1
+##
+{ 'union': 'QCryptoAkCipherOptions',
+ 'base': { 'alg': 'QCryptoAkCipherAlgorithm' },
+ 'discriminator': 'alg',
+ 'data': { 'rsa': 'QCryptoAkCipherOptionsRSA' }}