From: zhenwei pi <pizhenwei@bytedance.com> To: mst@redhat.com, arei.gonglei@huawei.com, berrange@redhat.com Cc: helei.sig11@bytedance.com, cohuck@redhat.com, qemu-devel@nongnu.org, pizhenwei@bytedance.com, virtualization@lists.linux-foundation.org, linux-crypto@vger.kernel.org Subject: [PATCH v6 2/9] qapi: crypto-akcipher: Introduce akcipher types to qapi Date: Sat, 14 May 2022 08:54:57 +0800 [thread overview] Message-ID: <20220514005504.1042884-3-pizhenwei@bytedance.com> (raw) In-Reply-To: <20220514005504.1042884-1-pizhenwei@bytedance.com> From: Lei He <helei.sig11@bytedance.com> 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.20.1 _______________________________________________ Virtualization mailing list Virtualization@lists.linux-foundation.org https://lists.linuxfoundation.org/mailman/listinfo/virtualization
WARNING: multiple messages have this Message-ID (diff)
From: zhenwei pi <pizhenwei@bytedance.com> To: mst@redhat.com, arei.gonglei@huawei.com, berrange@redhat.com Cc: qemu-devel@nongnu.org, virtualization@lists.linux-foundation.org, linux-crypto@vger.kernel.org, helei.sig11@bytedance.com, jasowang@redhat.com, pizhenwei@bytedance.com, cohuck@redhat.com Subject: [PATCH v6 2/9] qapi: crypto-akcipher: Introduce akcipher types to qapi Date: Sat, 14 May 2022 08:54:57 +0800 [thread overview] Message-ID: <20220514005504.1042884-3-pizhenwei@bytedance.com> (raw) In-Reply-To: <20220514005504.1042884-1-pizhenwei@bytedance.com> From: Lei He <helei.sig11@bytedance.com> 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.20.1
next prev parent reply other threads:[~2022-05-14 0:59 UTC|newest] Thread overview: 30+ messages / expand[flat|nested] mbox.gz Atom feed top 2022-05-14 0:54 [PATCH v6 0/9] Introduce akcipher service for virtio-crypto zhenwei pi 2022-05-14 0:54 ` zhenwei pi 2022-05-14 0:54 ` [PATCH v6 1/9] virtio-crypto: header update zhenwei pi 2022-05-14 0:54 ` zhenwei pi 2022-05-14 0:54 ` zhenwei pi [this message] 2022-05-14 0:54 ` [PATCH v6 2/9] qapi: crypto-akcipher: Introduce akcipher types to qapi zhenwei pi 2022-05-14 0:54 ` [PATCH v6 3/9] crypto: Introduce akcipher crypto class zhenwei pi 2022-05-14 0:54 ` zhenwei pi 2022-05-14 0:54 ` [PATCH v6 4/9] crypto: add ASN.1 DER decoder zhenwei pi 2022-05-14 0:54 ` zhenwei pi 2022-05-23 9:46 ` Daniel P. Berrangé 2022-05-23 9:46 ` Daniel P. Berrangé 2022-05-14 0:55 ` [PATCH v6 5/9] crypto: Implement RSA algorithm by hogweed zhenwei pi 2022-05-14 0:55 ` zhenwei pi 2022-05-23 9:41 ` Daniel P. Berrangé 2022-05-23 9:41 ` Daniel P. Berrangé 2022-05-23 9:43 ` Daniel P. Berrangé 2022-05-23 9:43 ` Daniel P. Berrangé 2022-05-14 0:55 ` [PATCH v6 6/9] crypto: Implement RSA algorithm by gcrypt zhenwei pi 2022-05-14 0:55 ` zhenwei pi 2022-05-23 9:40 ` Daniel P. Berrangé 2022-05-23 9:40 ` Daniel P. Berrangé 2022-05-14 0:55 ` [PATCH v6 7/9] test/crypto: Add test suite for crypto akcipher zhenwei pi 2022-05-14 0:55 ` zhenwei pi 2022-05-23 9:45 ` Daniel P. Berrangé 2022-05-23 9:45 ` Daniel P. Berrangé 2022-05-14 0:55 ` [PATCH v6 8/9] tests/crypto: Add test suite for RSA keys zhenwei pi 2022-05-14 0:55 ` zhenwei pi 2022-05-14 0:55 ` [PATCH v6 9/9] crypto: Introduce RSA algorithm zhenwei pi 2022-05-14 0:55 ` zhenwei pi
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=20220514005504.1042884-3-pizhenwei@bytedance.com \ --to=pizhenwei@bytedance.com \ --cc=arei.gonglei@huawei.com \ --cc=berrange@redhat.com \ --cc=cohuck@redhat.com \ --cc=helei.sig11@bytedance.com \ --cc=linux-crypto@vger.kernel.org \ --cc=mst@redhat.com \ --cc=qemu-devel@nongnu.org \ --cc=virtualization@lists.linux-foundation.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.