From patchwork Wed Sep 27 11:37:32 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Gowrishankar Muthukrishnan X-Patchwork-Id: 131997 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 A37D242651; Wed, 27 Sep 2023 13:38:24 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id A9D4040685; Wed, 27 Sep 2023 13:38:03 +0200 (CEST) Received: from mx0b-0016f401.pphosted.com (mx0b-0016f401.pphosted.com [67.231.156.173]) by mails.dpdk.org (Postfix) with ESMTP id ED0F1402E9 for ; Wed, 27 Sep 2023 13:38:01 +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 38R0pVQR029266; Wed, 27 Sep 2023 04:38:01 -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=b0bUo8oraOtaOvVbcDWXX81P61D1uxvOjwIoNRtPu1M=; b=KxUQZC6Tt+FfIDEh80eDV9c/ISmxRr9rbyYLdqvwnwKEtd85T7l0SHsOOXs7aNHCcLLz DSb7Ab3y4USePw8/tDN7yV3yF7VsUe34CitKcAK9BYIaEkDSuEpvWOMzvh7D7hiDk8yp KMq8K3hB0xR2D5tAGAlwfu8pAb4JmcSJCBS6C0LMbDeB0ljJyUwjwnWghD4sNinXndw9 pXlcR79D8IHJ8hJVKQr8dLC/GaReO8BMpfO5MKF0KVblffkhIShshzmNghxyKigt0wux OzrGd4K97r+PTj82rIOVgzufTyRjDHvR5TAxut+3W6himQk0gy2vYvLV4Ggi6Tcacb/o kw== Received: from dc5-exch02.marvell.com ([199.233.59.182]) by mx0b-0016f401.pphosted.com (PPS) with ESMTPS id 3t9yhm68ee-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT); Wed, 27 Sep 2023 04:38:01 -0700 Received: from DC5-EXCH02.marvell.com (10.69.176.39) by DC5-EXCH02.marvell.com (10.69.176.39) with Microsoft SMTP Server (TLS) id 15.0.1497.48; Wed, 27 Sep 2023 04:37:59 -0700 Received: from maili.marvell.com (10.69.176.80) by DC5-EXCH02.marvell.com (10.69.176.39) with Microsoft SMTP Server id 15.0.1497.48 via Frontend Transport; Wed, 27 Sep 2023 04:37:59 -0700 Received: from BG-LT91401.marvell.com (BG-LT91401.marvell.com [10.28.168.34]) by maili.marvell.com (Postfix) with ESMTP id 9F7963F7090; Wed, 27 Sep 2023 04:37:56 -0700 (PDT) From: Gowrishankar Muthukrishnan To: CC: , Akhil Goyal , Fan Zhang , Kai Ji , Arkadiusz Kusztal , Gowrishankar Muthukrishnan Subject: [PATCH v2 5/7] cryptodev: use generic EC xform params for SM2 Date: Wed, 27 Sep 2023 17:07:32 +0530 Message-ID: <20230927113734.1244-6-gmuthukrishn@marvell.com> X-Mailer: git-send-email 2.21.0 In-Reply-To: <20230927113734.1244-1-gmuthukrishn@marvell.com> References: <20230927113734.1244-1-gmuthukrishn@marvell.com> MIME-Version: 1.0 X-Proofpoint-GUID: UIJMEjtql92Uv_VQtxz2Bt5ok0FDNzs- X-Proofpoint-ORIG-GUID: UIJMEjtql92Uv_VQtxz2Bt5ok0FDNzs- 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-27_06,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 SM2 curve could use generic EC xform as it is yet another EC. This would also require SM2 curve ID enumerated along with other curves, as listed in: https://www.iana.org/assignments/tls-parameters/tls-parameters.xhtml Signed-off-by: Gowrishankar Muthukrishnan Acked-by: Arkadiusz Kusztal --- app/test/test_cryptodev_sm2_test_vectors.h | 4 +++- doc/guides/rel_notes/release_23_11.rst | 2 ++ lib/cryptodev/rte_crypto_asym.h | 6 ++---- 3 files changed, 7 insertions(+), 5 deletions(-) diff --git a/app/test/test_cryptodev_sm2_test_vectors.h b/app/test/test_cryptodev_sm2_test_vectors.h index 7a4ce70c10..3d2dba1359 100644 --- a/app/test/test_cryptodev_sm2_test_vectors.h +++ b/app/test/test_cryptodev_sm2_test_vectors.h @@ -17,6 +17,7 @@ struct crypto_testsuite_sm2_params { rte_crypto_param id; rte_crypto_param cipher; rte_crypto_param message; + int curve; }; static uint8_t fp256_pkey[] = { @@ -123,7 +124,8 @@ struct crypto_testsuite_sm2_params sm2_param_fp256 = { .cipher = { .data = fp256_cipher, .length = sizeof(fp256_cipher), - } + }, + .curve = RTE_CRYPTO_EC_GROUP_SM2 }; #endif /* __TEST_CRYPTODEV_SM2_TEST_VECTORS_H__ */ diff --git a/doc/guides/rel_notes/release_23_11.rst b/doc/guides/rel_notes/release_23_11.rst index 9746809a66..e9afae8030 100644 --- a/doc/guides/rel_notes/release_23_11.rst +++ b/doc/guides/rel_notes/release_23_11.rst @@ -97,6 +97,8 @@ Removed Items * kni: Removed the Kernel Network Interface (KNI) library and driver. +* crypto: Removed SM2 xform parameter in asymmetric xform. + API Changes ----------- diff --git a/lib/cryptodev/rte_crypto_asym.h b/lib/cryptodev/rte_crypto_asym.h index b72876240c..d75ef90b86 100644 --- a/lib/cryptodev/rte_crypto_asym.h +++ b/lib/cryptodev/rte_crypto_asym.h @@ -69,7 +69,8 @@ enum rte_crypto_curve_id { RTE_CRYPTO_EC_GROUP_SECP224R1 = 21, RTE_CRYPTO_EC_GROUP_SECP256R1 = 23, RTE_CRYPTO_EC_GROUP_SECP384R1 = 24, - RTE_CRYPTO_EC_GROUP_SECP521R1 = 25 + RTE_CRYPTO_EC_GROUP_SECP521R1 = 25, + RTE_CRYPTO_EC_GROUP_SM2 = 41, }; /** @@ -637,9 +638,6 @@ struct rte_crypto_asym_xform { /**< EC xform parameters, used by elliptic curve based * operations. */ - - struct rte_crypto_sm2_xform sm2; - /**< SM2 xform parameters */ }; };