From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by mx.groups.io with SMTP id smtpd.web09.17446.1665554307966838232 for ; Tue, 11 Oct 2022 22:58:28 -0700 Authentication-Results: mx.groups.io; dkim=fail reason="unable to parse pub key" header.i=@intel.com header.s=intel header.b=e9+9T2Ad; spf=pass (domain: intel.com, ip: 134.134.136.20, 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=1665554308; x=1697090308; h=from:to:cc:subject:date:message-id:references: in-reply-to:content-transfer-encoding:mime-version; bh=6A8jGXchMN5WCcxf+/qzF49bhn/ob7DrHCkNC674ipQ=; b=e9+9T2AdKZWkUXAb3fhuqahGK8WHe6GRKENYhJb0mq6dpyC0Nis6qShN xiVKhVWJCleK9w1ieHnoCc5l27MG4PnYiut4bhNJceZ29oDNVrRz07t3G kGVzXYKGgP+N7SkCIua2jT3y1MMr29OyN3kFJYsWgXXfn9kJI15MQoAvD 8EAdOT6fzrP2A7rOH/9nN96k0sdlW3i30kMmDhZ3CQT1VjtsK4i68K6I6 Fu+KbJOzbgpbNMiMPby1Cs9s34wsAPFfgiYbAnbTWdWvSZ9GOhCm2jRSW bHhpg8I4iWSoKNobpZGmQC476jtSj3XW9SbyDN8UeES9xI9dW/cKZ0sMZ A==; X-IronPort-AV: E=McAfee;i="6500,9779,10497"; a="292030633" X-IronPort-AV: E=Sophos;i="5.95,178,1661842800"; d="scan'208";a="292030633" Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by orsmga101.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 11 Oct 2022 22:57:48 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6500,9779,10497"; a="769081854" X-IronPort-AV: E=Sophos;i="5.95,178,1661842800"; d="scan'208";a="769081854" Received: from orsmsx601.amr.corp.intel.com ([10.22.229.14]) by fmsmga001.fm.intel.com with ESMTP; 11 Oct 2022 22:57:48 -0700 Received: from orsmsx608.amr.corp.intel.com (10.22.229.21) 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; Tue, 11 Oct 2022 22:57:47 -0700 Received: from orsmsx608.amr.corp.intel.com (10.22.229.21) by ORSMSX608.amr.corp.intel.com (10.22.229.21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.31; Tue, 11 Oct 2022 22:57:46 -0700 Received: from ORSEDG601.ED.cps.intel.com (10.7.248.6) by orsmsx608.amr.corp.intel.com (10.22.229.21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.31 via Frontend Transport; Tue, 11 Oct 2022 22:57:46 -0700 Received: from NAM11-BN8-obe.outbound.protection.outlook.com (104.47.58.168) 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; Tue, 11 Oct 2022 22:57:46 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=KkpoNqublzOPiijkZchMxpAkow3C7zV2LACdWaYUU1ctp8lyk73nJDez3lrMkcxRiOjVBd62UUby3eM9GEvxhML109ahCMdgso3HO0jePwvNQyFAPPXTvGSqCYbYazzn/eHgnCUpyOSdgnw2BxdSlUB6hyd7zK2snBfg0R+BYWZgco/ctA5KdcI5CFDt/ShHWw9p4Gc2xmwA5alSNIf+cdnHzbUuuH/DjimSuC8jHenE54g6CdGzL6Sx7R8f6+KXbOfZaFoxvX5F/5kN6kL8BP3tnc+xNHQTOTbkr20n3PXV8flQPbu1g8KnjhKqyUmSE1CMPXT9/XHHroDD7fkxZQ== 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=kFPRlrTT7zYmkYUALwxkDXGmAliBhWdX5M9MbtY1Oo8=; b=H7ar++RnCoa6lTa2ynVu8R+0TCmNG5ZPr2WltGgdqXrmZj29fkPVnQdvQL7ZXLaHdupOg98RL/HtPkdIoqsW1raBJ3F6gzDfb4Q2puatISlmiYWtTgZy6dLbM8w2IXIaaBoaaFCmRB65JF0WwtMXjQ/l2B0F4KdUqyo1ouXoaI4eavfjS83wCjIdRXQOLKVE1/S08DYc0loviNTnd/+divSppsE9jIVJg7XLArrYvpaGzaEyq1r1ee0ariKHKPHPlJMD5QxgrqHNsM+HZsxk5MuHM2x2mTwvIQ8UUgiqyYeviIyL2iHv2vL7b3UxzatxZML63VNRMH2iHus8TR0g9w== 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 SA1PR11MB6760.namprd11.prod.outlook.com (2603:10b6:806:25f::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5676.23; Wed, 12 Oct 2022 05:57:44 +0000 Received: from MW4PR11MB5872.namprd11.prod.outlook.com ([fe80::76b0:750c:a322:5acf]) by MW4PR11MB5872.namprd11.prod.outlook.com ([fe80::76b0:750c:a322:5acf%6]) with mapi id 15.20.5709.015; Wed, 12 Oct 2022 05:57:44 +0000 From: "Yao, Jiewen" To: "Zhang, Qi1" , "devel@edk2.groups.io" CC: "Wang, Jian J" , "Lu, Xiaoyu1" , "Jiang, Guomin" Subject: Re: [PATCH V2 0/3] CryptoPkg: Add EC key retrieving and signature interface. Thread-Topic: [PATCH V2 0/3] CryptoPkg: Add EC key retrieving and signature interface. Thread-Index: AQHY3eUSoPCqZk6L9kuTdDEV8Jl46a4KQzRw Date: Wed, 12 Oct 2022 05:57:44 +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_|SA1PR11MB6760:EE_ x-ms-office365-filtering-correlation-id: 96ba8725-6c53-4a43-69ca-08daac16ae95 x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: Zl5LCEajBDp4aD3tJrpJYjKyiLlcmCWDreX9DezHf9MpnpIQMKwzpkBc3GAVHjJCQtfiptXwabscGPtIH+h/Zq8o1a/HpuBhDQcwjIxL1+SQ9IMilkFJlL6ryHq9tDOI7Hc+mTmbX1+k70AgIfr43f9+cMT8yhAuPCwnk08jyywMmL6fvHa/QiB37kiG9T9hco9nPu0ZJCDMFZTThp6L0eHwx/tNU5An0q88+zSh17GLyg+Vr/BLaKc122HMPnDKdvVvLN/Qyrzy0mVeIBli1oC4WQTcj+oLW8MLt0kb9N3+YFfYitThkybHWAtZXsT/6xg2FhF1+6kH7Ute1EyOrIvr8WphUUajPi9UsQubIAKZltAIe9Tz0oEqTBFbUw/xaBjakScih0Yj/ym/gOeGXpwEhg/VQ1nCDvWNQFf/h2d0QtQquB4FHIidCLvlCYwFLmgltfqAf1w65LfZXhR26w0a8ivgpcEp4oW0pfvG6ctidS9q0CzXnley99HhCFj/YKsMnLP0LgSodhgyHLkDpRpl89wLHn1Oe+I1MaTK7iE/mJ53j48B1wXMN48Fie8AdyH7rXtjTKm9dGIBu157WO353T4U1pSBbk0QreFjwvBK3WW8OjuewBVlYRbaGCw/Cj8tVwZBUFd86Uda/x5mjyjETslCJGZE16ywNM6itLfoLvWBv9RJnKStBNVytVTQ1Xtloo1ANM2LUTocjbd6SoZ8wQZUnoI8jIs5zT/lz+BB6jQo4YznD6eAW40zF3haZerVoTGGnzY310+06EOxnGK6+TJ+mIz1HWV+GZ+VpDAGppNw3b4hCsdRMvWSK4ZvBc2xAS/iCq0pskU0ehfKWg== 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)(366004)(346002)(39860400002)(396003)(376002)(136003)(451199015)(7696005)(33656002)(316002)(110136005)(86362001)(54906003)(41300700001)(26005)(83380400001)(38070700005)(82960400001)(38100700002)(8676002)(478600001)(9686003)(122000001)(71200400001)(53546011)(107886003)(66446008)(66556008)(76116006)(64756008)(4326008)(19627235002)(966005)(52536014)(186003)(55016003)(66476007)(66946007)(8936002)(5660300002)(6506007)(2906002);DIR:OUT;SFP:1102; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?m2MEwoOehyLBn6DKAPH+YREwo3Wg3atD/YXGTVY1DoN+F8g7en5d6o/I6/Uu?= =?us-ascii?Q?PlIwLRRLGzb3a/TftUvUGRVs6raJa1BHjV3U5IiTGX9pOJNF3l3s7rMWmzdk?= =?us-ascii?Q?c+kBAhvsQftleGFYapeGq4xSsbnaASCJdG5hTOdE8yfAB5B0lj4LWr9gUHHf?= =?us-ascii?Q?0K92fVMHBYed2sawmGx0J3MUqdtBtG14Onafmannw5V9dxvg4AB1wW7fLNhM?= =?us-ascii?Q?lpPLsQP1OmPzHXL7xp6JSqjlgf4uGMFHfS+pYP3O3KGofeDfMvrllZ21xYrh?= =?us-ascii?Q?V+ojgGaaoDXAl3DSOhE8ghtLhSFiWl+qnyDRZWko/4Ae0kETiJqIX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Xc/nxJScK/bNIoMtniHbuISKWhr0OZjQeiwg1O?= =?us-ascii?Q?Pe6Trh/fB3lvm5qGZSk1FSAv4rNPKOJM/uVeBRuGDVQhmLPD51nMUFB+uzRB?= =?us-ascii?Q?Q4DPGtOG1T/fh9pIA0jRgjKSC5FB3KjvQwelV2gwZ4xOZFIfxp5zSwgSa17t?= =?us-ascii?Q?lJ89LwowAgxLQcuaeXRAn2a7Xs/T+7bQBhTug9QZRnRdI+pbPQ/Ss0XzkeUh?= =?us-ascii?Q?gmBSwD05O799nr68Y+X1HpeOjK1wrv14CfiAt1feyPr6SEzu1y1WLUkC8C1y?= =?us-ascii?Q?PVkOKvlKRhZaEaEFUC/sickUXWLOltocoGAUoUfyv4Ngk7WfeQJ8v6DesqMo?= =?us-ascii?Q?3JJ4J0l+s8QCBfq+aqFHg57Roy+fQuDlsoWiBG+V?= 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: 96ba8725-6c53-4a43-69ca-08daac16ae95 X-MS-Exchange-CrossTenant-originalarrivaltime: 12 Oct 2022 05:57:44.4163 (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: YTd/OtYJunDragiBJ1Dmi27lqqDxXiQ1sROvihwgMTS+/LKWpMO12L8sP7F+xR0V4ajE+u6SDyMj36n7wM4KYA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: SA1PR11MB6760 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/3469 > -----Original Message----- > From: Zhang, Qi1 > Sent: Wednesday, October 12, 2022 10:48 AM > To: devel@edk2.groups.io > Cc: Zhang, Qi1 ; Yao, Jiewen > ; Wang, Jian J ; Lu, Xiaoyu1 > ; Jiang, Guomin > Subject: [PATCH V2 0/3] CryptoPkg: Add EC key retrieving and signature > interface. >=20 > This patch is used to retrieve EC key from PEM and X509 and > carry out the EC-DSA signature and verify it. >=20 > The interface was tested by: > 1. DeviceSecurity on edk2-staging > https://github.com/tianocore/edk2-staging/tree/DeviceSecurity. > 2. Unit test in CryptoPkg/Test >=20 > REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3D4102 > PR: https://github.com/tianocore/edk2/pull/3464 >=20 > V2 change: change the protocol version. >=20 > Cc: Jiewen Yao > Cc: Jian J Wang > Cc: Xiaoyu Lu > Cc: Guomin Jiang > Signed-off-by: Qi Zhang >=20 > Qi Zhang (3): > CryptoPkg: Add EC key retrieving and signature interface. > CryptoPkg: Add EC key interface to DXE and protocol > CryptoPkg: add unit test for EC key interface. >=20 > CryptoPkg/Driver/Crypto.c | 143 +++++++++- > CryptoPkg/Include/Library/BaseCryptLib.h | 129 +++++++++ > .../Pcd/PcdCryptoServiceFamilyEnable.h | 4 + > CryptoPkg/Library/BaseCryptLib/Pem/CryptPem.c | 87 ++++++ > .../Library/BaseCryptLib/Pem/CryptPemNull.c | 30 ++ > CryptoPkg/Library/BaseCryptLib/Pk/CryptEc.c | 258 > ++++++++++++++++++ > .../Library/BaseCryptLib/Pk/CryptEcNull.c | 82 ++++++ > CryptoPkg/Library/BaseCryptLib/Pk/CryptX509.c | 83 ++++++ > .../Library/BaseCryptLib/Pk/CryptX509Null.c | 28 ++ > .../BaseCryptLibNull/Pem/CryptPemNull.c | 30 ++ > .../Library/BaseCryptLibNull/Pk/CryptEcNull.c | 82 ++++++ > .../BaseCryptLibNull/Pk/CryptX509Null.c | 28 ++ > .../BaseCryptLibOnProtocolPpi/CryptLib.c | 136 +++++++++ > CryptoPkg/Private/Protocol/Crypto.h | 131 ++++++++- > .../UnitTest/Library/BaseCryptLib/EcTests.c | 156 +++++++++++ > 15 files changed, 1405 insertions(+), 2 deletions(-) >=20 > -- > 2.26.2.windows.1