[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 2/9] qapi: crypto-akcipher: Introduce akcipher types to qapi
From: |
Lei He |
Subject: |
[PATCH 2/9] qapi: crypto-akcipher: Introduce akcipher types to qapi |
Date: |
Wed, 25 May 2022 17:01:11 +0800 |
Introduce akcipher types, also include RSA related types.
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
Signed-off-by: Lei He <helei.sig11@bytedance.com>
Signed-off-by: zhenwei pi <pizhenwei@bytedance.com>
---
qapi/crypto.json | 64 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 64 insertions(+)
diff --git a/qapi/crypto.json b/qapi/crypto.json
index 1ec54c15ca..f7bb9a42d0 100644
--- a/qapi/crypto.json
+++ b/qapi/crypto.json
@@ -540,3 +540,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.11.0
- [PATCH v7 0/9] Introduce akcipher service for virtio-crypto, Lei He, 2022/05/25
- [PATCH 1/9] virtio-crypto: header update, Lei He, 2022/05/25
- [PATCH 3/9] crypto: Introduce akcipher crypto class, Lei He, 2022/05/25
- [PATCH 4/9] crypto: add ASN.1 DER decoder, Lei He, 2022/05/25
- [PATCH 2/9] qapi: crypto-akcipher: Introduce akcipher types to qapi,
Lei He <=
- [PATCH 7/9] test/crypto: Add test suite for crypto akcipher, Lei He, 2022/05/25
- [PATCH 8/9] tests/crypto: Add test suite for RSA keys, Lei He, 2022/05/25
- [PATCH 5/9] crypto: Implement RSA algorithm by hogweed, Lei He, 2022/05/25
- [PATCH 6/9] crypto: Implement RSA algorithm by gcrypt, Lei He, 2022/05/25
- [PATCH 9/9] crypto: Introduce RSA algorithm, Lei He, 2022/05/25
- Re: [PATCH v7 0/9] Introduce akcipher service for virtio-crypto, Daniel P . Berrangé, 2022/05/26