From patchwork Thu Jan 12 10:47:31 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Volodymyr Fialko X-Patchwork-Id: 121891 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 9010A423B5; Thu, 12 Jan 2023 11:47:48 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id EB0B142D25; Thu, 12 Jan 2023 11:47:46 +0100 (CET) Received: from mx0b-0016f401.pphosted.com (mx0b-0016f401.pphosted.com [67.231.156.173]) by mails.dpdk.org (Postfix) with ESMTP id A374E42D25 for ; Thu, 12 Jan 2023 11:47:45 +0100 (CET) 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 30C9dq6W021081; Thu, 12 Jan 2023 02:47:45 -0800 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=RzozakU4JQ2FXvhXAOh0wW6Z3b0bgHzyDnLVggcZjJI=; b=FBB/8h+QdxB9v560+EZxS8ZQOVExRmIc79bW+gIw/dtWHSJtyns1XKX1CNd2N1KT173f OTuuMReHlPIRtDPeTaCvS4IrRblDki1oqpddcI2hTykbe/1mPBAhBhLLFavdJ0bNhR/T i610CD2Y9EqOfeDeF9cUZAQvVh3HNaqtVQhXhzVXDwn9NOM0qZcjYKBZTEG1L8OmYk1C Dw6+Ynm2qmvUNDTppsoI9RI3ynA2Zd4ATcgHkxP8z9NBrMw9C5HgrpgbsnU+febs2qAp TuAES1EnynxGmmt8M1IbnTBqD/Ii+AsUXg4JrPMqDkBN3EQLPS89PK68CeJWxqQ2oY6V FA== Received: from dc5-exch01.marvell.com ([199.233.59.181]) by mx0b-0016f401.pphosted.com (PPS) with ESMTPS id 3n1k56yka6-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT); Thu, 12 Jan 2023 02:47:45 -0800 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.42; Thu, 12 Jan 2023 02:47:43 -0800 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.42 via Frontend Transport; Thu, 12 Jan 2023 02:47:42 -0800 Received: from cavium-DT10.. (unknown [10.28.34.39]) by maili.marvell.com (Postfix) with ESMTP id 612203F705D; Thu, 12 Jan 2023 02:47:40 -0800 (PST) From: Volodymyr Fialko To: , Akhil Goyal , Fan Zhang CC: , , Volodymyr Fialko Subject: [PATCH v2 1/3] cryptodev: add SHAKE algorithm Date: Thu, 12 Jan 2023 11:47:31 +0100 Message-ID: <20230112104733.1835722-2-vfialko@marvell.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230112104733.1835722-1-vfialko@marvell.com> References: <20230104143815.603524-1-vfialko@marvell.com> <20230112104733.1835722-1-vfialko@marvell.com> MIME-Version: 1.0 X-Proofpoint-ORIG-GUID: RrKioTE-iWBW92mIYvIY5ILy_GhC-XhA X-Proofpoint-GUID: RrKioTE-iWBW92mIYvIY5ILy_GhC-XhA X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.219,Aquarius:18.0.923,Hydra:6.0.545,FMLib:17.11.122.1 definitions=2023-01-12_06,2023-01-12_01,2022-06-22_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 Add SHAKE to enum of auth algorithms. Signed-off-by: Volodymyr Fialko Acked-by: Akhil Goyal --- doc/guides/cryptodevs/features/default.ini | 2 ++ lib/cryptodev/rte_crypto_sym.h | 7 ++++++- lib/cryptodev/rte_cryptodev.c | 5 ++++- 3 files changed, 12 insertions(+), 2 deletions(-) diff --git a/doc/guides/cryptodevs/features/default.ini b/doc/guides/cryptodevs/features/default.ini index d51d80ff80..523da0cfa8 100644 --- a/doc/guides/cryptodevs/features/default.ini +++ b/doc/guides/cryptodevs/features/default.ini @@ -99,6 +99,8 @@ SHA3_384 HMAC = SHA3_512 = SHA3_512 HMAC = SM3 = +SHAKE_128 = +SHAKE_256 = ; ; Supported AEAD algorithms of a default crypto driver. diff --git a/lib/cryptodev/rte_crypto_sym.h b/lib/cryptodev/rte_crypto_sym.h index dc847da7b8..2cfe66530c 100644 --- a/lib/cryptodev/rte_crypto_sym.h +++ b/lib/cryptodev/rte_crypto_sym.h @@ -374,8 +374,13 @@ enum rte_crypto_auth_algorithm { /**< 512 bit SHA3 algorithm. */ RTE_CRYPTO_AUTH_SHA3_512_HMAC, /**< HMAC using 512 bit SHA3 algorithm. */ - RTE_CRYPTO_AUTH_SM3 + RTE_CRYPTO_AUTH_SM3, /**< ShangMi 3 (SM3) algorithm */ + + RTE_CRYPTO_AUTH_SHAKE_128, + /**< 128 bit SHAKE algorithm. */ + RTE_CRYPTO_AUTH_SHAKE_256, + /**< 256 bit SHAKE algorithm. */ }; /** Authentication algorithm name strings */ diff --git a/lib/cryptodev/rte_cryptodev.c b/lib/cryptodev/rte_cryptodev.c index 742a4c512e..17c70023ef 100644 --- a/lib/cryptodev/rte_cryptodev.c +++ b/lib/cryptodev/rte_cryptodev.c @@ -226,7 +226,10 @@ crypto_auth_algorithm_strings[] = { [RTE_CRYPTO_AUTH_KASUMI_F9] = "kasumi-f9", [RTE_CRYPTO_AUTH_SNOW3G_UIA2] = "snow3g-uia2", [RTE_CRYPTO_AUTH_ZUC_EIA3] = "zuc-eia3", - [RTE_CRYPTO_AUTH_SM3] = "sm3" + [RTE_CRYPTO_AUTH_SM3] = "sm3", + + [RTE_CRYPTO_AUTH_SHAKE_128] = "shake-128", + [RTE_CRYPTO_AUTH_SHAKE_256] = "shake-256", }; /**