From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) by mx.groups.io with SMTP id smtpd.web12.5921.1663927775249381730 for ; Fri, 23 Sep 2022 03:09:35 -0700 Authentication-Results: mx.groups.io; dkim=fail reason="unable to parse pub key" header.i=@intel.com header.s=intel header.b=AkURRhGG; spf=pass (domain: intel.com, ip: 134.134.136.65, mailfrom: jiewen.yao@intel.com) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1663927775; x=1695463775; h=from:to:cc:subject:date:message-id:references: in-reply-to:content-transfer-encoding:mime-version; bh=nLFeSX5ZBa2ooenzut94BSPdwK++H/NiIrwGPF+DrSs=; b=AkURRhGGPqK48HBOHPYEsJgWGXFCkKleAxfG+834SrtDyVyS4WQUra1f PXY4aq9kaMN4KWmPLvyLC0QWyTWdVKKR3VrPHLwAapQFp+Dgi8PXBbVl1 VM7iN2sdtM3WyGPA7nOGS+U+KiZI3MpSalPz4e9J7q7NWcNOqUQP/6aYR aEQubjleRus5ThrLl8d+cG5Uztqem+nzyXfVfSaCVSYD7cpFf6xk8WjnD Lj+LC+jSN6adBpuPgLkFAod73Y4r9wTNyXNDr4MZMB9395bKwPZP64ACQ uZoCOIJ1f2HsJK930wKnMlP9bsWXZk+FRjy9/Kuz/bQps3b7PUTQo6M9A w==; X-IronPort-AV: E=McAfee;i="6500,9779,10478"; a="302006859" X-IronPort-AV: E=Sophos;i="5.93,337,1654585200"; d="scan'208";a="302006859" Received: from orsmga002.jf.intel.com ([10.7.209.21]) by orsmga103.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 23 Sep 2022 03:09:34 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.93,337,1654585200"; d="scan'208";a="620164539" Received: from orsmsx601.amr.corp.intel.com ([10.22.229.14]) by orsmga002.jf.intel.com with ESMTP; 23 Sep 2022 03:09:34 -0700 Received: from orsmsx611.amr.corp.intel.com (10.22.229.24) by ORSMSX601.amr.corp.intel.com (10.22.229.14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.31; Fri, 23 Sep 2022 03:09:34 -0700 Received: from orsmsx607.amr.corp.intel.com (10.22.229.20) by ORSMSX611.amr.corp.intel.com (10.22.229.24) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.31; Fri, 23 Sep 2022 03:09:34 -0700 Received: from ORSEDG601.ED.cps.intel.com (10.7.248.6) by orsmsx607.amr.corp.intel.com (10.22.229.20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.31 via Frontend Transport; Fri, 23 Sep 2022 03:09:34 -0700 Received: from NAM12-BN8-obe.outbound.protection.outlook.com (104.47.55.174) 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.2375.31; Fri, 23 Sep 2022 03:09:32 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=A/SoJiA96NqlMTvLjFBcd41I7HvrmhcQ4tjQ5ZkLtOUZvPdX8r1Z6ZvigwpF051sEpTKb8uyayV2BNZPT8LpCxjBGuG09h7Npfo3TBrnMccfgK6IwxV3vQyFMk0F9Lpkl/o96scgDDRMbfWJhxlelIaKHpjyormnyElou4jD+Y1vC3joROA/fStmlGDJUqffDshwGE6nJe+rJtUwLHa1DeNHxKz2jwosy9lWCiLP3/Cu0oXoksq8zJyp3WlFDCxvL4DsxhdxNMt/aKZNyZ0zCIhl3dCdug7V/LfkPjlTfsNHFSkRmSjXEkfi3fIBS5csFtInlBtw2Zw7hseKEd/GAA== 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=g+tQcuFPfpx5a4K1V73JBrP7deB5rMR4liAOkFjwu34=; b=TpCr9zWHoK5XI3HPX9ES/MdIuBfULufdEChEFVD4uxQrrGXCyRCeaJ2DkAE8DvFKgNXpen/bxMl2rLp3Gd3LVHK/kesPIsu4kXc0dod1BaLyj59jE2nlyv4Yz3QlkuACVckJF1KuoiLMbLyOF/KUT/hWqj5RPWBQoqjOamcRvPjiW7jAlt9cl5rAPNuG2iDpaAjYxwH9I3GoXofJJuDwjNP3QWkmKkDwiz5fLew3YLynFkhUkfG1HsHryQjLvngIwsXfuMQ21l8wmxnvgK9dFj+cq8z/yIMGFAMqkHnAtYc717Vx7Y63Y+0RzVjaBQJV118xwOdMc2usk73XhPe9iA== 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 Received: from MW4PR11MB5872.namprd11.prod.outlook.com (2603:10b6:303:169::14) by CO6PR11MB5619.namprd11.prod.outlook.com (2603:10b6:5:358::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5654.20; Fri, 23 Sep 2022 10:09:31 +0000 Received: from MW4PR11MB5872.namprd11.prod.outlook.com ([fe80::c17d:f1c9:e958:b5e]) by MW4PR11MB5872.namprd11.prod.outlook.com ([fe80::c17d:f1c9:e958:b5e%6]) with mapi id 15.20.5654.020; Fri, 23 Sep 2022 10:09:31 +0000 From: "Yao, Jiewen" To: "Li, Yi1" , "devel@edk2.groups.io" CC: "Wang, Jian J" , "Lu, Xiaoyu1" , "Jiang, Guomin" Subject: Re: [PATCH V3 0/3] CryptoPkg: Add BigNum support Thread-Topic: [PATCH V3 0/3] CryptoPkg: Add BigNum support Thread-Index: AQHYzzSSxglAuMZ9hkKaPsAPIUxGYA== Date: Fri, 23 Sep 2022 10:09:30 +0000 Message-ID: References: In-Reply-To: Accept-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: dlp-version: 11.6.500.17 dlp-product: dlpe-windows dlp-reaction: no-action authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=intel.com; x-ms-publictraffictype: Email x-ms-traffictypediagnostic: MW4PR11MB5872:EE_|CO6PR11MB5619:EE_ x-ms-office365-filtering-correlation-id: cd8978a3-bf34-4fe2-6f0a-08da9d4bb4e3 x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: OocrUfQM668bRGXlWpDZ1fbUgsZUwpwRp6sHsBUZqqxzp1bOf1VryoSvgdSYiWcid+4dFiBWrm/JjtosQW3y6PaVMcGfinPPoPBRo4myqcgtLGoa4lAxqO14TzyDwlPDUB4SwQiijfXn7M++sp6dzpkAQJ2nMWgniRT4MutqBiJ+e/XCyk30EMHjirqbqG77ABjS+2r+xEVHv4QPFq9/5aGXvs9iltSwPDyZxD6HhDPLIEcQQCi8qtW8GlM36qaLX54CWTie77UoNXYXUVF00u+uwTJ5tGPmVKkkuqAmM8QpOpoUjSbZVIjPyYe1sO9RatbvrdW+gQYiqmFvZu5TcuSjraBhYXvjHbCccTd2bA6Zq0Wrvu4xbr/Z008G9pN9t6PjSNTrDu2bZpas7WlIlMnbJ1T6EXya0QiNBvqIJD+BrUd3Jthp3tF5SnadxgFLHtF/ojakK8XOfNICCg02tUhTMLvjcimR3SNZc/iFWTOE7XlaWWHQMl3PRlm0SbTcTe/aSZTVKohkS55mCaARvVVHJdfRD9l2oFzx3kXTETKnTKt7G99kT4G0dxwsGrCKMZ62fu8pgHrIMvPw10ywaCi5ILe6mgxha9jYMaHYCeZjWJ6PDucGzC+sP2fxuv8Mn260M/yzcHrqj3pVlCRR7D8pzeBXIYRwLvuiJunvzTQ9mwbDSY/Y7agrXvAbfER8vDyanJN8jb1E5pAT6yciDrW5BkJA8zdyuaUh+Jl0o5pDH0yO6ZwtFb3SbdEtS+mnPy+lIysVvGZUUX86QDPbwRUWnb6M0rvrIzLx1OeHeuiVpESgxd3dKY9qSO04zR2pd2ksjhpzZdanuM8VodvdOQ== x-forefront-antispam-report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:MW4PR11MB5872.namprd11.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230022)(396003)(366004)(136003)(376002)(346002)(39860400002)(451199015)(82960400001)(38100700002)(71200400001)(478600001)(38070700005)(66476007)(186003)(66446008)(76116006)(83380400001)(64756008)(66556008)(4326008)(86362001)(66946007)(52536014)(9686003)(966005)(26005)(110136005)(6506007)(7696005)(54906003)(53546011)(2906002)(107886003)(5660300002)(8676002)(8936002)(122000001)(55016003)(316002)(33656002)(41300700001);DIR:OUT;SFP:1102; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?+HkfssyX/lFGE9K3q/vBIsF5iU54AvaHwIv4c4WjtLaJkw8w1zTSKUzE9Wrn?= =?us-ascii?Q?H7wKxtd4efWdMPBgsJ7J5RS0vKUu27SFSjnNOoiS1/weBw+9w0IPIaRB57Av?= =?us-ascii?Q?qPl4Wg6JjfKWiRKKZPaqp35pzFkM1ZLDj9Kc1KchxU1ljoJ8182JP1OLXWOL?= =?us-ascii?Q?iK/vBXqdzdiyI7uk/vwmlNBPtAlu3LwwiYvBkn2VQSKKt3phD22/7LP+xjJa?= =?us-ascii?Q?XFTeyIQsIbswJg+TE4ZKnfOIaG2BAmHh0hDXIuxY5Xyg8eT66i2sWRt9jwH1?= =?us-ascii?Q?oJMkh6EIoXqPSsijTJnmCumpqY3gDqqjHrDXrqj3I0cR3itUISljO+QFcZej?= =?us-ascii?Q?aKBTSOnKfAU7Jyi5eMogM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JSA/lyh5jJFmZUSwY/872SeH7+SS/xHh7r+REXbnqiaCcHlqygopN752+2V0?= =?us-ascii?Q?nq8svRAuS9kWZTCO7EQXnD4nyk4jlEvnM5C8wmIoeK/uOOnsfCg1JIYc6Nfi?= =?us-ascii?Q?T+fsImmazhFlX8YIB3EtLFx1xDGynwe6njLCuB/vIAKxJlXbHot1q4Ipabn9?= =?us-ascii?Q?ZiQGgWcOHfiEZrG/pDf3QgC4xPBMCsiCURQFXVS50FtZtS6E5FJgXYmOmQze?= =?us-ascii?Q?jYXVgc8p0ykfMClT1nC1sLk6hCykD1hzJmXgs8en3yI3hQs2b+pc9R0Pc8J6?= =?us-ascii?Q?UiVrr10Ukg7ODzuUtQAEQJU8ul7ZgBo0OVvDqB/3?= MIME-Version: 1.0 X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: MW4PR11MB5872.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: cd8978a3-bf34-4fe2-6f0a-08da9d4bb4e3 X-MS-Exchange-CrossTenant-originalarrivaltime: 23 Sep 2022 10:09:30.8632 (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: wMgaY5pJvQvAv9wgFiDQuxMkE3kfDvzpWnz8AAqoectkrek6mePlulgKN5p09K20EdqU1ofc3/6R8mCAbdU/jg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: CO6PR11MB5619 Return-Path: jiewen.yao@intel.com X-OriginatorOrg: intel.com Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Reviewed-by: Jiewen Yao Merged https://github.com/tianocore/edk2/pull/3390 > -----Original Message----- > From: Li, Yi1 > Sent: Wednesday, September 21, 2022 1:28 PM > To: devel@edk2.groups.io > Cc: Li, Yi1 ; Yao, Jiewen ; Wang, > Jian J ; Lu, Xiaoyu1 ; Jiang= , > Guomin > Subject: [PATCH V3 0/3] CryptoPkg: Add BigNum support >=20 > REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3D3828 >=20 > Review PR: https://github.com/tianocore/edk2/pull/3309 > This patch sequence is used to add CryptBn library, which are wrapped > over OpenSSL. The implementation provides library functions for EFI > BaseCrypt protocol and EFI BaseCrypt Configuration Protocol. >=20 > All APIs passed unit test and fuzzing test, detail as: > 1. Unit test: > The purpose of unit testing is to ensure that the function obtains the > expected result under specific input, that is, to ensure the correctness > of APIs. > All test case show in patch 3 :CryptoPkg/Test: Add unit test for CryptoBn= . > 2. Fuzzing test: > Various Fuzz Testing are employed across the all introduced APIs, and the > test is used AFL (2.52b) and Libfuzzer (clang+llvm-11.0.0) as the fuzzer, > based on HBFA. > Fuzzing Pass Rate is 100%; > The Code Coverage new APIs is 100%; > All test case show in: > https://github.com/liyi77/edk2- > staging/tree/HBFA/HBFA/UefiHostFuzzTestCasePkg/TestCase/CryptoPkg >=20 > V2 change: > 1. Squash uncrustify tool update into previous patch. > 2. Increase EDKII_CRYPTO_VERSION to 9. >=20 > Tested-by: Yi Li > Cc: Jiewen Yao > Cc: Jian J Wang > Cc: Xiaoyu Lu > Cc: Guomin Jiang >=20 > Signed-off-by: Yi Li >=20 > Yi Li (3): > CryptoPkg: Add BigNum support > CryptoPkg: Add BigNum API to DXE and protocol > CryptoPkg/Test: Add unit test for CryptoBn >=20 > CryptoPkg/CryptoPkg.dsc | 1 + > CryptoPkg/Driver/Crypto.c | 520 +++++++++++++++- > CryptoPkg/Include/Library/BaseCryptLib.h | 418 +++++++++++++ > .../Pcd/PcdCryptoServiceFamilyEnable.h | 30 + > .../Library/BaseCryptLib/BaseCryptLib.inf | 1 + > CryptoPkg/Library/BaseCryptLib/Bn/CryptBn.c | 581 > ++++++++++++++++++ > .../Library/BaseCryptLib/Bn/CryptBnNull.c | 520 ++++++++++++++++ > .../Library/BaseCryptLib/PeiCryptLib.inf | 1 + > .../Library/BaseCryptLib/SmmCryptLib.inf | 1 + > .../BaseCryptLib/UnitTestHostBaseCryptLib.inf | 1 + > .../BaseCryptLibNull/BaseCryptLibNull.inf | 1 + > .../Library/BaseCryptLibNull/Bn/CryptBnNull.c | 520 ++++++++++++++++ > .../BaseCryptLibOnProtocolPpi/CryptLib.c | 492 +++++++++++++++ > CryptoPkg/Private/Protocol/Crypto.h | 429 ++++++++++++- > .../BaseCryptLib/BaseCryptLibUnitTests.c | 1 + > .../UnitTest/Library/BaseCryptLib/BnTests.c | 266 ++++++++ > .../Library/BaseCryptLib/TestBaseCryptLib.h | 3 + > .../BaseCryptLib/TestBaseCryptLibHost.inf | 1 + > .../BaseCryptLib/TestBaseCryptLibShell.inf | 1 + > 19 files changed, 3786 insertions(+), 2 deletions(-) > create mode 100644 CryptoPkg/Library/BaseCryptLib/Bn/CryptBn.c > create mode 100644 CryptoPkg/Library/BaseCryptLib/Bn/CryptBnNull.c > create mode 100644 > CryptoPkg/Library/BaseCryptLibNull/Bn/CryptBnNull.c > create mode 100644 > CryptoPkg/Test/UnitTest/Library/BaseCryptLib/BnTests.c >=20 > -- > 2.31.1.windows.1