From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 02EDDA0093 for ; Tue, 19 May 2020 14:19:25 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id D46581C221; Tue, 19 May 2020 14:19:25 +0200 (CEST) Received: from mga12.intel.com (mga12.intel.com [192.55.52.136]) by dpdk.org (Postfix) with ESMTP id 076571C221; Tue, 19 May 2020 14:19:23 +0200 (CEST) IronPort-SDR: iSM6RCjn4KG+A7N/F0SWx4a3BlfgHX7kFaoDohv2w9bVIi3n2TFs3v90NzOelNSLaSu6QCId4G EveuNbZcqHrg== X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga007.fm.intel.com ([10.253.24.52]) by fmsmga106.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 19 May 2020 05:19:23 -0700 IronPort-SDR: yPOtNTTHxzhfGzhKSSl1Oq+urQNnPPgTJLSKKF2dqvHVRcvNVbMLcQqtOS+9E0FtmM3KkRLx7E q5VSH0U7DxnA== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.73,410,1583222400"; d="scan'208";a="253339359" Received: from orsmsx108.amr.corp.intel.com ([10.22.240.6]) by fmsmga007.fm.intel.com with ESMTP; 19 May 2020 05:19:22 -0700 Received: from orsmsx123.amr.corp.intel.com (10.22.240.116) by ORSMSX108.amr.corp.intel.com (10.22.240.6) with Microsoft SMTP Server (TLS) id 14.3.439.0; Tue, 19 May 2020 05:19:22 -0700 Received: from ORSEDG002.ED.cps.intel.com (10.7.248.5) by ORSMSX123.amr.corp.intel.com (10.22.240.116) with Microsoft SMTP Server (TLS) id 14.3.439.0; Tue, 19 May 2020 05:19:22 -0700 Received: from NAM10-BN7-obe.outbound.protection.outlook.com (104.47.70.104) by edgegateway.intel.com (134.134.137.101) with Microsoft SMTP Server (TLS) id 14.3.439.0; Tue, 19 May 2020 05:19:22 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=hz8V0eQ+u7tYWKrdHTdCUqHE177qoZI8RHof1XRWYrz24On+xVDC2JnGewBP5TcuJqKibuFvJ6fEx/aWGtRg3dM6AMk6oM/bRYHZ3tsqZdxy8VQfdUSRYLKpo5CZod1rkhLOMR2+0QAgNAbsE+6+0ED1TYaCeO3ff7lm0eQnoI+MMn+qorbmJj+4h/3ymh4fWRvp3OyI0NDTCpGan1NRAKaTj/vIT7UHiANBH/CqqDbUgyKy9yfYDBpCK6Mv3M7u17TAxY03mKZ0CkaAn7QMgSy0cggCiHwmRLkIGonOz2jBnegLi8txUNW5Shod63b7CXH5ULALMiBPK4y9PLkcMQ== 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=yRVXj8couEb8yKsQIrOSlsxrcqi4reYg17HgLl6ZAUI=; b=MU0wuuLiLR1+EiDReS6WXjAHaSbRLqY2NHie7OSSSn/yeFz7NlMwRHh3MNrBeHTwNfR4Pzr7FZ8fyg4usGUGFFRdUboCFHeevXyiCtVOf0HHq1dRrfvpF/GfdXyf1uKh4HzOH+1wVzQwTQooJIYCYzmGkSuJd73Gbfv1lnW8zPa9Pb73nbM+n+UrQ9Wj6QoVR0R2cgNaDC70rrE+iRBZVSe8puuz8I8duAdMjrcP5e03eoL19Zxd4YtNnt+rsJFqGRKrAFpML0StHdJPCqW/bdKEc1sO3TpSJKV6gqnpb1f8e3IiMiqg0CgDqXBcqbYl3AIhRMkpTphsCzZ50MR9gQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=intel.com; dmarc=pass action=none header.from=intel.com; dkim=pass header.d=intel.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=intel.onmicrosoft.com; s=selector2-intel-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=yRVXj8couEb8yKsQIrOSlsxrcqi4reYg17HgLl6ZAUI=; b=a14+4ltgOWo0nJ6axflGJiuIEMHqdqy85YQVdIQvzs8IJ1BVjtyXsFpCGQtTZJYgw5kA1qjrQCaciD1FMk6zb5SighwJFy0o1atHwdLWOG0RV+ViYcsaPqQDuBDxiM4/4iRsLMwx9F6ADqs9xyhbNQtmaCawJHWx56g4k48qpWY= Received: from BY5PR11MB3910.namprd11.prod.outlook.com (2603:10b6:a03:185::13) by BY5PR11MB4196.namprd11.prod.outlook.com (2603:10b6:a03:1ce::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3000.27; Tue, 19 May 2020 12:19:20 +0000 Received: from BY5PR11MB3910.namprd11.prod.outlook.com ([fe80::ad60:fbb0:b236:3679]) by BY5PR11MB3910.namprd11.prod.outlook.com ([fe80::ad60:fbb0:b236:3679%6]) with mapi id 15.20.3000.034; Tue, 19 May 2020 12:19:20 +0000 From: "Dybkowski, AdamX" To: "Trahe, Fiona" , Anoob Joseph , "dev@dpdk.org" , "akhil.goyal@nxp.com" CC: "stable@dpdk.org" Thread-Topic: [dpdk-dev] [PATCH] cryptodev: fix SHA-1 digest enum comment Thread-Index: AQHWLSJA9WVDZ3fDfU2N/A1hQlliZKiu6YiAgAA79nCAAANNgIAABtKQgAAG2QCAAB6RYA== Date: Tue, 19 May 2020 12:19:20 +0000 Message-ID: References: <20200518142342.1987-1-adamx.dybkowski@intel.com> In-Reply-To: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: dlp-version: 11.2.0.6 dlp-product: dlpe-windows dlp-reaction: no-action authentication-results: intel.com; dkim=none (message not signed) header.d=none;intel.com; dmarc=none action=none header.from=intel.com; x-originating-ip: [79.184.238.8] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: bcaf8ce7-84cc-4413-e04b-08d7fbeedbf9 x-ms-traffictypediagnostic: BY5PR11MB4196: x-ms-exchange-transport-forked: True x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:7691; x-forefront-prvs: 040866B734 x-ms-exchange-senderadcheck: 1 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: pr+wOjoRLe8f/u+1wMStkaVy606DFNNtP/ng732F6XpQ7R67FRFLrjSox2vvXb+i0U2GYH7EDHjPZWT/EUafEKnY54g/ceeAKhvQ9PIgOzuSQptpoB/bblIbbsrQCYigNWaPqPYl5cBPdNj/QYL2a2PFgKWkrcMHZ4QLF5Yu1z3x0FtKcJPzr3BAc4oir7LZWmpS+XwSk0HorAPBZVCiQIOCUDSg6mv68lvbjtdRUcagjVkmxLe2qKQDm8Dw+uDFtx8PrC+17CAc5T2Z5QkzBhPb4p34qTLjRDRQcLaHucmyX9x6Uk+7kUfWm9OsPh8K8bz5cdzj0N1Ua8VW1TsJL8sl1seo6Hb+2tm+rUC8LYDq2+ZTDbxt9O2DqyvV7b8stRbcT5SWrH1v0BKdyTLlEj+gfIV3I5S4l3zc0T03keti1hWUGLb/tV19O46Gic8Y445TOsGFmlT5p1U1x+9Q6rCSB5DXjfy95OrtuxH1NA5XB9QRqiUK13bPzRhy/GVns1c4fK4sQJPkfNWMrm4xdw== x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:BY5PR11MB3910.namprd11.prod.outlook.com; PTR:; CAT:NONE; SFTY:; SFS:(346002)(136003)(376002)(366004)(396003)(39860400002)(478600001)(2906002)(26005)(8936002)(8676002)(4326008)(110136005)(316002)(6506007)(5660300002)(53546011)(55016002)(7696005)(33656002)(9686003)(71200400001)(64756008)(66446008)(66476007)(86362001)(76116006)(66556008)(66946007)(52536014)(186003); DIR:OUT; SFP:1102; x-ms-exchange-antispam-messagedata: cfArn9fSkur1zskaMUVwLZkNs1wqZz9jvotvzGDyB1Fv8emdUwZbZ67SdkUkssPCHkHi+7rQnrhRCbRS6l0vUwX8ylBPpt3ZCLfM9l7TuGoBF6l8Gf3O1ghAJAwraedrw8Qr0qc13XR9FbNnRwsL2b78Fd//m7hWRID+g3EGQ2czCspe6vJjlrMb2Yu4x44wMHPdlw2X3WS7qIIutCMFJBE/snqP7EqyvPycsH7O+gKRCWI5Lza8iNDpicKNg7BC7mNhDSxm2rT28SuiGWjBmPw0VaRJAzCwGbfnSSVBG4iJWtY0gYBcOCg5F5DOgpwujLQPKPoPhf9OLTiJOUySqIbF+qCxzz3FPJaB79aZJd6QOiG7d+pLKtMjkBj3fMlAkWXl8RdTDtRsceGKPwVo5RAeeyQyKYi1Qyv0bLwBQCULzy0B8aNzPyjXcC+5TjhyveyDRCfaXIG+iooDyHy2gdg4KT0NuQnOIB1E13vlnIc= Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-MS-Exchange-CrossTenant-Network-Message-Id: bcaf8ce7-84cc-4413-e04b-08d7fbeedbf9 X-MS-Exchange-CrossTenant-originalarrivaltime: 19 May 2020 12:19:20.6479 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 46c98d88-e344-4ed4-8496-4ed7712e255d X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: y/4ms3LyvH4OesusYdvJIc5iqLMMEuFVwHLk2J9jxtc5IZH6ly//1Z/0VIqSxXrcv/JiG/L6txRY7/XJwO0C40aNnzVvFVbPiUq5d1SoOt4= X-MS-Exchange-Transport-CrossTenantHeadersStamped: BY5PR11MB4196 X-OriginatorOrg: intel.com Subject: Re: [dpdk-stable] [dpdk-dev] [PATCH] cryptodev: fix SHA-1 digest enum comment X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: stable-bounces@dpdk.org Sender: "stable" > -----Original Message----- > From: Trahe, Fiona > Sent: Tuesday, 19 May, 2020 12:29 > To: Dybkowski, AdamX ; Anoob Joseph > ; dev@dpdk.org; akhil.goyal@nxp.com > Cc: stable@dpdk.org; Trahe, Fiona > Subject: RE: [dpdk-dev] [PATCH] cryptodev: fix SHA-1 digest enum comment >=20 > Hi Adam, Anoob, >=20 >=20 > > > > > > > > > > > -----Original Message----- > > > > > > From: dev On Behalf Of Adam Dybkowski > > > > > > Sent: Monday, May 18, 2020 7:54 PM > > > > > > To: dev@dpdk.org; fiona.trahe@intel.com; akhil.goyal@nxp.com > > > > > > Cc: Adam Dybkowski ; > > > > > > stable@dpdk.org > > > > > > Subject: [dpdk-dev] [PATCH] cryptodev: fix SHA-1 digest enum > > > > > > comment > > > > > > > > > > > > This patch fixes improper SHA-1 digest size in the enum comment= . > > > > > > > > > > > > Fixes: 1bd407fac80b ("cryptodev: extract symmetric > > > > > > operations") > > > > > > Cc: stable@dpdk.org > > > > > > > > > > > > Signed-off-by: Adam Dybkowski > > > > > > --- > > > > > > lib/librte_cryptodev/rte_crypto_sym.h | 4 ++-- > > > > > > 1 file changed, 2 insertions(+), 2 deletions(-) > > > > > > > > > > > > diff --git a/lib/librte_cryptodev/rte_crypto_sym.h > > > > > > b/lib/librte_cryptodev/rte_crypto_sym.h > > > > > > index d9585ecd6..9cea4e5f0 100644 > > > > > > --- a/lib/librte_cryptodev/rte_crypto_sym.h > > > > > > +++ b/lib/librte_cryptodev/rte_crypto_sym.h > > > > > > @@ -269,9 +269,9 @@ enum rte_crypto_auth_algorithm { > > > > > > /**< HMAC using MD5 algorithm */ > > > > > > > > > > > > RTE_CRYPTO_AUTH_SHA1, > > > > > > - /**< 128 bit SHA algorithm. */ > > > > > > + /**< 160 bit SHA algorithm. */ > > > > > > RTE_CRYPTO_AUTH_SHA1_HMAC, > > > > > > - /**< HMAC using 128 bit SHA algorithm. */ > > > > > > + /**< HMAC using 160 bit SHA algorithm. */ > > > > > > > > > > [Anoob] This raises one interesting question. Is HMAC-SHA-1-96 > > > > > (https://urldefense.proofpoint.com/v2/url?u=3Dhttps-3A__tools.iet= f > > > > > .org > > > > > _h > > > > > > > > > > > > > tml_rfc2404&d=3DDwIFAg&c=3DnKjWec2b6R0mOyPaz7xtfQ&r=3DjPfB8rwwviRSxyL > > > Ws2 > > > > n6B- > > > > > > > > WYLn1v9SyTMrT5EQqh2TU&m=3DpgqB2BfFosCF_7l1SdoodgXcipf7G1ofht68ZK > > > Mt > > > > oW0&s=3DhxzUN2QfRJGaR7NQ7VKGm5oQvOZez6Z70mqOyg7gKTY&e=3D ) > > > treated as a > > > > separate algorithm or is it a digest size variant of > > > > RTE_CRYPTO_AUTH_SHA1_HMAC? I assume the later. > > > > > > > > [Adam] DPDK doesn't have separate enums for such variations. > > > > According to RFC 2104, chapter "5. Truncated output", the > > > > calculation of > > > > HMAC-SHA-1-96 is done using ordinary HMAC-SHA-1, but the > > > > calculation result is then truncated to 96 bits, or any other > > > > digest size provided in auth > > > xform. > > > > > > [Anoob] So it is allowed to support digest sizes 12 & 20, right? Can > > > you update the above comment in that case? > > > > [Adam] This depends on a particular PMD and its capabilities so we > > cannot write here in this public header file. For example, have a look = in the > capabilities structure of QAT PMD: > > > > { /* SHA1 */ \ > > .op =3D RTE_CRYPTO_OP_TYPE_SYMMETRIC, > \ > > {.sym =3D { \ > > .xform_type =3D RTE_CRYPTO_SYM_XFORM_AUTH, > \ > > {.auth =3D { \ > > .algo =3D RTE_CRYPTO_AUTH_SHA1, > \ > > .block_size =3D 64, \ > > .key_size =3D { \ > > .min =3D 0, \ > > .max =3D 0, \ > > .increment =3D 0 \ > > }, \ > > .digest_size =3D { \ > > .min =3D 1, \ > > .max =3D 20, \ > > .increment =3D 1 \ > > }, \ > > .iv_size =3D { 0 } \ > > }, } \ > > }, } \ > > }, \ > > > > It shows QAT PMD is able to truncate the output digest to any size from= 1 > to 20 bytes (160 bits). > > > > This can be different in other PMDs, for example OpenSSL and CCP PMDs > > allow only 20-byte digests here while Marvell MVSAM allows 12-20 bytes. > > > > Adam > [Fiona] True. But as 96 bits is a standard variant described in the spec,= how > about adding >=20 > /**< HMAC using 160 bit SHA algorithm. > HMAC-SHA-1-96 can be generated by setting digest_size to 12 */ [Adam] OK, sent this update as v2. > This doesn't imply that all PMDs must support that - same as for any othe= r > feature, the capabilities can vary.