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 15CF0A0C56; Wed, 8 Sep 2021 09:04:13 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id B57884113D; Wed, 8 Sep 2021 09:04:05 +0200 (CEST) Received: from EUR04-DB3-obe.outbound.protection.outlook.com (mail-eopbgr60079.outbound.protection.outlook.com [40.107.6.79]) by mails.dpdk.org (Postfix) with ESMTP id E9C3441139 for ; Wed, 8 Sep 2021 09:04:04 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=ZsBRWCuHg8GguZttNkMJGWCqVQQ1uRqeQZrtGosFbw6eRlUa/moCJRGDptE3bgK/ro5FTBnUUCKjd4S+w/ozA9GUtj/dcuthBf7RRh8SWFH/DldDJDWU4z8x/Y8RA55PFPUKMH0DDuCNB4Mcy2ukbhlRwk9HyQw6imi8NZcSl7i7ZcwAAer8nzMODyFaQ7/OGERboz2YDK50YtVw9dwVaprDEzkcT0CmUs1MwnammhcrEaXnokEaqKZSqwFjbwLoslt+YTykpPvaUYCOFcC3ik6uNYbzFFQZbM7ytt8CP2kmWQd8xjV2Cp8qlEfaGdibhaXef3dOjoaR4MMLCDJOHg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=KEomj0Vd0vaEBxtfsU+K+9B5NMvjws9DUNkRgkzvrgw=; b=bCqfiKyBdAQ4WJ8CGHonRqj/bJxrGW1KvVUbLnfi/wEZ4AFFcPDOAA8VwI6LUvqP55b7t32uuKDHt9FkDmYY9HD7p2zcINsK1pRYKHmwDm1MRwLSzvjTfyCoqs/15NwytAIORmTwMS7S1vH7J70nUYLqyq+3asZF3MLFrhvEWHTD7ibOuo4Erc5PGOXkVpiUXzxvv7t/T6ezWVRMWN5WE56j6s6mJd4pRIOQuJjf+0pvwGjcjXBBR/Iw2lh37pdQT7ZxjvRS5rUvCzt9jgRpyeQJlNtss++TRQfYbFh9e/+QCC55logYRXvooxOJprqaNBJcDVX+2+Ew3Q5gDDV8RA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=nxp.com; dmarc=pass action=none header.from=nxp.com; dkim=pass header.d=nxp.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nxp.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=KEomj0Vd0vaEBxtfsU+K+9B5NMvjws9DUNkRgkzvrgw=; b=IDmxMBHp6PUUY+h+FWWJBG0gSpx0z8tpEslUD0FIR9EnYQze9FPptrui+dES67H3DeEZYMdB+96ZlqnAZ8E3ZdcxZqtFswoL/uqT/7SDqAtf7eWY0GfwTCf2n8TXzgfG/AsVgmVYRW5HCzz6SkAwV45CXQtySDOmbAdN/qwsjf4= Authentication-Results: dpdk.org; dkim=none (message not signed) header.d=none;dpdk.org; dmarc=none action=none header.from=nxp.com; Received: from DU2PR04MB8630.eurprd04.prod.outlook.com (2603:10a6:10:2dd::15) by DU2PR04MB8903.eurprd04.prod.outlook.com (2603:10a6:10:2e2::9) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4478.22; Wed, 8 Sep 2021 07:04:04 +0000 Received: from DU2PR04MB8630.eurprd04.prod.outlook.com ([fe80::945d:e362:712d:1b80]) by DU2PR04MB8630.eurprd04.prod.outlook.com ([fe80::945d:e362:712d:1b80%4]) with mapi id 15.20.4478.025; Wed, 8 Sep 2021 07:04:04 +0000 From: Hemant Agrawal To: dev@dpdk.org, gakhil@marvell.com Cc: Gagandeep Singh Date: Wed, 8 Sep 2021 12:29:46 +0530 Message-Id: <20210908065953.28349-3-hemant.agrawal@nxp.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20210908065953.28349-1-hemant.agrawal@nxp.com> References: <20210907083953.8948-1-hemant.agrawal@nxp.com> <20210908065953.28349-1-hemant.agrawal@nxp.com> Content-Type: text/plain X-ClientProxiedBy: SG2PR01CA0087.apcprd01.prod.exchangelabs.com (2603:1096:3:15::13) To DU2PR04MB8630.eurprd04.prod.outlook.com (2603:10a6:10:2dd::15) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from dpdk-xeon.ap.freescale.net (92.120.0.67) by SG2PR01CA0087.apcprd01.prod.exchangelabs.com (2603:1096:3:15::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4500.14 via Frontend Transport; Wed, 8 Sep 2021 07:04:02 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 33da4313-71c7-4f15-0b12-08d97296d7c3 X-MS-TrafficTypeDiagnostic: DU2PR04MB8903: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:1122; X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 5thAaSr550hFLyCSrEU63Qc+yZZC7zdQYmBu7YzDKD4vqLbb1vbL1xuaZohsGD1yxUsw89ScFo+nkK67n4K8j38PJHuUpoUDqEy55+/LEROlnJpYk5XLHV21PbG9gEBKtodftUoUPaA70s416S9z7k5d8vSRvH2wDXqOcLvaHwhGDEMwKWsLYPxkt98NWgohHy2zEPejEQmft58qWse2FLMAZqFKbc5rAQw9cwReJvWdjjhBxctYqWL8QMxsRN0XcnIjpjibUgEnYohsElM5WD/bGF6lDUdnvrD0swN97EdwjX33IMwfYpaSR71w8k4GUeMssKyXG1HnNmK2ugzb3VKHSiOOBRCaTl1gQJvlMJ0VwUneeW10xcWfli8SzIsppli4g6vuL136HFM4bJuAw9F0HDh+wBh6p3t2cuTAd855XA9D6wETZREGrqh7jPWFAIX8zCB0Sg2yxuzjH6ntn09RjRNSvScqJVtjmlfy35KJmq+9EIMsW3+ZiEX/qVUq51WH652q3/oqokp5wS1drGoATSv4DgPQniS0uCLPJ9E0PXWf9Q8k67f7eYoQo0EeoX0bHT7r0Cc/iL3/S6f0DquyRLGaYAOhrrbnux5Le/DL+9Pvb+jkMd4FMn+Jb/28Vc9SP+7XEKZ5fdxMXYWC6Cptkvp4+wXEpGA877Ka7M/Jl3y1Mr9feW0C8fsG+m8YK466Lu9gQjGrTQ4BFgFGQA== X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:DU2PR04MB8630.eurprd04.prod.outlook.com; PTR:; CAT:NONE; SFS:(4636009)(366004)(136003)(396003)(39860400002)(346002)(376002)(52116002)(38100700002)(956004)(478600001)(83380400001)(86362001)(5660300002)(38350700002)(6666004)(6486002)(316002)(1076003)(2906002)(4326008)(44832011)(6512007)(6506007)(2616005)(36756003)(8936002)(66946007)(66556008)(186003)(66476007)(26005)(8676002); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?us-ascii?Q?vqHvdynldmcCGHXZxL/gPM2bbzNwTVzhAMMzNUDBKF46jPavWB8kM+MonhdP?= =?us-ascii?Q?7yHgb3zbMOFSikE59xSmpddPV4WmDqtovM904qQgHPnFqOq53Bp+8Xw0DX+T?= =?us-ascii?Q?1fS6ZRe+QxY6JDWykBocKEzZtNkF0xnmujpIosjNyTYmIsrmVA/JgqkKdLN1?= =?us-ascii?Q?Jqml0KAPeJZNfBV8zpYKuUEYf0lB6tEtDyeLGeZXCBqh3/MQ4aKtP5ldW0W+?= =?us-ascii?Q?h64XuRzBaFd8ovprqQMaHpKDgAQohGPyrgae8U7vDoC2iBrcf7ouY+jIiEPA?= =?us-ascii?Q?xjNxHk7TOnlQhstcuUC6wnybAWiDVj5EvIc0DJ+cp0aPgAgYVHr76ibyYaZa?= =?us-ascii?Q?EAtYbc/DxDii+vWKyBpPHi7ElsQ1GONZlPEUTmfBDVksH7mpSYkV/cpqy45E?= =?us-ascii?Q?P1a9GYKvFihViRrzhZPY0/oT0QIQkKO9Epa6sVGE9gaY0rX7T4LcBaLGiI8k?= =?us-ascii?Q?nj0j3qXbihPTxg70ums/+l9Ejco87GSUz1qOtVc0y82lBH15fnzt2CF3cvTb?= =?us-ascii?Q?P4iABoog/QYqs+QN4dSH+vCtOewivenanvxWeioYnHWrUDca6GE9Pe8dLpO9?= =?us-ascii?Q?uTvDrIzIU8ful746Qu32gLpf/eRcFq8+MSVZyHsUkyk/JsBKizBkS7uZXFQE?= =?us-ascii?Q?qUINwh71lxkDpWqoOJBmH6JVz9UJ/XNLGWroquS22k0m+6SKxyxRsoYnTDws?= =?us-ascii?Q?YE/mk7KOdz2N3t28hF4PvJUyval0z93/eOd/yvVlRZDgqSOfYIZJJmwTWo1U?= =?us-ascii?Q?gN97tOhJXNG4eEBJ6Im/PukIfrkINhQPxt0UE13k9zwxbtR3NKXD5I21EPBl?= =?us-ascii?Q?418QXUI+9TKOM0alPwKMx7FOm7Aub8ot2U+nstBrnoCaUpWyLlPVDksWXSmN?= =?us-ascii?Q?EULSpynafs+nyim5kEiGYdWzjehCC8J9vVmUH+mw5x2BgonI5APp+L5evHlE?= =?us-ascii?Q?3cSlubOaiOx3Ct8qosBXukKuMqKeXuWT2J/F2/3Qevw+DFcqMAZa/spgS3lo?= =?us-ascii?Q?QROGA4WD6Z8LPxhpWMnAztHO9xrwhToOAlNNcgOTd5JlDm7chzSiATOWfAOk?= =?us-ascii?Q?poLa86lF5RN5ylQllHTyGoq6hFn3+sIQoo7EFNwOSqlHWTLjLf6cWTgIVGJ8?= =?us-ascii?Q?W7F7ruNIbrJM8t/6sFy9RPkZcx+Uny9KEHacJdXPMqpYA7a+LouD8G1Rm2ry?= =?us-ascii?Q?q7pqm4CcOTUKr51rF4MdmJ/hM7uFA9nKZlEsGhVQglJi6nU8ZxLHIQb26tDj?= =?us-ascii?Q?UgMDHMTN6tzByEx0ONI0JhE+qvCZG66zVOGu64PiEQWJq2onbvIsdMNuKzIA?= =?us-ascii?Q?Ptz8eFS6NSus60d9njXwjpfk?= X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 33da4313-71c7-4f15-0b12-08d97296d7c3 X-MS-Exchange-CrossTenant-AuthSource: DU2PR04MB8630.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 08 Sep 2021 07:04:04.2798 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635 X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: GkwuCLWfN/mxHMS9osCzqCzHcn0OiPa3wSSsvpncPXpd5biiipDEKgp9yjFsg+EXgIe0ohYrctHvtG3jON6JAQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DU2PR04MB8903 Subject: [dpdk-dev] [PATCH v4 03/10] crypto/dpaa_sec: support AES-XCBC-MAC 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 Sender: "dev" From: Gagandeep Singh This patch adds support for AES-XCBC-MAC algo. Signed-off-by: Gagandeep Singh --- doc/guides/cryptodevs/features/dpaa_sec.ini | 1 + doc/guides/rel_notes/release_21_11.rst | 2 +- drivers/crypto/dpaa_sec/dpaa_sec.c | 21 ++++++++++++++++++++- 3 files changed, 22 insertions(+), 2 deletions(-) diff --git a/doc/guides/cryptodevs/features/dpaa_sec.ini b/doc/guides/cryptodevs/features/dpaa_sec.ini index eab14da96c..d7bc319373 100644 --- a/doc/guides/cryptodevs/features/dpaa_sec.ini +++ b/doc/guides/cryptodevs/features/dpaa_sec.ini @@ -47,6 +47,7 @@ SHA512 = Y SHA512 HMAC = Y SNOW3G UIA2 = Y ZUC EIA3 = Y +AES XCBC MAC = Y ; ; Supported AEAD algorithms of the 'dpaa_sec' crypto driver. diff --git a/doc/guides/rel_notes/release_21_11.rst b/doc/guides/rel_notes/release_21_11.rst index 88c2a31d49..b0da7e3135 100644 --- a/doc/guides/rel_notes/release_21_11.rst +++ b/doc/guides/rel_notes/release_21_11.rst @@ -75,7 +75,7 @@ New Features * **Updated NXP dpaa_sec crypto PMD.** - * Added DES-CBC and non-HMAC algo support + * Added DES-CBC, AES-XCBC-MAC and non-HMAC algo support Removed Items ------------- diff --git a/drivers/crypto/dpaa_sec/dpaa_sec.c b/drivers/crypto/dpaa_sec/dpaa_sec.c index 95b9d7414f..fc9c3a4c2c 100644 --- a/drivers/crypto/dpaa_sec/dpaa_sec.c +++ b/drivers/crypto/dpaa_sec/dpaa_sec.c @@ -527,6 +527,14 @@ dpaa_sec_prep_cdb(dpaa_sec_session *ses) !ses->dir, ses->digest_length); break; + case RTE_CRYPTO_AUTH_AES_XCBC_MAC: + shared_desc_len = cnstr_shdsc_aes_mac( + cdb->sh_desc, + true, swap, SHR_NEVER, + &alginfo_a, + !ses->dir, + ses->digest_length); + break; default: DPAA_SEC_ERR("unsupported auth alg %u", ses->auth_alg); } @@ -2168,6 +2176,10 @@ dpaa_sec_auth_init(struct rte_cryptodev *dev __rte_unused, session->auth_key.alg = OP_ALG_ALGSEL_ZUCA; session->auth_key.algmode = OP_ALG_AAI_F9; break; + case RTE_CRYPTO_AUTH_AES_XCBC_MAC: + session->auth_key.alg = OP_ALG_ALGSEL_AES; + session->auth_key.algmode = OP_ALG_AAI_XCBC_MAC; + break; default: DPAA_SEC_ERR("Crypto: Unsupported Auth specified %u", xform->auth.algo); @@ -2249,6 +2261,10 @@ dpaa_sec_chain_init(struct rte_cryptodev *dev __rte_unused, session->auth_key.alg = OP_ALG_ALGSEL_SHA512; session->auth_key.algmode = OP_ALG_AAI_HMAC; break; + case RTE_CRYPTO_AUTH_AES_XCBC_MAC: + session->auth_key.alg = OP_ALG_ALGSEL_AES; + session->auth_key.algmode = OP_ALG_AAI_XCBC_MAC; + break; default: DPAA_SEC_ERR("Crypto: Unsupported Auth specified %u", auth_xform->algo); @@ -2688,8 +2704,11 @@ dpaa_sec_ipsec_proto_init(struct rte_crypto_cipher_xform *cipher_xform, case RTE_CRYPTO_AUTH_NULL: session->auth_key.alg = OP_PCL_IPSEC_HMAC_NULL; break; - case RTE_CRYPTO_AUTH_SHA224_HMAC: case RTE_CRYPTO_AUTH_AES_XCBC_MAC: + session->auth_key.alg = OP_PCL_IPSEC_AES_XCBC_MAC_96; + session->auth_key.algmode = OP_ALG_AAI_XCBC_MAC; + break; + case RTE_CRYPTO_AUTH_SHA224_HMAC: case RTE_CRYPTO_AUTH_SNOW3G_UIA2: case RTE_CRYPTO_AUTH_SHA1: case RTE_CRYPTO_AUTH_SHA256: -- 2.17.1