[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 1/7] qapi: crypto-akcipher: Introduce akcipher types to qapi
From: |
Daniel P . Berrangé |
Subject: |
[PULL 1/7] qapi: crypto-akcipher: Introduce akcipher types to qapi |
Date: |
Thu, 26 May 2022 11:45:35 +0100 |
From: Lei He <helei.sig11@bytedance.com>
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>
---
qapi/crypto.json | 64 ++++++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 64 insertions(+)
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' }}
--
2.36.1
- [PULL 0/7] crypto asymmetric cipher patches, Daniel P . Berrangé, 2022/05/26
- [PULL 1/7] qapi: crypto-akcipher: Introduce akcipher types to qapi,
Daniel P . Berrangé <=
- [PULL 2/7] crypto: Introduce akcipher crypto class, Daniel P . Berrangé, 2022/05/26
- [PULL 3/7] crypto: add ASN.1 DER decoder, Daniel P . Berrangé, 2022/05/26
- [PULL 6/7] test/crypto: Add test suite for crypto akcipher, Daniel P . Berrangé, 2022/05/26
- [PULL 7/7] tests/crypto: Add test suite for RSA keys, Daniel P . Berrangé, 2022/05/26
- [PULL 4/7] crypto: Implement RSA algorithm by hogweed, Daniel P . Berrangé, 2022/05/26
- [PULL 5/7] crypto: Implement RSA algorithm by gcrypt, Daniel P . Berrangé, 2022/05/26
- Re: [PULL 0/7] crypto asymmetric cipher patches, Richard Henderson, 2022/05/26