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 686BBA0C4E; Tue, 2 Nov 2021 12:17:38 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 45C2040689; Tue, 2 Nov 2021 12:17:38 +0100 (CET) Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by mails.dpdk.org (Postfix) with ESMTP id 71CAE4003F for ; Tue, 2 Nov 2021 12:17:36 +0100 (CET) X-IronPort-AV: E=McAfee;i="6200,9189,10155"; a="218430328" X-IronPort-AV: E=Sophos;i="5.87,202,1631602800"; d="scan'208,217";a="218430328" Received: from fmsmga008.fm.intel.com ([10.253.24.58]) by orsmga101.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 02 Nov 2021 04:17:35 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.87,202,1631602800"; d="scan'208,217";a="540805323" Received: from orsmsx605.amr.corp.intel.com ([10.22.229.18]) by fmsmga008.fm.intel.com with ESMTP; 02 Nov 2021 04:17:33 -0700 Received: from orsmsx609.amr.corp.intel.com (10.22.229.22) by ORSMSX605.amr.corp.intel.com (10.22.229.18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2242.12; Tue, 2 Nov 2021 04:17:33 -0700 Received: from orsmsx602.amr.corp.intel.com (10.22.229.15) by ORSMSX609.amr.corp.intel.com (10.22.229.22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2242.12; Tue, 2 Nov 2021 04:17:32 -0700 Received: from ORSEDG601.ED.cps.intel.com (10.7.248.6) by orsmsx602.amr.corp.intel.com (10.22.229.15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2242.12 via Frontend Transport; Tue, 2 Nov 2021 04:17:32 -0700 Received: from NAM04-DM6-obe.outbound.protection.outlook.com (104.47.73.40) by edgegateway.intel.com (134.134.137.102) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2242.12; Tue, 2 Nov 2021 04:17:25 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=P14SeNXZGBD+gqkGiCj54suLVNhGbVlm2b2BKojfi9fBI3tw9IvWy/pooHVJ7LJFIkiD71u47t/IoTSm2Kg4ksMpVrNTY8IZFodRVm12+uHJEiJWMTi5VlXnHiz4m6a58B+HN5gDYBPOxRkoQVF/OaeBT0enLb2Hi3Yfsg/MA1az/BIHHVYuVhpdNl5V6knDc9V4gFaP1mltwmqtRWEqHy+UIc4SfWRU7CyoCHQmfakvgZq+LWIo0uK1HTBkBPUmnUG7sfD80rbjq5Wm6eIoQAP460WtdlGM7MoG0FFG2Qo+4V//0Kr3si1hYcrcSCwA1D5gkCJyxk7W7SLfLq/N1Q== 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-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=038wXpbUiKHIPA4ADYICTa1xyelwrkPq+OoGmftMbJA=; b=ZSULtHkHToWOvQLyZ/FMUUi8SGdPNg7o4MvKSwcUc9wEx/rNGdAV1KjOyaRUzXfFC5Q/LMQbh3XpB2jnS0jinaRPkJfWE6ALCYqeouFCYMTwA32ZZEsZJ0OIP3ChXl8pFw3uDehIget9Su0pnhRR+9F+gI5ROHYemDm5h4Bl/chJqfX0iIPmnql50sGAePszhwnIM+1lNFMr34ifQufbB1X4xaFI1yoZtaE3BRHRu6Q6sK/4j9r5enkDvLHigrHNh6/4D/H3qI1UnyucrhnBejCCgVp8p49W5SLaejxqEdjg7XJ3DAmjeSKbkbhS82Uy8DNZBHelpnjOk4xmvuW2uw== 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=038wXpbUiKHIPA4ADYICTa1xyelwrkPq+OoGmftMbJA=; b=bYuJygA3BsC2e4qreQlOAq5M+q/YnnZWs8pa7/EVETJae9/EOoAxJGEFxoBgnTk7XaZpk6CuHUcXgE4IoonhADTV4z/fC0nK+VsA3orEq+sSSWP3T++JbnAcbDPo7ka7FibUXUI9piFFpBDyfCriw3jcxgouPqIynnLPnk8h+SM= Received: from DM8PR11MB5591.namprd11.prod.outlook.com (2603:10b6:8:38::23) by DM8PR11MB5672.namprd11.prod.outlook.com (2603:10b6:8:26::10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4649.15; Tue, 2 Nov 2021 11:17:24 +0000 Received: from DM8PR11MB5591.namprd11.prod.outlook.com ([fe80::3d47:b590:aa2a:d5cc]) by DM8PR11MB5591.namprd11.prod.outlook.com ([fe80::3d47:b590:aa2a:d5cc%9]) with mapi id 15.20.4669.010; Tue, 2 Nov 2021 11:17:24 +0000 From: "De Lara Guarch, Pablo" To: Vidya Sagar Velumuri , Ankur Dwivedi , Anoob Joseph , Tejasree Kondoj , Nithin Kumar Dabilpuram , Akhil Goyal , "Doherty, Declan" CC: "dev@dpdk.org" Thread-Topic: [dpdk-dev] [PATCH v1] test/crypto: fix: test vectors for zuc 256 bit key Thread-Index: AQHXyw6iD/Bym0o7c0uxhCqKMVOOyqvp7OAQgAGLrjaAAjfz4IAAzhJCgAEyJmeAAGpB0A== Date: Tue, 2 Nov 2021 11:17:24 +0000 Message-ID: References: <20211027084053.5264-1-vvelumuri@marvell.com> In-Reply-To: Accept-Language: en-GB, 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.6.200.16 authentication-results: marvell.com; dkim=none (message not signed) header.d=none;marvell.com; dmarc=none action=none header.from=intel.com; x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: c19f4337-eb29-4bb5-261f-08d99df25890 x-ms-traffictypediagnostic: DM8PR11MB5672: x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:2043; x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: Ue5stbqIBLKbqBqBMH4SBP10Dhk7HUG6gYSTuKelgZnMwBqCQ9n79ephcJuYKkvFkfO8d6c3cyQCseaNVKqjVnT3G8IMpgwODTlFTMcTdX/OMnuEzPCXXLo/Mwe6xQqReSvzZBix7YeLE1eG13iR75CAMljBrZ6rKyPntkopHP2AtbJmMNS4C0rSvsZ9ONu8ZLYJgcOrxry774/sHXra5LCzPRyiFMQpLgyWQXdNPVoCvUOzPmbzaWqcBUJnzfFv7md5QJLpQ1OFUQxE8BAnHFK/F9UM7yUYQ4RzP1Nk31EB648T785oMfVry+4/sCTaLU3nhtcRFhs6xcshx/tfSoJbfrTM4mcPLLWHChMu6HHyEXWTPaFFcpB14PW1rQIBJRCD8YjAiT8z0gkEWr8PnxCwlZ7+ygNp54q0UUzpaAsLRKF8EfT5Cwy/Iqb+3cDTsGjpNUCcUQpiUMonRSaEMDhI60ElflpUYzndt9nLY1qEeLzVD/S5mcDHE7xx484/qSr/yFGnBO9Pa4CX8A16+lmOo8D1EYs8lsqMCtRVYaSdQc0cHu9MClXWt9Tnu04pt3KYFAFvYu7WOT0d1JwvGMiL0OGAPDbinKa8/VS2pc0O91QIO3HOLtNT55LENytrCxKErlaJvsLpVy8F9ZElKRTCXv72Z4uHplj6zR6zUOawCHsdwqqp186AIKZA7MBeCbt0QkbITRQ70f/bOfAFT61bm8Om1VJdIlLSVvkcJD53S17qLhMViok1xd9Bntpoq1fsQ9jnNZO2CiMYCCXcBVmWh5K5cvV7perCeTiwhQA= x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:DM8PR11MB5591.namprd11.prod.outlook.com; PTR:; CAT:NONE; SFS:(366004)(53546011)(8936002)(508600001)(6506007)(2906002)(66946007)(316002)(6636002)(9326002)(55016002)(5660300002)(66476007)(66556008)(9686003)(52536014)(64756008)(66446008)(186003)(82960400001)(7696005)(86362001)(83380400001)(33656002)(4326008)(26005)(38100700002)(38070700005)(76116006)(166002)(8676002)(966005)(122000001)(71200400001)(110136005); DIR:OUT; SFP:1102; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?XGCTxwxUun2LqIMd8da0RQ13TnCJE3Ru//BzSJbTDyy1YitXASBM618m7ZyH?= =?us-ascii?Q?+KspkOfIYXseoJ3xZlCSwwhfFc2VpRp9FWyvNOxHvOb74XwCXzkrnvQwau21?= =?us-ascii?Q?IabMTJMaSfHpP2i0eKky601IBf/jiueyNtMomhV/2ZiFTBVeAkTKTB7hmHqg?= =?us-ascii?Q?sZoLtMNOwO0wvySqyrydllFnhe2V4H1FO33BBA7oAkTwIMqBYf9H0rIOfnXX?= =?us-ascii?Q?ZK80jJQZjb1oCCY1C/dL4htnOEsksZjoDY+nbkojAtWFrkK/zSbS3sBwB2Jq?= =?us-ascii?Q?DboXQS9zbeHHcK5ZavkM/YdRqwU1CGvVS6dan3btdLQMj3wlnXNoaXqwuqEf?= =?us-ascii?Q?NJxbf9LtoFCOfJtMx30eXZKt2ZlvRRY8pldzFsXX9f1cK2M7CjlxdUfkM1jc?= =?us-ascii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mJeHEVxexzvjfXINoNC?= =?us-ascii?Q?xxe8yoAAFI1lGx918X2Kt/OgVxSdRriDaU4Asd7d8lWrx4R15MH7D2wUleM+?= =?us-ascii?Q?0oIGZBAeWkqIRr9a9UGEMbypFrfnNWBtLa9WGsIftrLSfJiryE7o80LbQVr5?= =?us-ascii?Q?7zocRPALvEgLFu1nGiDaKKCJvDrxpw9NzuvzvLEF3IScrZ4duZgKMaGogkrv?= =?us-ascii?Q?73XSAtfWroPuB/WC/h1kBTaQ8dYsx8BWtZ5RnypWjNGm3no4pkhjJ/BqMpuV?= =?us-ascii?Q?b39ev60c4Rkgaq2IUgMANmYQITH4vL/gw5pyBsL4YbXliOh2sxkfSme2rvX4?= =?us-ascii?Q?ceSFlg+6KuTb1ZKR8UPUEDdOtbPScoVfmIacJweg6AO+s7hCRaMD8VTuEqNc?= =?us-ascii?Q?6EF+SA=3D=3D?= MIME-Version: 1.0 X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: DM8PR11MB5591.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: c19f4337-eb29-4bb5-261f-08d99df25890 X-MS-Exchange-CrossTenant-originalarrivaltime: 02 Nov 2021 11:17:24.1790 (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: MSyFVOWjulYyjClrqxX+tx6WIISWdifzV7r0nE/rNj4LXOBaHVdr4TMHthjuhaAslHCJZ8ET688xPC7GOb0Szzso9Bb0M8yZSNBwhUwGpHM= X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM8PR11MB5672 X-OriginatorOrg: intel.com Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.29 Subject: Re: [dpdk-dev] [PATCH v1] test/crypto: fix: test vectors for zuc 256 bit key 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" Hi Sagar, Yes, those vectors pass for us too. >From our vectors, the ones for encryption (zuc256_test_case_cipher_1 and zu= c256_test_case_cipher_2) work for you, and only the authentication one (zuc= 256_test_case_auth_1) doesn't? Since verifying authentication is more difficult, we should try to cross ch= eck encryption, mainly check if we are generating the same keystream. Could you change the plaintext of your encryption test vector (zuc_test_cas= e_cipher_800b_key_256b ) to all 0s, and see which ciphertext you see (will be the keystream generated by your device). Our implementation actually matches with GmSSL library, so it looks like yo= u might have some issue in yours, but let's see. Thanks, Pablo From: Vidya Sagar Velumuri Sent: Tuesday, November 2, 2021 4:41 AM To: De Lara Guarch, Pablo ; Ankur Dwivedi <= adwivedi@marvell.com>; Anoob Joseph ; Tejasree Kondoj <= ktejasree@marvell.com>; Nithin Kumar Dabilpuram ; = Akhil Goyal ; Doherty, Declan Cc: dev@dpdk.org Subject: Re: [dpdk-dev] [PATCH v1] test/crypto: fix: test vectors for zuc 2= 56 bit key Hi Pablo, We verified vectors mentioned in below link in our platform and all the vec= tors passed (i.e: the digest matches with the doc). http://www.is.cas.cn/ztzl2016/zouchongzhi/201801/W020180126529970733243.pdf The ZUC-256 Stream Cipher The ZUC-256 Stream Cipher 5 3. X 2 =3D s 7L ks 5H 4. X 3 =3D s 2L ks 0H, wh= ere s iH is the high 16 bits of the cell s i and s jL is the low 16 bits of= the cell s j. F(X 0;X 1;X 2) 1. W =3D (X 0 R 1) R 2 2. W 1 =3D R 1 X 1 3. = W 2 =3D R 2 X 2 4. R 1 =3D S(L 1(W 1L kW 2H)) 5. R 2 =3D S(L 2(W 2L kW 1H))= , where S =3D (S 0;S 1;S 0;S 1) is the 4 parallel S-boxes which are the sam= e as those used in the previous ZUC ... www.is.cas.cn Could you please check if these vectors work in your platform. Regards Sagar ________________________________ From: Vidya Sagar Velumuri > Sent: 01 November 2021 15:53 To: De Lara Guarch, Pablo >; Ankur Dwivedi >; Anoob Joseph = >; Tejasree Kondoj >; N= ithin Kumar Dabilpuram >; Akhil Goyal >; Doherty= , Declan > Cc: dev@dpdk.org > Subject: Re: [dpdk-dev] [PATCH v1] test/crypto: fix: test vectors for zuc 2= 56 bit key Hi Pablo, Verified with updated test vector. the output did not change from previous= output but also, it did not match the ouput present in the vector. Regards Sagar ________________________________ From: De Lara Guarch, Pablo > Sent: 01 November 2021 03:36 To: Vidya Sagar Velumuri >; Ankur Dwivedi >; Ano= ob Joseph >; Tejasree Kondoj = >; Nithin Kumar Dabilpu= ram >; Akhil Goyal = >; Doherty, Declan > Cc: dev@dpdk.org > Subject: [EXT] RE: [dpdk-dev] [PATCH v1] test/crypto: fix: test vectors for= zuc 256 bit key External Email ________________________________ Hi Sagar, Thanks for flagging this. I submitted a patch fixing the IV of the test vec= tors I pushed (it didn't change the output): http://patches.dpdk.org/project/dpdk/patch/20211031220421.52181-1-pablo.de.= lara.guarch@intel.com/ Could you check if they work for you? Thanks, Pablo From: Vidya Sagar Velumuri > Sent: Saturday, October 30, 2021 1:26 PM To: De Lara Guarch, Pablo >; Ankur Dwivedi >; Anoob Joseph = >; Tejasree Kondoj >; N= ithin Kumar Dabilpuram >; Akhil Goyal >; Doherty= , Declan > Cc: dev@dpdk.org Subject: Re: [dpdk-dev] [PATCH v1] test/crypto: fix: test vectors for zuc 2= 56 bit key Hi Pablo, Tried the test vector zuc256_test_case_auth_1 and the digest did not match = with the generated digest in our platform. As per spec, IV[i] for i =3D 17 to=14 24 are 6-bit string occupying the 6 l= east signi cant bits of a byte. But in the vectors, The values in the IV(byte -17 to 24) are > 0x3f. Could you please elaborate how these bytes are considered for generation of= digest. Regards Sagar ________________________________ From: De Lara Guarch, Pablo > Sent: 29 October 2021 18:07 To: Vidya Sagar Velumuri >; Ankur Dwivedi >; Ano= ob Joseph >; Tejasree Kondoj = >; Nithin Kumar Dabilpu= ram >; Akhil Goyal = >; Doherty, Declan > Cc: dev@dpdk.org > Subject: [EXT] RE: [dpdk-dev] [PATCH v1] test/crypto: fix: test vectors for= zuc 256 bit key External Email ---------------------------------------------------------------------- Hi Vidya, > -----Original Message----- > From: dev > On Behalf O= f Vidya Sagar Velumuri > Sent: Wednesday, October 27, 2021 9:41 AM > To: adwivedi@marvell.com; anoobj@marvell.com= ; ktejasree@marvell.com; > ndabilpuram@marvell.com; gakhil@marvell.c= om; Doherty, Declan > > > Cc: dev@dpdk.org > Subject: [dpdk-dev] [PATCH v1] test/crypto: fix: test vectors for zuc 256= bit key > > Fix the IV and MAC in the test vectors added for zuc 256-bit key > > Fixes: fa5bf9345d4e (test/crypto: add ZUC cases with 256-bit keys) > > Signed-off-by: Vidya Sagar Velumuri > The new vectors are failing for us. Could you check if the ones we added wo= rk for you? Thanks, Pablo