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.web10.14953.1665534814306707847 for ; Tue, 11 Oct 2022 17:33:34 -0700 Authentication-Results: mx.groups.io; dkim=fail reason="unable to parse pub key" header.i=@intel.com header.s=intel header.b=At3FAVx3; 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=1665534814; x=1697070814; h=from:to:cc:subject:date:message-id:references: in-reply-to:content-transfer-encoding:mime-version; bh=dW/WvDR945OzXm1zOe1OR88caaoQ3+gglLamILgg7EM=; b=At3FAVx3+j90hAVCM39OruCbsmdq0LRJGNB6cP7x9UkwWSuF9LWZaOLj D4nVS0BsDrv+JegluZtNiCu9f87MwACBNiATgzjDXiP7us7sbDtGJPKFN U/GgQf/5o9UD3iIqGOOZ3IIXxJXtiPd+n3/lutz2Xd1nWpTP5Pgij6+7j Eb/ke0DvZNyuNsUSM59IMW9twQYmgaQGmhD2HoRCVCOiQY3317lpPqUy1 iA9k8E641LATLRcnN8T5vpFO4Z0RZ1HZJOts6kFo0PQWxgxsOrK3wAoi/ skzlxHGA+U146VcZEZChX/KCEjUdaoK2XKdFLYA/2ly624ePViWHu/HQH Q==; X-IronPort-AV: E=McAfee;i="6500,9779,10497"; a="306287546" X-IronPort-AV: E=Sophos;i="5.95,177,1661842800"; d="scan'208";a="306287546" Received: from fmsmga005.fm.intel.com ([10.253.24.32]) by orsmga103.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 11 Oct 2022 17:33:33 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6500,9779,10497"; a="955548344" X-IronPort-AV: E=Sophos;i="5.95,177,1661842800"; d="scan'208";a="955548344" Received: from fmsmsx601.amr.corp.intel.com ([10.18.126.81]) by fmsmga005.fm.intel.com with ESMTP; 11 Oct 2022 17:33:33 -0700 Received: from fmsmsx612.amr.corp.intel.com (10.18.126.92) by fmsmsx601.amr.corp.intel.com (10.18.126.81) 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 17:33:32 -0700 Received: from fmsmsx608.amr.corp.intel.com (10.18.126.88) by fmsmsx612.amr.corp.intel.com (10.18.126.92) 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 17:33:32 -0700 Received: from fmsedg601.ED.cps.intel.com (10.1.192.135) by fmsmsx608.amr.corp.intel.com (10.18.126.88) 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 17:33:32 -0700 Received: from NAM12-MW2-obe.outbound.protection.outlook.com (104.47.66.49) by edgegateway.intel.com (192.55.55.70) 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 17:33:32 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=gmtabfnSMLUFhsNwpoR7tiiMRI3X58YUW8leUfVm7RiqJsbMnm1LGHl8ZLgV7DC6XzrtYPiqmJn+haJagja7aHz9OGZu1LklXvIlHr9BzsGfFcwboxAzNocXChLqpzkEnHCtKSNWRWl1SG0Dj1M0F1tSya0UPH29A0r2SG5FI7C/Fg6UdRf5hpHZSw5k7kSWfzJ2ra7lK8LPqUCJiS5Mn3TsKVITMo6ABSGu5mO0Zrf5xjaAC36ZPG1gg7+g9Yoe1U9OZ0uudU/V/NCkt+J9PfL1E8dAnO//60qFB0NGdW7zWNn1rXEC37JCl2TwyYGwl4ofOd/0VtoX4iT6wssUQg== 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=hU+CYxt7wWo+5jGSjWguAOGcxwAqzlA2rCL8joh7S1I=; b=gYyzhXvQQi+L+3D6qglvSEtr0HGjwWOx291H0ARL2P96qlWbF/f63C927Lb1CP1cm6nyp+7zCZVnic2EighXuVfQDTi+q74Sn9mNi33LU7M8ZYfd8RLU8Pb/IiLLqXPB5abt8i/usCn9uEchqX2H5TWLBzaTON9AkJOGUU2gs6MDGuYhwL6cXg582VSZfjCYeifEYmuW7YbqoXCW2d+V80eX05QluxNvOuKxAw4op96T6Hrvb6Jm5J1W9fKJI/V3gj1bxtMBWATQ+A4GDa5tCsWoJyg6eE4dELAeYilYbIyjBxhHHz05kC0SAEVX3p2uC/ksxAdcJg8sxABuqZJ91A== 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 DM4PR11MB5969.namprd11.prod.outlook.com (2603:10b6:8:5c::9) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5676.36; Wed, 12 Oct 2022 00:33:26 +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 00:33:26 +0000 From: "Yao, Jiewen" To: "Zhang, Qi1" , "devel@edk2.groups.io" CC: "Wang, Jian J" , "Lu, Xiaoyu1" , "Jiang, Guomin" Subject: Re: [PATCH 0/3] CryptoPkg: Add EC key retrieving and signature interface. Thread-Topic: [PATCH 0/3] CryptoPkg: Add EC key retrieving and signature interface. Thread-Index: AQHY3TviKN4ZH7DxyE+co32JVOni064J6f6Q Date: Wed, 12 Oct 2022 00:33:26 +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_|DM4PR11MB5969:EE_ x-ms-office365-filtering-correlation-id: 24d0c52c-3742-46a1-cb57-08daabe96080 x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: U0LiSpoF+VoJGKT+0WltOIBF2lnMpcI/5xQmcU0VpOJWxj+VrOo+P2YDDZQCMuI4Lf1JfgFePwOeATnlKV+MSeeAxyLNyTJX8j9o6hdWoKrgWfaSq+ahcvSGMlL3brenck/le3UIiDv2HmyB8FeerNkgvka/IEdFTeewWXwDD0sTpXDlTIaF2DSwxTfMizjA9LpW99Mfbup+vweJFUve8BCFOMhznZ+ujC/U6ZF1FH8NVerqGXrKMLnoLUy26LdZ7DofsX4crZf0HJxheMuTn2BUDsbUYzINaSs1T7an/bcVhqgDgOVlNJD7DMyh9XHHQyJy2Tg8c7i3q9Dwv422XtrDXyOw9xDr399MvvgQzZYNw92nHVPDbuayfK04XX5ZHRItK09Y8yk93nAtTWfGCqFWGrU/wD/65LUco0R7sSqF1Qacf1XfdlxCDevfPXQzHt2WP5oBW4JPzCTqcY7xb1J25xSSRTgeaAFGvXL311v7TvXZbgjoCj0eUirW1aF8rWK5mFXZDeySNsS6R3B7b4TLnULo560gImYTK/m7fhNSfMo/myMwzSW3OcD4g9qxXdGrOHHXh6LfxgRO16zgfdnqgwpnlUjFHh0+ZrSlx0R8uENq7YoI/4b/Hjg+xBw7GYU96pq/IFzas69gIX5+aBotAo9+SiUwAW+FjRc2e77Z4+AiIPYswT2twtclTXeMxGR3965osJeI7XBQwT/d2ualp22/7Ktp0VAY3zT2AmnoHKC/xVCrjUWhnoFUOHykJcnajrBiPQJtx++ko0HxOt3DZvcb7reeL7QEhymPUXI91xNeOA74cyHCp6fdhtM+hHh+avVoirS/wzl8Bmmjaw== 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)(136003)(396003)(39860400002)(376002)(346002)(366004)(451199015)(53546011)(5660300002)(4326008)(122000001)(110136005)(52536014)(86362001)(478600001)(2906002)(54906003)(186003)(66476007)(19627235002)(38070700005)(9686003)(26005)(82960400001)(38100700002)(8676002)(66446008)(66556008)(8936002)(64756008)(76116006)(7696005)(316002)(33656002)(66946007)(966005)(83380400001)(71200400001)(41300700001)(107886003)(55016003)(6506007);DIR:OUT;SFP:1102; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?7HJ5V/jbzu8wiA4JbVhza9MlUMVkme/RRENGyfLaXGA5OaXWPtW1HmBwgfGk?= =?us-ascii?Q?ao8yEoszPul0OO30zkz2G1A7Vw6MbPNusnFKYjKQEmMCiD4/uCHMvCrDtwYY?= =?us-ascii?Q?hLx1i29h8opNi5fCnnvzzTZLYq7r31FAKadEekwaEBnWlF4A+A5Tgx62Ktu3?= =?us-ascii?Q?FsAfXXaQGhBZXZk1MG7YuvTrKXk9GR54b3eLo03dvSYi8GxePJxxwVIuvlB3?= =?us-ascii?Q?qDYuzXDtCalM7guatFyqWlmFuZi4ylKAlQDaeANhL5ZMYMIZYiUJwM2nnEY+?= =?us-ascii?Q?4s0xKIDxhyz+gbVIGedBE6INLpowuYJWREcbA6dH3WxWEgmRvI5gD/gZGYs8?= =?us-ascii?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RYnpG2yI0y9?= =?us-ascii?Q?Y4oQJqGbnan1ZELuyUSsUpHp4jI4ukga1+1qHMaw591YvsNV2RIX5faaRlMf?= =?us-ascii?Q?oC3IPA3YXWrFAcpNd+ZpMTcPrt/I3bhmMe/sZHJ6SWeCAq+rn8blTTzn/PM9?= =?us-ascii?Q?VIMs8EuRvXhz05djXEfBCan0fOvFS+p346JdFx3Y6N8tXC43fzVXK3zJnlgo?= =?us-ascii?Q?tCZiXHsrbGP9zOw7EZO0F2XE0O0Zwx3V6dihlyS3g5iTiD6RaZtDNwrgI6Vg?= =?us-ascii?Q?y9hzWRuHeOWNBrvSxZODYBWWQY9s+l+elebgPt/R7vNwE3cCx1BZu5VSmRl8?= =?us-ascii?Q?zkT+Lqo/v8S6l69/LNEWaqCzf6uv65XA2QtsQEZj?= 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: 24d0c52c-3742-46a1-cb57-08daabe96080 X-MS-Exchange-CrossTenant-originalarrivaltime: 12 Oct 2022 00:33:26.0818 (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: fjP5mqJAqtltzTUs98CPgyRZJTuuf9UDnELESAWBEQLTDgAcR/GqzpBqRMXoSKXq1XywBLTDMrf+OIGOmwtWwA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM4PR11MB5969 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 Thanks Qi Please change the protocol version! > -----Original Message----- > From: Zhang, Qi1 > Sent: Tuesday, October 11, 2022 2:37 PM > To: devel@edk2.groups.io > Cc: Zhang, Qi1 ; Yao, Jiewen > ; Wang, Jian J ; Lu, Xiaoyu1 > ; Jiang, Guomin > Subject: [PATCH 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 > 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 | 129 +++++++++ > .../UnitTest/Library/BaseCryptLib/EcTests.c | 156 +++++++++++ > 15 files changed, 1404 insertions(+), 1 deletion(-) >=20 > -- > 2.26.2.windows.1