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 E6820A00C3; Fri, 16 Sep 2022 19:06:53 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 809444021D; Fri, 16 Sep 2022 19:06:53 +0200 (CEST) Received: from mx0b-0016f401.pphosted.com (mx0b-0016f401.pphosted.com [67.231.156.173]) by mails.dpdk.org (Postfix) with ESMTP id 61EF840156 for ; Fri, 16 Sep 2022 19:06:52 +0200 (CEST) Received: from pps.filterd (m0045851.ppops.net [127.0.0.1]) by mx0b-0016f401.pphosted.com (8.17.1.5/8.17.1.5) with ESMTP id 28G68PvX016620; Fri, 16 Sep 2022 10:06:51 -0700 Received: from nam11-co1-obe.outbound.protection.outlook.com (mail-co1nam11lp2175.outbound.protection.outlook.com [104.47.56.175]) by mx0b-0016f401.pphosted.com (PPS) with ESMTPS id 3jm8y74ffp-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 16 Sep 2022 10:06:51 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Aj4sYFJxu4nosEbCJ9BXgzT54uQANw8/Id88ZcNfrlCZxEIdtB7R12K53na93EYMgkJuzQp8V9m+wPwSjk0wgYmWji8unT3L6gIWSD6dN1BOdycWlbcTpc1Aike0+/qGxkt3tUkZa/nMJKl7eiM3ZpzwVonc+COIcWUNlrzz1vQUYmJ+JhxAVMNj7LN3TdFbwD4uvXu8W1UGEv+5gA+p5i/5sYWSrbnbblzbq8veU+FE4/AGXNqAgdHDXBh1G0DRyaF3OuDwvZyY8G4EAz9hkqsccLYPb7UOyEF9KrG1iOXn2nDK7wbvyB7YPKxfXihhHR1nguWDh3iuAgPv0YGoQA== 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=DPFc1j2rdXQHUGFF3+d4ILs3/t88M3k/R4EhDRZKjP4=; b=LdNU3TUeSQayRo3F8h/0wnGc6l+iLc195/YcInwtLRVP9NdDtMAR/rdlmaPRLQvCFySxNDz/be8dpTkf9cEDqMqGRqUjT59f6gitK0kaW4xObjeJSeqSjuf3+y/mcV2Jrf3AOU9jJSJEd8h1UWUJmd2Viyy0qdHiVAkU6dRDbzNFGSsQMOYwywXMJC+PQQB4M+JTExl3umKdHaX7lq3I/v983pK9JmZqHF+q6Ups4rQDpiuTcb/mzjtvRiTtKwFOEOGBzVGa4ePOzMjs3cxjzRvhlyN0gbuOEUS7eiSM6U6PzSZab1NgM0ZbJk72O0hPyIm9eqmBvs6hqFZeh3L3Ww== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=marvell.com; dmarc=pass action=none header.from=marvell.com; dkim=pass header.d=marvell.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=marvell.onmicrosoft.com; s=selector1-marvell-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=DPFc1j2rdXQHUGFF3+d4ILs3/t88M3k/R4EhDRZKjP4=; b=dC803UWAG2Xdz3MsF7vrMemF4wafXwVWHpAD0WVFsW++RAxaRTi6DijMVPoLctghWX2bR+insAu3i1xqX81C3fr4EyvUQjHMUosBV5KEEMs2hQ3gm5abhveWGGoyFBlBCIz41MX9hTShWFv7KobKFmjOd1j7K6N/4/uA7/5wv60= Received: from CO1PR18MB4714.namprd18.prod.outlook.com (2603:10b6:303:e9::18) by MW5PR18MB5149.namprd18.prod.outlook.com (2603:10b6:303:1c7::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5612.22; Fri, 16 Sep 2022 17:06:49 +0000 Received: from CO1PR18MB4714.namprd18.prod.outlook.com ([fe80::910f:ba52:707b:7b0f]) by CO1PR18MB4714.namprd18.prod.outlook.com ([fe80::910f:ba52:707b:7b0f%9]) with mapi id 15.20.5632.016; Fri, 16 Sep 2022 17:06:49 +0000 From: Gowrishankar Muthukrishnan To: Brian Dooley , Fan Zhang CC: "dev@dpdk.org" , Akhil Goyal , "kai.ji@intel.com" , Anoob Joseph Subject: RE: [EXT] [PATCH v3] examples/fips_validation: add parsing for AES GMAC Thread-Topic: [EXT] [PATCH v3] examples/fips_validation: add parsing for AES GMAC Thread-Index: AQHYyaqzQ5uId3BBqEas9sKNM/D2aq3iINag Date: Fri, 16 Sep 2022 17:06:48 +0000 Message-ID: References: <20220901103501.304471-1-brian.dooley@intel.com> <20220916085943.21916-1-brian.dooley@intel.com> In-Reply-To: <20220916085943.21916-1-brian.dooley@intel.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-ms-publictraffictype: Email x-ms-traffictypediagnostic: CO1PR18MB4714:EE_|MW5PR18MB5149:EE_ x-ms-office365-filtering-correlation-id: 062aec5f-96cc-442e-1fa3-08da9805d7d8 x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: SUK9Zo2VnsEDK+qxjPZs79smiBwU1BZuo7v/1b3EYdQ7iEM87a3grUBDUr6H1TxUKpKkB2PiMeRgbUDn4xbhnFlx1i7BpQTwaGJl0vd6MZYrGBfvkV4W5rlg4KxOpoXMACjDDI+ZYRJJt8eC6JDgwKl8OBN+IfQpRPb0HIuM3XbnxMTN4wEEPL1Ar6j16aNOrGwK+73GCSNRgsCt5zyxZ7eLvOc8pQMVWl/xdUv2BYdxcwgHeOHNlMdbq09DWxtU3PR2hSnISVXCdGLE4ypbFzH9bk/uXBxLVlaerS4g0Hic7K8iFWzJ8Kb7yWlOaVFEqPf9k/vKLe4TvGxlp8ax5GkjzH4sJYAvxX3UgH+IcpH7sHbHwJ2pv2pYCC34e4GZx1ho3rqcfT6pOgttCvgNVdBUYnZa0NIhjfMqD02QI8hxGovYt5fb1nAgBx/iyOqLzZWJx32WPbmmNF4QCwl6Q+rQnmrwYV6FXk0+AGxeTijRNiMgHIffpX9ltu2PpFz2g8IbuFp4YvrCFzdRpnBh1/Fsh+NAz+xphfn+G8tpaUBWI+1X1BSK2M8UH8f1g/x0llbTAZW9Q3Ia7WpY7Vfvm8bZjqVLpf3oY1WBhk9V4gG1L2jjL/omYNI4YH/nzT9Wpw1rzHLlaQ97oYqzM+UHRIBs9TzS/sGLtbi2YFV/21gNCwSeosIN30lcr8ZFJ585F+5EFgBgj7ggy1Q35kzXpjCXzHdukO/IOj0uvUiKvQ2TsalCGyHmAxvGxsDPeXAUeDjoNPMMIH5bSKT+n63jqw== x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:CO1PR18MB4714.namprd18.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230022)(4636009)(346002)(39860400002)(366004)(396003)(376002)(136003)(451199015)(33656002)(55016003)(478600001)(52536014)(76116006)(66476007)(8676002)(64756008)(66446008)(5660300002)(8936002)(4326008)(66556008)(316002)(38070700005)(66946007)(110136005)(54906003)(122000001)(38100700002)(186003)(41300700001)(2906002)(9686003)(83380400001)(107886003)(6506007)(71200400001)(26005)(7696005)(86362001)(53546011); DIR:OUT; SFP:1101; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?Fp/lYcCl4l8oSzW5pJGoOGRpn80yqlfhaXlTjMwtvZq9dQMbhLwkjd1jxNRo?= =?us-ascii?Q?T3Dzgqz+X6fkQb4cyl8dT1180C4t43jGjGGZ3y+e4WRaApx5dcKKbUHPU4U+?= =?us-ascii?Q?+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2k3xcOsaKsNFyrakjyyc4j?= =?us-ascii?Q?EOfOGPWFiokNBGGa8ZhXK/Z1S9btUeTiabNHljhYe8KwhxK7OaZYrKMTWSDI?= =?us-ascii?Q?01mKRd54haLhnaD4zLBkU26lcX0k3g9nUdvNUOv6wsY9d99T8DbvyZju1IXK?= =?us-ascii?Q?ibDYVrfI/J0E345w/oNc0rzQcGC14HrToTCWf0yzU+YMAx5VE1uo/8YDeX7E?= =?us-ascii?Q?wu/WEJcfjkKJdlNf1L0md+wb4GhHm8jXqpeMg2i3FQdyRmkm4njgDJLd5tLE?= =?us-ascii?Q?+BMiOtvI8n0yz7oQh7bgSaFKzp7Vut0pAqjsBQm0+AKp0v0xfUM/xSHzO275?= =?us-ascii?Q?MRtF/oRTs6N4821EGL7FkitY5qAoh8R4cF1wDJE2PYsL+9VCPj9c5LH59z4B?= =?us-ascii?Q?30+XSgj6UHm7vVTCzbLnhzvmDyjj2f/gYm3dGQYZkyN7fGe3L0ul8XlKMDrL?= =?us-ascii?Q?ULQKgzYj96lHEgghCaVLGXLE8vLPuM8cAj1zDPo8M05T0CZP5GqMqRXAh+qZ?= =?us-ascii?Q?T7SthoPsDXG9ZhxWwIJPN1OfWXvCqU9IDimP10HZ6kDj/jH8HaHNeJ3lwrr1?= =?us-ascii?Q?FODHm5TzV00eR+PCS2AbdGtMAhiOiI8FEB96RxC4?= Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: marvell.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: CO1PR18MB4714.namprd18.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 062aec5f-96cc-442e-1fa3-08da9805d7d8 X-MS-Exchange-CrossTenant-originalarrivaltime: 16 Sep 2022 17:06:48.9557 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 70e1fb47-1155-421d-87fc-2e58f638b6e0 X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: M1aaNR9y306c7wEil/NA149lIPi5+EHO3y0QiubMiDrap7V/1ifXsJy9wffHsSw4+rBgIBSSF/pUSI5lWCXYSKPbyMSh4f583xbKQx6pM5Y= X-MS-Exchange-Transport-CrossTenantHeadersStamped: MW5PR18MB5149 X-Proofpoint-ORIG-GUID: E8qX_eJaZ2y8KyeNXyN7YmANPvrESGvV X-Proofpoint-GUID: E8qX_eJaZ2y8KyeNXyN7YmANPvrESGvV X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.205,Aquarius:18.0.895,Hydra:6.0.528,FMLib:17.11.122.1 definitions=2022-09-16_10,2022-09-16_01,2022-06-22_01 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 Tested with FIPS test vectors from NIST. Acked-by: Gowrishankar Muthukrishnan Thanks, Gowrishankar > -----Original Message----- > From: Brian Dooley > Sent: Friday, September 16, 2022 2:30 PM > To: Fan Zhang ; Brian Dooley > > Cc: dev@dpdk.org; Gowrishankar Muthukrishnan > ; Akhil Goyal ; > kai.ji@intel.com > Subject: [EXT] [PATCH v3] examples/fips_validation: add parsing for AES > GMAC >=20 > External Email >=20 > ---------------------------------------------------------------------- > Added functionality to parse algorithm for AES GMAC test >=20 > Signed-off-by: Brian Dooley > Acked-by: Kai Ji > --- > v2: add random internal iv generation > --- > v3: in reply to fix and patchwork CI > --- > examples/fips_validation/fips_validation.c | 2 ++ > examples/fips_validation/fips_validation.h | 1 + > .../fips_validation/fips_validation_gcm.c | 13 ++++++------ > examples/fips_validation/main.c | 21 +++++++++++++++++++ > 4 files changed, 31 insertions(+), 6 deletions(-) >=20 > diff --git a/examples/fips_validation/fips_validation.c > b/examples/fips_validation/fips_validation.c > index 12b9b03f56..5c7ecce412 100644 > --- a/examples/fips_validation/fips_validation.c > +++ b/examples/fips_validation/fips_validation.c > @@ -458,6 +458,8 @@ fips_test_parse_one_json_vector_set(void) > /* Vector sets contain the algorithm type, and nothing else we need. > */ > if (strstr(algo_str, "AES-GCM")) > info.algo =3D FIPS_TEST_ALGO_AES_GCM; > + else if (strstr(algo_str, "AES-GMAC")) > + info.algo =3D FIPS_TEST_ALGO_AES_GMAC; > else if (strstr(algo_str, "HMAC")) > info.algo =3D FIPS_TEST_ALGO_HMAC; > else if (strstr(algo_str, "CMAC")) > diff --git a/examples/fips_validation/fips_validation.h > b/examples/fips_validation/fips_validation.h > index 5c1abcbd91..24edab68da 100644 > --- a/examples/fips_validation/fips_validation.h > +++ b/examples/fips_validation/fips_validation.h > @@ -36,6 +36,7 @@ enum fips_test_algorithms { > FIPS_TEST_ALGO_AES =3D 0, > FIPS_TEST_ALGO_AES_CBC, > FIPS_TEST_ALGO_AES_GCM, > + FIPS_TEST_ALGO_AES_GMAC, > FIPS_TEST_ALGO_AES_CMAC, > FIPS_TEST_ALGO_AES_CCM, > FIPS_TEST_ALGO_AES_XTS, > diff --git a/examples/fips_validation/fips_validation_gcm.c > b/examples/fips_validation/fips_validation_gcm.c > index 6b3d158629..7e1bd77faf 100644 > --- a/examples/fips_validation/fips_validation_gcm.c > +++ b/examples/fips_validation/fips_validation_gcm.c > @@ -291,13 +291,14 @@ parse_test_gcm_json_writeback(struct fips_val > *val) >=20 > if (info.op =3D=3D FIPS_TEST_ENC_AUTH_GEN) { > json_t *ct; > + if (!info.interim_info.gcm_data.is_gmac) { > + tmp_val.val =3D val->val; > + tmp_val.len =3D vec.pt.len; >=20 > - tmp_val.val =3D val->val; > - tmp_val.len =3D vec.pt.len; > - > - writeback_hex_str("", info.one_line_text, &tmp_val); > - ct =3D json_string(info.one_line_text); > - json_object_set_new(json_info.json_write_case, > CT_JSON_STR, ct); > + writeback_hex_str("", info.one_line_text, > &tmp_val); > + ct =3D json_string(info.one_line_text); > + json_object_set_new(json_info.json_write_case, > CT_JSON_STR, ct); > + } >=20 > if (info.interim_info.gcm_data.gen_iv) { > json_t *iv; > diff --git a/examples/fips_validation/main.c > b/examples/fips_validation/main.c index 8bd5a66889..9118ca4d92 100644 > --- a/examples/fips_validation/main.c > +++ b/examples/fips_validation/main.c > @@ -669,6 +669,21 @@ prepare_auth_op(void) >=20 > __rte_crypto_op_reset(env.op, > RTE_CRYPTO_OP_TYPE_SYMMETRIC); >=20 > + if (info.interim_info.gcm_data.gen_iv =3D=3D 1) { > + uint32_t i; > + > + if (!vec.iv.val) { > + vec.iv.val =3D rte_malloc(0, vec.iv.len, 0); > + if (!vec.iv.val) > + return -ENOMEM; > + } > + > + for (i =3D 0; i < vec.iv.len; i++) { > + int random =3D rand(); > + vec.iv.val[i] =3D (uint8_t)random; > + } > + } > + > if (vec.iv.len) { > uint8_t *iv =3D rte_crypto_op_ctod_offset(env.op, uint8_t *, > IV_OFF); > @@ -1817,6 +1832,11 @@ init_test_ops(void) > else > test_ops.test =3D fips_generic_test; > break; > + case FIPS_TEST_ALGO_AES_GMAC: > + test_ops.prepare_op =3D prepare_auth_op; > + test_ops.prepare_xform =3D prepare_gmac_xform; > + test_ops.test =3D fips_generic_test; > + break; > case FIPS_TEST_ALGO_AES_GCM: > test_ops.prepare_op =3D prepare_aead_op; > test_ops.prepare_xform =3D prepare_gcm_xform; @@ -1994,6 > +2014,7 @@ fips_test_one_test_group(void) > json_object_set_new(json_info.json_write_group, "tests", > write_tests); >=20 > switch (info.algo) { > + case FIPS_TEST_ALGO_AES_GMAC: > case FIPS_TEST_ALGO_AES_GCM: > ret =3D parse_test_gcm_json_init(); > break; > -- > 2.25.1