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 3C8CEA052B; Wed, 29 Jul 2020 18:20:59 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 0E31AF04; Wed, 29 Jul 2020 18:20:59 +0200 (CEST) Received: from mga05.intel.com (mga05.intel.com [192.55.52.43]) by dpdk.org (Postfix) with ESMTP id 7F01CA69 for ; Wed, 29 Jul 2020 18:20:57 +0200 (CEST) IronPort-SDR: m9pzfiltMHI7ie9iAZoWSULi/KTdn3pctqh+FRtpOq1bbUo2rAPeqgPwKhkDCIa5CvnrzJcF7D OSevdmsaSUaw== X-IronPort-AV: E=McAfee;i="6000,8403,9697"; a="236314113" X-IronPort-AV: E=Sophos;i="5.75,410,1589266800"; d="scan'208";a="236314113" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga004.jf.intel.com ([10.7.209.38]) by fmsmga105.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 29 Jul 2020 09:20:56 -0700 IronPort-SDR: v3udF8wUXHOgPzBaYbb1w9/5jB66BeFjfS/fjLuc4y5h2XWjxlhm61RiNF1uwyD5MMxEqvPskV msKg+0favZug== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.75,410,1589266800"; d="scan'208";a="434734357" Received: from orsmsx104.amr.corp.intel.com ([10.22.225.131]) by orsmga004.jf.intel.com with ESMTP; 29 Jul 2020 09:20:55 -0700 Received: from ORSEDG002.ED.cps.intel.com (10.7.248.5) by ORSMSX104.amr.corp.intel.com (10.22.225.131) with Microsoft SMTP Server (TLS) id 14.3.439.0; Wed, 29 Jul 2020 09:20:55 -0700 Received: from NAM10-DM6-obe.outbound.protection.outlook.com (104.47.58.100) by edgegateway.intel.com (134.134.137.101) with Microsoft SMTP Server (TLS) id 14.3.439.0; Wed, 29 Jul 2020 09:20:55 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=i4Y6IB4HWn80u79opIaxW6I3z6li64flMj0MP/+Cpo3JdRZvCGZ2E8pPZ4jBeKjWhbi8HhgACkxpYRsIlspB7+kdz1yBBrjUEmY2jcO6aKRixLyAx50uiDrt74GJAd5PpR+7MibKFoeciCmkx0Xght4A6rFtGFkz3ohvFOon5YqpuJXpZ8caKiZX1n3gCbttFb46kESn1D5kN06O897FxFCDKgKviked+tEI076PQ1aZzy8hMKeobfDhw93PZFyBUubMud80kaTccoODr92YGpy1NCTskeDMWLDpl0IO7mKGn9yBZqtTYFegTlqD+ijoQCjr78Cq0xf7qHKJDxaeDA== 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=wV8Fq7D/m8PsMrjYNqA1YUU0ex90yINe1EoAzBfj64g=; b=BJQw3O3HXZWKtJgnohUR28h8iPLaySCQmGq8BDpvPq1VGQJL7OJK8dgqZ21zbwhoYMexjtJVJedzSwXxCX5TRGBtXEv8yfa/EZA2Vrd4cOFKZfsljxV8vy2BqBjm4bwxbDrhca/5ik5MAGwcJSgzzNeNf88VhF8ozetILNe3wVp6PnhYGzuDAY+RUtW/ELXPcdv2JlA4m3vaSMzJ/mOgP3xrzs4IwQ9QKghUzaKXtPdunIXfYZL/xIsLq2dyA8yvYFOCo/2Nm2t4b1JXD0PI21DV7pdylAU/sehwIP6rw/q6C8IwfDLi20M6z08jNShJkbznWeoEczS/KetnqAh+cw== 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=wV8Fq7D/m8PsMrjYNqA1YUU0ex90yINe1EoAzBfj64g=; b=q5NseWBtQlH0yuIjH02MZG0+E+lpwLPhEJweAg6qAQ3EzFW5XaEpxaYjwv3/zXKkPuMvkpZx275RMwUhnV1okJueUMLK8iA/RWVwjDDQpA/gLbwVxKFaL06jCT44XdYIYKgKdUMis1FLO34+qvhndkgQVVPyOVSO3O5SKVcXSyA= Received: from SN6PR11MB2880.namprd11.prod.outlook.com (2603:10b6:805:58::15) by SN6PR11MB3533.namprd11.prod.outlook.com (2603:10b6:805:cc::22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3239.16; Wed, 29 Jul 2020 16:20:53 +0000 Received: from SN6PR11MB2880.namprd11.prod.outlook.com ([fe80::ec8b:8f35:800d:13f4]) by SN6PR11MB2880.namprd11.prod.outlook.com ([fe80::ec8b:8f35:800d:13f4%3]) with mapi id 15.20.3239.017; Wed, 29 Jul 2020 16:20:53 +0000 From: "Trahe, Fiona" To: "Kusztal, ArkadiuszX" , "dev@dpdk.org" CC: "akhil.goyal@nxp.com" , "anoobj@marvell.com" , "shallyv@marvell.com" , "Doherty, Declan" , "Zhang, Roy Fan" , "Ananyev, Konstantin" , "Trahe, Fiona" Thread-Topic: [PATCH] [RFC] cryptodev: move AES-GMAC to aead algorithms Thread-Index: AQHWZbPIftewUwdI5EyXW0kX2GqsYKkevKcQ Date: Wed, 29 Jul 2020 16:20:52 +0000 Message-ID: References: <20200729142219.13376-1-arkadiuszx.kusztal@intel.com> In-Reply-To: <20200729142219.13376-1-arkadiuszx.kusztal@intel.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: dlp-product: dlpe-windows dlp-reaction: no-action dlp-version: 11.2.0.6 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: [64.43.17.160] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: d3a49946-0f17-4d9d-be6c-08d833db5d6d x-ms-traffictypediagnostic: SN6PR11MB3533: x-ld-processed: 46c98d88-e344-4ed4-8496-4ed7712e255d,ExtAddr x-ms-exchange-transport-forked: True x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:8882; x-ms-exchange-senderadcheck: 1 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: tSh2bavw5F17CcbWpfYvQKcLHgvEdIN3KrHbusKSt6nmr83mLj5Ayr1OYC9+taT6rynh8SmVXRHn9kAUOc+66PZbY91J8y9LniZqTMlfbqN0PHlTcWlSswGxME+CkyQIRmtOhvu8l5/BUAzNRIAzQKfBC9aj/KJHjd7UhRXj2h8a3+oiezyxHc1PicGezPEy5OosltGx4hdNZB1RLQvSy5PU3BCRBdDy7zSsmUhAonm7Ey0K96lF0OQmMLI2oKWyMbEX2XDfwEELVmEsag+JuZq0XGNZVpaVsqi7PP8w0X7umm1JFLpJn8JKbvWSTjuf7q4vE5GKCclWKvouPTUWtA== x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:SN6PR11MB2880.namprd11.prod.outlook.com; PTR:; CAT:NONE; SFTY:; SFS:(4636009)(39860400002)(376002)(366004)(136003)(346002)(396003)(8936002)(8676002)(9686003)(54906003)(26005)(76116006)(4326008)(7696005)(53546011)(110136005)(186003)(55016002)(6506007)(83380400001)(316002)(66446008)(66476007)(5660300002)(66556008)(33656002)(66946007)(64756008)(52536014)(478600001)(71200400001)(107886003)(86362001)(2906002); DIR:OUT; SFP:1102; x-ms-exchange-antispam-messagedata: f7wnFiCne4kg6p7k7jXv5qmS7KUsutId9OLjR5llN8EhEQOdG1yudN6bTS5CyBYUUZMPCSOI5TJUrBUyPiUIJPJC/hSyWy4JEZXOV6sOLKdP5NBRR8GLAwfcRjrqdH+6upvlK31ZuuTJyyCk7HBYNX55WJlfVzBITQjoKalaGi46vSRhu936nJ6sT8Wwnxz+vCGdtfp/n9A5yFPx4cEXdQ9NoAl3kmMQf0eyHxqANI+l6hgbYvfXVE2oXVD8mjnv5HzbnMzsq2cDU/KzowCinjgPAbQZCah0uZXtaXs17fqnPk+hXA1B35cWitdp/XqEJ3rpohXx982yz81LiSlrJaSPGWC5P7LGywutxephq4M6pdGSOJiE+y0w8o70vF8etJ5IhWVs1aPq6VyzYK0wSyMBsrczmAWUiutvbgrOUbDHK8T1kh0vzrmEG+EVKd64yhOZZqnm+3T+6DqLn766fQTfx44VkrbBVPhrQ0kaTBSvetrnRM6+RnoDfBOitJjTAOKiDcvX7VDWWVrPoJxxZuc7yFSadGbD7lJ0/npWt4mLxU17U1O59daLC3eUszeh5LI5pHC/RlNQ+IZZLQS5vAExzn2Bro3OU6ifgECaKXni7EUMUrO8VCcoCW0PJvyvTQ79U16C8VhPXStLldFHgg== Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: SN6PR11MB2880.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: d3a49946-0f17-4d9d-be6c-08d833db5d6d X-MS-Exchange-CrossTenant-originalarrivaltime: 29 Jul 2020 16:20:53.0143 (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: YhWOY4IoVZIcUcnMx1yDS5COK4FQkFXxnlvqYK7jfNfcR07sBqLuY+MlLVoDBgw1IgUE9HiBsis2WLh+P7JKOQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: SN6PR11MB3533 X-OriginatorOrg: intel.com Subject: Re: [dpdk-dev] [PATCH] [RFC] cryptodev: move AES-GMAC to aead algorithms X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 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" Hi Arek,=20 Small typo below. > -----Original Message----- > From: Kusztal, ArkadiuszX > Sent: Wednesday, July 29, 2020 3:22 PM > To: dev@dpdk.org > Cc: akhil.goyal@nxp.com; Trahe, Fiona ; anoobj@mar= vell.com; > shallyv@marvell.com; Doherty, Declan ; Zhang, R= oy Fan > ; Ananyev, Konstantin ; Kusztal, ArkadiuszX > > Subject: [PATCH] [RFC] cryptodev: move AES-GMAC to aead algorithms >=20 > This is proposal to move AES-GMAC algorithm to AEAD set > of algorithms. It is however not 100% conformant GMAC as instead of aad p= ointer > data to be authenticated is passed normally and aead.data.length field > is used to specify length of data to be authenticated. > Reason behind this move is that GMAC is variant of GCM so it may > simplify implementations that are using these algorithms (mainly IPsec). > AES-GMAC therefore needs to be removed from auth algorithms. >=20 > Signed-off-by: Arek Kusztal > --- > lib/librte_cryptodev/rte_crypto_sym.h | 15 +++++++++++---- > lib/librte_cryptodev/rte_cryptodev.c | 4 ++-- > 2 files changed, 13 insertions(+), 6 deletions(-) >=20 > diff --git a/lib/librte_cryptodev/rte_crypto_sym.h b/lib/librte_cryptodev= /rte_crypto_sym.h > index f29c980..1b43c6e 100644 > --- a/lib/librte_cryptodev/rte_crypto_sym.h > +++ b/lib/librte_cryptodev/rte_crypto_sym.h > @@ -255,8 +255,6 @@ enum rte_crypto_auth_algorithm { > /**< AES-CBC-MAC algorithm. Only 128-bit keys are supported. */ > RTE_CRYPTO_AUTH_AES_CMAC, > /**< AES CMAC algorithm. */ > - RTE_CRYPTO_AUTH_AES_GMAC, > - /**< AES GMAC algorithm. */ > RTE_CRYPTO_AUTH_AES_XCBC_MAC, > /**< AES XCBC algorithm. */ >=20 > @@ -414,6 +412,8 @@ enum rte_crypto_aead_algorithm { > /**< AES algorithm in GCM mode. */ > RTE_CRYPTO_AEAD_CHACHA20_POLY1305, > /**< Chacha20 cipher with poly1305 authenticator */ > + RTE_CRYPTO_AEAD_AES_GMAC, > + /**< AES-GCM algorithm in GMAC mode. */ > RTE_CRYPTO_AEAD_LIST_END > }; >=20 > @@ -468,7 +468,7 @@ struct rte_crypto_aead_xform { > uint16_t length; > /**< Length of valid IV data. > * > - * - For GCM mode, this is either: > + * - For GCM and GMAC mode, this is either: > * 1) Number greater or equal to one, which means that IV > * is used and J0 will be computed internally, a minimum > * of 16 bytes must be allocated. > @@ -490,6 +490,8 @@ struct rte_crypto_aead_xform { > * For CCM mode, this is the length of the actual AAD, even though > * it is required to reserve 18 bytes before the AAD and padding > * at the end of it, so a multiple of 16 bytes is allocated. > + * > + * For RTE_CRYPTO_AEAD_AES_GMAC this field should be set to 0. > */ > }; >=20 > @@ -584,7 +586,10 @@ struct rte_crypto_sym_op { > uint32_t length; > /**< The message length, in bytes, of the source buffer > * on which the cryptographic operation will be > - * computed. This must be a multiple of the block size > + * computed. > + * > + * For RTE_CRYPTO_AEAD_AES_GMAC this is length of data to be > + * authenticated. > */ > } data; /**< Data offsets and length for AEAD */ > struct { > @@ -617,6 +622,8 @@ struct rte_crypto_sym_op { > * needed for authenticated cipher mechanisms (CCM and > * GCM) > * > + * For GCM this field is unused [Fiona] typo GCM->GMAC=20