From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 513094590E; Thu, 5 Sep 2024 16:57:23 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 3CF7342E5F; Thu, 5 Sep 2024 16:57:23 +0200 (CEST) Received: from mx0b-0016f401.pphosted.com (mx0a-0016f401.pphosted.com [67.231.148.174]) by mails.dpdk.org (Postfix) with ESMTP id 45ABB40273 for ; Thu, 5 Sep 2024 16:57:22 +0200 (CEST) Received: from pps.filterd (m0045849.ppops.net [127.0.0.1]) by mx0a-0016f401.pphosted.com (8.18.1.2/8.18.1.2) with ESMTP id 485AWPV4018437; Thu, 5 Sep 2024 07:57:14 -0700 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=marvell.com; h= cc:content-transfer-encoding:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to; s=pfpt0220; bh=X DMMG3ruy59MrzoFro+YAOGWW1UWUJi3vQ24A8kav5A=; b=XF7zWbKHVb632PdsT uzH5ZXZVvu40f1kfD5V/qN+meQA3V9gNMpgCbW8AkuOOBg9YqxI1zKa4WZv5MPKO Y3sFhe0ahNXHEyYae04AodkaryGyBxjviK/G9gVY0reD1HyiTrz2MNh3xCXrIL77 9v2WnyY3y/CIU6t8xxDY1uxGYeNy2Fih+QKHkTBsZJdJtXd5LCGKa7tVv5SN1wHD 5CLpEZ+z6WCrqziXOBpsWkhPKgMqPp5DFDi89iqquqpogZkvuMqayHPWb8Jf9GSZ Kn1KVTd9/+8Gp7Z94mN7AkJ0wFrafiQCNyx3EulhYQJChHG+9GpYkhl9kNPtR6JK 0gFbA== Received: from dc6wp-exch02.marvell.com ([4.21.29.225]) by mx0a-0016f401.pphosted.com (PPS) with ESMTPS id 41faywh13v-4 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 05 Sep 2024 07:57:14 -0700 (PDT) Received: from DC6WP-EXCH02.marvell.com (10.76.176.209) by DC6WP-EXCH02.marvell.com (10.76.176.209) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1544.4; Thu, 5 Sep 2024 07:56:53 -0700 Received: from maili.marvell.com (10.69.176.80) by DC6WP-EXCH02.marvell.com (10.76.176.209) with Microsoft SMTP Server id 15.2.1544.4 via Frontend Transport; Thu, 5 Sep 2024 07:56:53 -0700 Received: from BG-LT91401.marvell.com (BG-LT91401.marvell.com [10.28.168.34]) by maili.marvell.com (Postfix) with ESMTP id 8C8B25B6973; Thu, 5 Sep 2024 07:56:42 -0700 (PDT) From: Gowrishankar Muthukrishnan To: , Akhil Goyal , Fan Zhang CC: Anoob Joseph , , , , , , , , , , , , , , , , , , , , , , , , , , Brian Dooley , Gowrishankar Muthukrishnan Subject: [PATCH 2/6] cryptodev: fix RSA xform for ASN.1 syntax Date: Thu, 5 Sep 2024 20:26:06 +0530 Message-ID: <20240905145612.1732-3-gmuthukrishn@marvell.com> X-Mailer: git-send-email 2.21.0 In-Reply-To: <20240905145612.1732-1-gmuthukrishn@marvell.com> References: <20240905145612.1732-1-gmuthukrishn@marvell.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-Proofpoint-ORIG-GUID: GlB7Y0qsc79lWftz5F48FXaNZ4mYRrbq X-Proofpoint-GUID: GlB7Y0qsc79lWftz5F48FXaNZ4mYRrbq X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1039,Hydra:6.0.680,FMLib:17.12.60.29 definitions=2024-09-05_10,2024-09-04_01,2024-09-02_01 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 64d8a42f6a..398b6514e3 100644 --- a/lib/cryptodev/rte_crypto_asym.h +++ b/lib/cryptodev/rte_crypto_asym.h @@ -306,7 +306,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.21.0