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 CCB83A0C53; Wed, 25 Aug 2021 10:22:35 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 2201A411D8; Wed, 25 Aug 2021 10:22:20 +0200 (CEST) Received: from EUR02-VE1-obe.outbound.protection.outlook.com (mail-eopbgr20057.outbound.protection.outlook.com [40.107.2.57]) by mails.dpdk.org (Postfix) with ESMTP id EACC4411D7 for ; Wed, 25 Aug 2021 10:22:18 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=dSz2xE5fq/TST0mlqBIDTKsDX3945Gb+ysaaP7ZPjUXJbdVO4f1pgS7NiUPo3Lru7l0NAUx3hminFlYhtUGP+hSSELPpHzozC/3Y273HWAGVeigtaMoWlkQ1gTN3x5dquemcl52+TB/QfLaK+hGP7dWFX34Mdx4tDpbTzEKYZm6GfS8axiuOgNzRgnUUFM505qPxxgvncwGa+VCOUSXd15sPK8Re6Y9sYixdV19+FNwPsK5TWy9Sk+/nbyVQ8tArUSHOGiqFxc4DGqcpvSuY2AROsVmVOqDsb2h6W2ZrWaU/HqowAtR7Fg1QXJA8kxq9jfK+nf7Wc/sCSaFCfkdk7Q== 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:X-MS-Exchange-SenderADCheck; bh=Ba3V+HXzr0aPZg3Dm7OHfrVylgGmGBk+KXpHZ7pF9O8=; b=i2auMQhhSu7r2qiqWLx29rDKI9526KjwiLRiTXhxOPmRTygkk0wEHr6z+bXIHKcKftZ6up7QryMB44wVcLordHUlGnY7l/+OPzV+3P/xyfl9KFMzPM5Rt0t6Nja4ZkgfKRC7aDa2YQ4nIpFboFeTgw4awKJzywndtF7pCGZctOC1ICzt/WT7TF5BRmO3UI2gAfHYkDNHEGfiMM8vLyN3uTSMKRnkw3KG7DROt/hhGpm7+kUKpkl5JNK2Cl+eJ+tQwqMNgcJDErxWMFJwBTms2+tFoAY+tKQLow0e5BSQPpMt/x676oxWjGUg7O+rfYqFsks1iDxiIoSah5JYGIzPkw== 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=Ba3V+HXzr0aPZg3Dm7OHfrVylgGmGBk+KXpHZ7pF9O8=; b=TI/eiCOmnSLHllI69VV+bjCzkod8JXEzQXvjoMmFsv5XvcXJyrmoze/Nswe9BoxuPjj+mnu/S/nVtj2Xy5JcKK+Vuij5YpkITHT7HKf251BypqpaROL/gY+HE74LVvt33TlFB/eTBIM/60BV3P7Lho3aS6p+ma+kL5kEnk/4JMI= 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 DU2PR04MB8584.eurprd04.prod.outlook.com (2603:10a6:10:2db::24) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4457.17; Wed, 25 Aug 2021 08:22:17 +0000 Received: from DU2PR04MB8630.eurprd04.prod.outlook.com ([fe80::2590:514a:df1f:a793]) by DU2PR04MB8630.eurprd04.prod.outlook.com ([fe80::2590:514a:df1f:a793%8]) with mapi id 15.20.4436.025; Wed, 25 Aug 2021 08:22:17 +0000 From: Hemant Agrawal To: dev@dpdk.org, gakhil@marvell.com Cc: Gagandeep Singh Date: Wed, 25 Aug 2021 13:48:30 +0530 Message-Id: <20210825081837.23830-4-hemant.agrawal@nxp.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20210825081837.23830-1-hemant.agrawal@nxp.com> References: <20210721073920.21893-1-hemant.agrawal@nxp.com> <20210825081837.23830-1-hemant.agrawal@nxp.com> Content-Type: text/plain X-ClientProxiedBy: SG2PR02CA0106.apcprd02.prod.outlook.com (2603:1096:4:92::22) 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 SG2PR02CA0106.apcprd02.prod.outlook.com (2603:1096:4:92::22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4457.17 via Frontend Transport; Wed, 25 Aug 2021 08:22:16 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: ad1edf8a-c84f-4777-708f-08d967a1736c X-MS-TrafficTypeDiagnostic: DU2PR04MB8584: 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: rlY0AO1YIFG6gvzm+7mJ+RcsnxyLM9fMoHCr1vp4JrEttneSE7tZYkjEBG3qlojKPrfotFYLBo0ulTWJfHwtKngXDQ55uhZXicpUaCTIguy8MtgeVdH09kKt2Nw7g28RiRzvcgzsdTMQVPOC+vDI3Lz4TN4aFQBrCXw1D9PeatlWtiR2H2b0synUqQg/0W8zemlV86jcme17SIXOpD4cCrdbBTrkqT4DnFd3jQM8dMW+YWL/IG57o0kAyDPKM44B5A/bKh8Z//enjZ+Z3sZMDndxvQi8qyGm3OuowrCaZ6z+Njn20L6EDQAeR0ZY+HxPxr0wUzXMsMppqMol44atPSSY9IPwbaVAiqAftP2FBWhF8Vonl2Nko1oHx+PMdsyeTF1Htt77ltfFglYE/FjrtkDYkr9AMuZGWaIFW7uwNvYtpOHoWIp4w95KDInsoOZ+gz4A10ERjkYjpjmRMk2qO+2i61agK6zbl5ZJZNVXYx+JevontDlTpoQADpIOC7h+X/tgjdxNlsiQcLjtIrYN4HWFBaf1nAdi1YavgN64Dn79hMYTtM821GPp+S181tuO1DJcrgCCTExPwtpVH09p+mpDp8KPxm4PtGJHZrre3Yz49NXkptjo/dfdpMuavhEgIJr97RllUgxwYydbtOOcQwz+8dD47HtsFl63wO3xaP6htlivNZaZ0h4YWR9xx77np8rQnZCqhnDGGfYe4Ga0xQ== 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)(136003)(366004)(376002)(39860400002)(346002)(396003)(6666004)(66556008)(66476007)(1076003)(26005)(8936002)(186003)(52116002)(6486002)(66946007)(6506007)(316002)(5660300002)(2906002)(44832011)(4326008)(36756003)(956004)(8676002)(478600001)(38100700002)(83380400001)(6512007)(38350700002)(2616005)(86362001); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?us-ascii?Q?CarPc6bt3884H1wBGo42Y634owTgNimJL3pFiINoD+7614EW8YxUiSJWpBGF?= =?us-ascii?Q?dHn2V9MI2utzgraNt/eTqzJZP1ZTtjD0Cm9tyuOdXKCWh51ZsL5cfb6pLcDz?= =?us-ascii?Q?9vb6yHx04CiAL/k2HfcLLX0U/K0kqy148KdpIUERuMVgILzoUi32Kh4SQAbI?= =?us-ascii?Q?JnKYZIVi630KxBsOIRopcdIrjxugbN7zaxKxMdj32WtLODZew173ADCOka/S?= =?us-ascii?Q?eq0ZfQ3qGLggnUO2SaqRC+JKTx0lU7yGdAN1GRp48Gmqad04n75WFF5Co4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AF6OYSS0PUavYj0/9ovenpwNXFF5bO?= =?us-ascii?Q?MDNv0qp2n1BJh8hirE5MWWV0fWOL7WZC15E2nD5bcMJl9J7Z1/NVbQzgdDa9?= =?us-ascii?Q?D2Y3hQsKRuWa67RPqd4BNMoKpS7AiVIj+A80JrvPsP/6qkUj4VWmULH6Dwvf?= =?us-ascii?Q?n8dmOWlkjfSwFVmzki4d/mci?= X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: ad1edf8a-c84f-4777-708f-08d967a1736c X-MS-Exchange-CrossTenant-AuthSource: DU2PR04MB8630.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 25 Aug 2021 08:22:17.5827 (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: ry/VOH82bXwli+S0mOW/DBP9xIP+tPiehl2qoz8FuzG+B44wZlcEKXchIxLs0YAYi3sBKm9TykvHwDJETsoU7A== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DU2PR04MB8584 Subject: [dpdk-dev] [PATCH v2 04/11] 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 + drivers/crypto/dpaa_sec/dpaa_sec.c | 21 ++++++++++++++++++++- 2 files changed, 21 insertions(+), 1 deletion(-) 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/drivers/crypto/dpaa_sec/dpaa_sec.c b/drivers/crypto/dpaa_sec/dpaa_sec.c index 4f5d9d7f49..dab0ad28c0 100644 --- a/drivers/crypto/dpaa_sec/dpaa_sec.c +++ b/drivers/crypto/dpaa_sec/dpaa_sec.c @@ -524,6 +524,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); } @@ -2165,6 +2173,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); @@ -2246,6 +2258,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); @@ -2685,8 +2701,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