DPDK patches and discussions
 help / color / mirror / Atom feed
From: Gowrishankar Muthukrishnan <gmuthukrishn@marvell.com>
To: <dev@dpdk.org>
Cc: <anoobj@marvell.com>, Akhil Goyal <gakhil@marvell.com>,
	Fan Zhang <fanzhang.oss@gmail.com>, Kai Ji <kai.ji@intel.com>,
	Arkadiusz Kusztal <arkadiuszx.kusztal@intel.com>,
	Maxime Coquelin <maxime.coquelin@redhat.com>,
	Chenbo Xia <chenbo.xia@intel.com>,
	Jay Zhou <jianjay.zhou@huawei.com>,
	Gowrishankar Muthukrishnan <gmuthukrishn@marvell.com>
Subject: [RFC 2/6] cryptodev: fix RSA xform for ASN.1 syntax
Date: Thu, 28 Sep 2023 15:22:56 +0530	[thread overview]
Message-ID: <20230928095300.1353-3-gmuthukrishn@marvell.com> (raw)
In-Reply-To: <20230928095300.1353-1-gmuthukrishn@marvell.com>

As per ASN.1 syntax (RFC 3447 Appendix A.1.2), RSA private key
would need specification of quintuple along with private exponent.
It is up to the implementation to internally handle, but not at
RTE itself to make them exclusive each other. Removing union
on them allows asymmetric implementation in VirtIO to benefit from
the xform as per ASN.1 syntax.

Signed-off-by: Gowrishankar Muthukrishnan <gmuthukrishn@marvell.com>
---
 lib/cryptodev/rte_crypto_asym.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/cryptodev/rte_crypto_asym.h b/lib/cryptodev/rte_crypto_asym.h
index f0996816b9..afc5bdc874 100644
--- a/lib/cryptodev/rte_crypto_asym.h
+++ b/lib/cryptodev/rte_crypto_asym.h
@@ -310,7 +310,7 @@ struct rte_crypto_rsa_xform {
 
 	enum rte_crypto_rsa_priv_key_type key_type;
 
-	union {
+	struct {
 		rte_crypto_uint d;
 		/**< the RSA private exponent */
 		struct rte_crypto_rsa_priv_key_qt qt;
-- 
2.25.1


  parent reply	other threads:[~2023-09-28  9:53 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-09-28  9:52 [RFC 0/6] vhost: add asymmetric crypto support Gowrishankar Muthukrishnan
2023-09-28  9:52 ` [RFC 1/6] cryptodev: move RSA padding information into xform Gowrishankar Muthukrishnan
2023-09-28  9:52 ` Gowrishankar Muthukrishnan [this message]
2023-09-28  9:52 ` [RFC 3/6] vhost: add asymmetric RSA support Gowrishankar Muthukrishnan
2023-09-28  9:52 ` [RFC 4/6] crypto/virtio: " Gowrishankar Muthukrishnan
2023-09-28  9:52 ` [RFC 5/6] examples/vhost_crypto: add asymmetric support Gowrishankar Muthukrishnan
2023-09-28  9:53 ` [RFC 6/6] app/test: add asymmetric tests for virtio pmd Gowrishankar Muthukrishnan

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=20230928095300.1353-3-gmuthukrishn@marvell.com \
    --to=gmuthukrishn@marvell.com \
    --cc=anoobj@marvell.com \
    --cc=arkadiuszx.kusztal@intel.com \
    --cc=chenbo.xia@intel.com \
    --cc=dev@dpdk.org \
    --cc=fanzhang.oss@gmail.com \
    --cc=gakhil@marvell.com \
    --cc=jianjay.zhou@huawei.com \
    --cc=kai.ji@intel.com \
    --cc=maxime.coquelin@redhat.com \
    /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: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).