From patchwork Thu Sep 28 09:52:56 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Gowrishankar Muthukrishnan X-Patchwork-Id: 132111 X-Patchwork-Delegate: gakhil@marvell.com Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 25CE54265E; Thu, 28 Sep 2023 11:53:35 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 1642940A8A; Thu, 28 Sep 2023 11:53:28 +0200 (CEST) Received: from mx0b-0016f401.pphosted.com (mx0b-0016f401.pphosted.com [67.231.156.173]) by mails.dpdk.org (Postfix) with ESMTP id A577240A72 for ; Thu, 28 Sep 2023 11:53:26 +0200 (CEST) Received: from pps.filterd (m0045851.ppops.net [127.0.0.1]) by mx0b-0016f401.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 38S6DauF012953; Thu, 28 Sep 2023 02:53:26 -0700 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=marvell.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : mime-version : content-transfer-encoding : content-type; s=pfpt0220; bh=+at8SRPxNaGk5lMMeeoq9XI12e7IyR3lY+kdrzk7i9M=; b=AbF3MJ5SBftZKjJiPDQ78exQ70HERl9k+robwEhhQhGblhGGtbLHwRa7Zn3X+4Bfvy4U MVmXSl4yyaMC7KOVF2ZFZHbA8rW1J9cKdjsjI7/7N0aVHTK0Z2FEawHVdaYElsQS5zjh JgwthrGavxnKHi8k21GdJ4dJxmHPuttxE1UaBDUs3V/pC4QrHPyhckP0qkWuz9V4TsXT LEcP7bS7w72sybHcsqz87NRZ4HCzxP/sQIgH79RT735Xp2n0402HzeiRe/Zmz8AZo8/G jK+bGLM2AVngfVL4O3JZMcvJI/vVUcqDus8mtinjsB7Su4cRQBBpmZsYBkXRpM30FGvV Aw== Received: from dc5-exch01.marvell.com ([199.233.59.181]) by mx0b-0016f401.pphosted.com (PPS) with ESMTPS id 3tcrrs2yss-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT); Thu, 28 Sep 2023 02:53:26 -0700 Received: from DC5-EXCH01.marvell.com (10.69.176.38) by DC5-EXCH01.marvell.com (10.69.176.38) with Microsoft SMTP Server (TLS) id 15.0.1497.48; Thu, 28 Sep 2023 02:53:23 -0700 Received: from maili.marvell.com (10.69.176.80) by DC5-EXCH01.marvell.com (10.69.176.38) with Microsoft SMTP Server id 15.0.1497.48 via Frontend Transport; Thu, 28 Sep 2023 02:53:23 -0700 Received: from BG-LT91401.marvell.com (BG-LT91401.marvell.com [10.28.168.34]) by maili.marvell.com (Postfix) with ESMTP id 450435C68EF; Thu, 28 Sep 2023 02:53:21 -0700 (PDT) From: Gowrishankar Muthukrishnan To: CC: , Akhil Goyal , Fan Zhang , Kai Ji , Arkadiusz Kusztal , Maxime Coquelin , Chenbo Xia , Jay Zhou , Gowrishankar Muthukrishnan Subject: [RFC 2/6] cryptodev: fix RSA xform for ASN.1 syntax Date: Thu, 28 Sep 2023 15:22:56 +0530 Message-ID: <20230928095300.1353-3-gmuthukrishn@marvell.com> X-Mailer: git-send-email 2.21.0 In-Reply-To: <20230928095300.1353-1-gmuthukrishn@marvell.com> References: <20230928095300.1353-1-gmuthukrishn@marvell.com> MIME-Version: 1.0 X-Proofpoint-ORIG-GUID: lAbGb3MZAJFJZAyEtvX-_uY67msvHmUZ X-Proofpoint-GUID: lAbGb3MZAJFJZAyEtvX-_uY67msvHmUZ X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.267,Aquarius:18.0.980,Hydra:6.0.619,FMLib:17.11.176.26 definitions=2023-09-28_07,2023-09-27_01,2023-05-22_02 X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org 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 --- 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;