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.web11.4363.1604440489609225729 for ; Tue, 03 Nov 2020 13:54:49 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@intel.onmicrosoft.com header.s=selector2-intel-onmicrosoft-com header.b=zeDOtbr1; spf=pass (domain: intel.com, ip: 134.134.136.65, mailfrom: christopher.j.zurcher@intel.com) IronPort-SDR: rpXbSQWEs4ZST+he4tDo3AijIDXadtnHN8jmp86sjJjeRl+Gs8Y2GIHX/CLGiftW8mh8Ak//vU 1eEfW6b+gjSw== X-IronPort-AV: E=McAfee;i="6000,8403,9794"; a="169239413" X-IronPort-AV: E=Sophos;i="5.77,449,1596524400"; d="scan'208,217";a="169239413" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga006.fm.intel.com ([10.253.24.20]) by orsmga103.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 03 Nov 2020 13:54:48 -0800 IronPort-SDR: CUo/YKhvYlo+RZ+z/4ya/uCef7sN9NzpVevLhCUe6vtzSRtawXLVJfcEAaCLVsxDfFF+YgWa6i XxdwCKMO9/Sw== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.77,449,1596524400"; d="scan'208,217";a="527334399" Received: from orsmsx606.amr.corp.intel.com ([10.22.229.19]) by fmsmga006.fm.intel.com with ESMTP; 03 Nov 2020 13:54:47 -0800 Received: from orsmsx601.amr.corp.intel.com (10.22.229.14) by ORSMSX606.amr.corp.intel.com (10.22.229.19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.1713.5; Tue, 3 Nov 2020 13:54:47 -0800 Received: from ORSEDG601.ED.cps.intel.com (10.7.248.6) 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.1713.5 via Frontend Transport; Tue, 3 Nov 2020 13:54:47 -0800 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.1713.5; Tue, 3 Nov 2020 13:54:46 -0800 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=XHxczI39JT8W2F94mohgW+Ps30nxqXRTnBh3ZC65f89Umyk3RZnUD62qbqwRx0a/gfhCZK60OIIRH5wgvXcapFAxuAyV17C27ODOPWX1zyLw6Wxoi54uC3m+m6dl3bycyXj75gXiXu1ZYSamb/jqr9NeergQuXuQ2G6WwIKFafz9YwKeIpQG77wcPvsk8uTDac+mwV6xj13SkyjQBhywhXJHHvtJELYq5qCwYwGW5haySI8FxbsugnwPltleiHoEb5SjRUWdBAPBMDs0DqcgnNvMI6y8wu20gngl6JoJRMcD1yfG85VinJRjuFgJGxPwWuGcA4lofF2xqYDFdBEbKA== 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-SenderADCheck; bh=wfOuTw+g4oIW0WrE+pltBm3xfXf471+saAAIB9cu0vM=; b=X6HbwQeQm4N62isFWYEUzXRdQ4oGtp0sDkLrYr98XiuN9TSujAeY2GELLTtqPRPbQL5qM0pHKswwA3onzfHh6o5USTjtoNdqYMkzf84f2E+p3JWfkow8u4ybIDBLky4huxGZUomFXog/HlLHpJPSvWQ1XN2AgPJc9QI9b9HhYJZPgw7f9k6rmVpontm+94DQkPTjtQfJ+GVOue0SukvGOYLbqG9d5y+sCsA2ACou7G1kkUtl6YB4wa6q7a2xV+XE2oy/qjcu6mW3M+zGZUmmkziy6ROYpg5ByyI15RAvVNRgyUKp5yszj0HGtPXYzKxT9v1Jrc9aqqMyWK4+Pe3Wjw== 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=wfOuTw+g4oIW0WrE+pltBm3xfXf471+saAAIB9cu0vM=; b=zeDOtbr1ES2ZldQwCmup5/QhqkMksC1pneYmTRfi1xlKNHbEtB5cHn6e9QeZ4pnu0wz/kRG/YM66sC/8AqaKOEmwY9scHVy/LItwuFx6jezP05b1dNh/60gFo5bBKGOp1WGfnTyO9pDcPzh2uTQ5hsFid8qTj/vzOY8WSDup80U= Received: from MWHPR1101MB2125.namprd11.prod.outlook.com (2603:10b6:301:4d::10) by MWHPR11MB1405.namprd11.prod.outlook.com (2603:10b6:300:21::19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3499.29; Tue, 3 Nov 2020 21:54:42 +0000 Received: from MWHPR1101MB2125.namprd11.prod.outlook.com ([fe80::f88d:c4b1:1f6d:7a73]) by MWHPR1101MB2125.namprd11.prod.outlook.com ([fe80::f88d:c4b1:1f6d:7a73%4]) with mapi id 15.20.3499.032; Tue, 3 Nov 2020 21:54:42 +0000 From: "Zurcher, Christopher J" To: Bret Barkelew , "devel@edk2.groups.io" , "Yao, Jiewen" CC: "Wang, Jian J" , "Lu, XiaoyuX" , "Jiang, Guomin" , Sung-Uk Bin , Ard Biesheuvel Subject: Re: [PATCH 0/1] CryptoPkg/BaseCryptLib: Add EVP implementation for CryptAes.c Thread-Topic: [PATCH 0/1] CryptoPkg/BaseCryptLib: Add EVP implementation for CryptAes.c Thread-Index: AQHWrVo1s+HCwcbLE0KI4UNqtIO/mKmw6OKwgASJkdCAAC68sIAAA7cAgAFXlQA= Date: Tue, 3 Nov 2020 21:54:42 +0000 Message-ID: References: <20201028184254.6923-1-christopher.j.zurcher@intel.com> , In-Reply-To: Accept-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: msip_labels: MSIP_Label_f42aa342-8706-4288-bd11-ebb85995028c_Enabled=True; MSIP_Label_f42aa342-8706-4288-bd11-ebb85995028c_SiteId=72f988bf-86f1-41af-91ab-2d7cd011db47; MSIP_Label_f42aa342-8706-4288-bd11-ebb85995028c_SetDate=2020-11-03T01:20:39.1057135Z; MSIP_Label_f42aa342-8706-4288-bd11-ebb85995028c_ContentBits=0; MSIP_Label_f42aa342-8706-4288-bd11-ebb85995028c_Method=Privileged dlp-version: 11.5.1.3 dlp-reaction: no-action dlp-product: dlpe-windows authentication-results: microsoft.com; dkim=none (message not signed) header.d=none;microsoft.com; dmarc=none action=none header.from=intel.com; x-originating-ip: [50.53.185.44] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: ec781a1a-fbf5-42d0-10dd-08d880431215 x-ms-traffictypediagnostic: MWHPR11MB1405: x-ms-exchange-transport-forked: True x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:10000; x-ms-exchange-senderadcheck: 1 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: k5zfloEBjWOzt8m/ub62VX1/T427XrJDxSLq8CLQkLGRul04Yq6Pd+QI7wpe0iF9K/1JmVXDIwM1kwl+uE1+TJdA5YEln/1ww2eDkI4cWZLXsLaoCzup8zCQoN/t5shGz/8ZOEOhIFs2vBQDJQa11rpi7alFckS1lbp3qPKLFnCz0XUWq+k9WUQxOn+5Hzb8QwlEmJrLp7wLMPm5VKnJpfkZZm4QoCjG1Cfw0stvYY7ZN49sWkqBAyI3v1MNbxYgoVvC4a1mwKhUw2CqxnaU1o9vVVUNN54sqdJKFeWKft5v21ydI+A/LGiYbKLlFep08sHDEgVDR/UE4pWoGLnMdpmM1/cWV56wRTIL4VJVSFK84oHf5z8M3ldSCY8GabzBcJ/ldhk+ivd4Nc2Rlu8Nng== x-forefront-antispam-report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:MWHPR1101MB2125.namprd11.prod.outlook.com;PTR:;CAT:NONE;SFS:(4636009)(346002)(136003)(396003)(376002)(366004)(39860400002)(53546011)(83380400001)(8936002)(26005)(110136005)(6506007)(7696005)(54906003)(86362001)(166002)(2906002)(71200400001)(316002)(66556008)(66476007)(66446008)(478600001)(5660300002)(966005)(8676002)(9686003)(4326008)(45080400002)(6636002)(55016002)(186003)(33656002)(64756008)(52536014)(76116006)(66946007);DIR:OUT;SFP:1102; x-ms-exchange-antispam-messagedata: r/3uueNBBKofxzfHWPVRSVLq9hrOv+XYAOC+ZzCZWqGAjcM9uFNbeqYJvoDE8CF+R/BYVyioZthX6vMe6wKTm9TBkwAIMjp1Hcd0UVnU2LzkXmkSAMZEzbX7LBfiSAD2/xzRn42Yl6rSCSDkrzhzHMgJqozD7LQ2FNa7rATLsao72bb3B5wB5VC26BQmMI9wxC71lwQ+FQf0lWxDxVWEjucwqandrJOqe+cchlPg50KNIB4K/TkZ7rnVa3nY1896xp8mqd4Qe44Y1sRg2CFm/1cje11Qf3ObPtTy5R4IKc+xDnmYVz42AxD0aRpTK1OKgTHL1iESqqA/IMG8Xg8zJTKCVIFvVaRP2LBNO1bPc/VyUgw8scTf+yVi8Mhk22rGXsdfkK46CeNaV+0Iy+POjKyygnekV/zhNeicyMSshnI5bUSBwDGJ0mrMEDT6zwPs/vRsl9JKNjFMuKnzQFCJt+I/XKQqR4xjoR7ibZddXo6k30myuLhmyeGW9NGpxrMb/qGcCg2VkOS02NLQowAT8/laQCqdGUctM436WVRujpx7XkU9SQhgFIRKKypPIPsH1bANN5IQNCK+dKSVN07WatzJXm6jzDfDlufpNsHzqmHLbCJjo8or1JdmbwiLED5Rg/oa4+J4Lg2DyQ4QQOvhKw== MIME-Version: 1.0 X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: MWHPR1101MB2125.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: ec781a1a-fbf5-42d0-10dd-08d880431215 X-MS-Exchange-CrossTenant-originalarrivaltime: 03 Nov 2020 21:54:42.5940 (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: 6CL3yCeiHH/tmN4sjkrfiHrIkjxIFZX8JBCJxum6fjMpT9L5aEiacllvG588LbRooD9MGufIswidr3+4pOZgdjxJtUD3lhLVZ+oeUWmIPXE= X-MS-Exchange-Transport-CrossTenantHeadersStamped: MWHPR11MB1405 Return-Path: christopher.j.zurcher@intel.com X-OriginatorOrg: intel.com Content-Language: en-US Content-Type: multipart/alternative; boundary="_000_MWHPR1101MB21258391C3A37BA409DCC751B3110MWHPR1101MB2125_" --_000_MWHPR1101MB21258391C3A37BA409DCC751B3110MWHPR1101MB2125_ Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable I'm OK with using a PCD here if there are no other objections. -- Christopher Zurcher From: Bret Barkelew Sent: Monday, November 2, 2020 17:23 To: devel@edk2.groups.io; Yao, Jiewen ; Zurcher, Chr= istopher J Cc: Wang, Jian J ; Lu, XiaoyuX ; Jiang, Guomin ; Sung-Uk Bin = ; Ard Biesheuvel Subject: RE: [PATCH 0/1] CryptoPkg/BaseCryptLib: Add EVP implementation fo= r CryptAes.c I agree that this should not be a C file. Based on the description, would = a FixedAtBuild PCD work to wrap the code? I don't know that it warrants a full LibraryClass, but that's another opti= on. Have you looked at just implementing it in a flavor of the new EDK2 binary= crypto payloads? Those are shared and wouldn't incur the per-module cost. - Bret From: Yao, Jiewen via groups.io Sent: Monday, November 2, 2020 5:13 PM To: Zurcher, Christopher J; devel@= edk2.groups.io Cc: Wang, Jian J; Lu, XiaoyuX; Jiang, Guomin; Sung-Uk Bin; Ard Biesheuvel Subject: [EXTERNAL] Re: [edk2-devel] [PATCH 0/1] CryptoPkg/BaseCryptLib: A= dd EVP implementation for CryptAes.c Thanks to provide the data. I have a little concern on what is the usage if we just add a standalone C= file. The EDKII build does not support cross package file including in INF, and = does not recommend cross module file including in INF. What is the expected= usage for the standalone CryptAes.c ? If you have a private project which want to use this, then you have to wri= te your own INF file. But if so, why not include this CryptAes.c along with= the new INF? Thank you Yao Jiewen > -----Original Message----- > From: Zurcher, Christopher J > > Sent: Tuesday, November 3, 2020 6:37 AM > To: Yao, Jiewen >; dev= el@edk2.groups.io > Cc: Wang, Jian J >; = Lu, XiaoyuX > >; Jiang, Guomin >; Sung-Uk > Bin >; Ard Biesheuvel > > Subject: RE: [PATCH 0/1] CryptoPkg/BaseCryptLib: Add EVP implementation > for CryptAes.c > > The size increase from adding the EVP interface to a module that does no= t > already include it (through the HMAC functions) is ~192KB. > Intel documentation on the IA version of the feature lists speed > improvement of ~32% to ~47% depending on the operation and key size. > Other architectures may see different speed improvements. I have only > tested this file with OvmfPkg through QEMU. > > I did not add this .c file to any INF file because it will add ~192KB to= any > module that includes AES functionality and it should be up to the end us= er if > they want to include this file for the size tradeoff vs. the speed gain = for their > particular architecture. Additionally as the only native OpensslLib > implementation available currently is for X64 architecture, any other > architecture would have a size increase with no speed improvement. > > Thanks, > Christopher Zurcher > > > -----Original Message----- > > From: Yao, Jiewen > > > Sent: Friday, October 30, 2020 18:10 > > To: Zurcher, Christopher J >; > > devel@edk2.groups.io > > Cc: Wang, Jian J >= ; Lu, XiaoyuX > >; > > Jiang, Guomin >;= Sung-Uk Bin bin@hp.com>; Ard > > Biesheuvel > > > Subject: RE: [PATCH 0/1] CryptoPkg/BaseCryptLib: Add EVP implementatio= n > for > > CryptAes.c > > > > HI Zucher > > I am not sure why you only add a .c file, but do not add this c to any= INF > > file. This seems a dummy C file. > > I recommend you drop this and create a full patch to add C and update = INF > > file. > > > > Since you are talking performance and size, do you have any data? > > For example, how fast you have got? What is the size difference before= and > > after? > > This can help other people make decision to choose which version. > > > > > > Thank you > > Yao Jiewen > > > > > > > -----Original Message----- > > > From: Christopher J Zurcher > > > > Sent: Thursday, October 29, 2020 2:43 AM > > > To: devel@edk2.groups.io > > > Cc: Yao, Jiewen >;= Wang, Jian J > > > >; Lu, XiaoyuX <= xiaoyux.lu@intel.com>; Jiang, > Guomin > > > >; Sung-Uk Bin= >; Ard > > > Biesheuvel > > > > Subject: [PATCH 0/1] CryptoPkg/BaseCryptLib: Add EVP implementation > for > > > CryptAes.c > > > > > > BZ: https://nam06.safelinks.protection.outlook.com/?url=3Dhttps%3A%2= F%2Fbugzilla.tianocore.org%2Fshow_bug.cgi%3Fid%3D2507&data=3D04%7C01%7C= bret.barkelew%40microsoft.com%7C4a13842bdd6240d452ca08d87f95ba5f%7C72f988bf= 86f141af91ab2d7cd011db47%7C1%7C0%7C637399628344133791%7CUnknown%7CTWFpbGZsb= 3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C100= 0&sdata=3DoOONHll9TASuW8eBAMvvLUNZhb9jOSRN18liIP7BHrk%3D&reserved= =3D0 > > > > > > This patch provides a drop-in replacement for CryptAes.c which utili= zes > > > the EVP interface to OpenSSL. This enables access to the assembly- > optimized > > > algorithms. > > > > > > This patch has been unit-tested in both VS and CLANG build > environments > > > using both an X64 assembly-optimized implementation of OpensslLib an= d > > > the > > > standard implementation. > > > > > > Usage of this file does not require an assembly-optimized > implementation of > > > OpensslLib to function; it does however require one to provide a spe= ed > > > improvement. > > > > > > The C-only AES implementation included by CryptAes.c is extremely sm= all, > > > and since this file includes the EVP interface, it will significantl= y > > > increase the size of any module that includes it. As a result, I hav= e not > > > replaced the original CryptAes.c as a default in any of the CryptLib > > > implementations. > > > > > > Cc: Jiewen Yao > > > > Cc: Jian J Wang = > > > > Cc: Xiaoyu Lu > > > > Cc: Guomin Jiang > > > > Cc: Sung-Uk Bin > > > > Cc: Ard Biesheuvel > > > > > > > Christopher J Zurcher (1): > > > CryptoPkg/BaseCryptLib: Add EVP implementation for CryptAes.c > > > > > > CryptoPkg/Library/BaseCryptLib/Cipher/CryptAesEvp.c | 262 > > > ++++++++++++++++++++ > > > 1 file changed, 262 insertions(+) > > > create mode 100644 > CryptoPkg/Library/BaseCryptLib/Cipher/CryptAesEvp.c > > > > > > -- > > > 2.28.0.windows.1 --_000_MWHPR1101MB21258391C3A37BA409DCC751B3110MWHPR1101MB2125_ Content-Type: text/html; charset="us-ascii" Content-Transfer-Encoding: quoted-printable

I’m OK with using a PCD here if there are no = other objections.

 

--

Christopher Zurcher

 

From: Bret Barkelew <Bret.Barkelew@micros= oft.com>
Sent: Monday, November 2, 2020 17:23
To: devel@edk2.groups.io; Yao, Jiewen <jiewen.yao@intel.com>;= Zurcher, Christopher J <christopher.j.zurcher@intel.com>
Cc: Wang, Jian J <jian.j.wang@intel.com>; Lu, XiaoyuX <xia= oyux.lu@intel.com>; Jiang, Guomin <guomin.jiang@intel.com>; Sung-U= k Bin <sunguk-bin@hp.com>; Ard Biesheuvel <ard.biesheuvel@arm.com&= gt;
Subject: RE: [PATCH 0/1] CryptoPkg/BaseCryptLib: Add EVP implementa= tion for CryptAes.c

 

I agree that this should not be a C file. Based on = the description, would a FixedAtBuild PCD work to wrap the code?=

 

I don’t know that it warrants a full LibraryC= lass, but that’s another option.

 

Have you looked at just implementing it in a flavor= of the new EDK2 binary crypto payloads? Those are shared and wouldn’= t incur the per-module cost.

 

- Bret

 

 

Thanks to provide th= e data.

I have a little concern on what is the usage if we just add a standalone C= file.

The EDKII build does not support cross package file including in INF, and = does not recommend cross module file including in INF. What is the expected= usage for the standalone CryptAes.c ?

If you have a private project which want to use this, then you have to wri= te your own INF file. But if so, why not include this CryptAes.c along with= the new INF?

Thank you
Yao Jiewen

> -----Original Message-----
> From: Zurcher, Christopher J <
christopher.j.zurcher@intel.com>
> Sent: Tuesday, November 3, 2020 6:37 AM
> To: Yao, Jiewen <jiewen.ya= o@intel.com>; devel@edk2.groups.io
> Cc: Wang, Jian J <jian.j.= wang@intel.com>; Lu, XiaoyuX
> <xiaoyux.lu@intel.com&= gt;; Jiang, Guomin <guomin.jia= ng@intel.com>; Sung-Uk
> Bin <sunguk-bin@hp.com>= ;; Ard Biesheuvel <ard.biesheu= vel@arm.com>
> Subject: RE: [PATCH 0/1] CryptoPkg/BaseCryptLib: Add EVP implementati= on
> for CryptAes.c
>
> The size increase from adding the EVP interface to a module that does= not
> already include it (through the HMAC functions) is ~192KB.
> Intel documentation on the IA version of the feature lists speed
> improvement of ~32% to ~47% depending on the operation and key size.<= br> > Other architectures may see different speed improvements. I have only=
> tested this file with OvmfPkg through QEMU.
>
> I did not add this .c file to any INF file because it will add ~192KB= to any
> module that includes AES functionality and it should be up to the end= user if
> they want to include this file for the size tradeoff vs. the speed ga= in for their
> particular architecture. Additionally as the only native OpensslLib > implementation available currently is for X64 architecture, any other=
> architecture would have a size increase with no speed improvement. >
> Thanks,
> Christopher Zurcher
>
> > -----Original Message-----
> > From: Yao, Jiewen <ji= ewen.yao@intel.com>
> > Sent: Friday, October 30, 2020 18:10
> > To: Zurcher, Christopher J <christopher.j.zurcher@intel.com>;
> > devel@edk2.groups.io=
> > Cc: Wang, Jian J <ji= an.j.wang@intel.com>; Lu, XiaoyuX
> <xiaoyux.lu@intel.com&= gt;;
> > Jiang, Guomin <guom= in.jiang@intel.com>; Sung-Uk Bin <sunguk-
> bin@hp.com>; Ard
> > Biesheuvel <ard.bie= sheuvel@arm.com>
> > Subject: RE: [PATCH 0/1] CryptoPkg/BaseCryptLib: Add EVP impleme= ntation
> for
> > CryptAes.c
> >
> > HI Zucher
> > I am not sure why you only add a .c file, but do not add this c = to any INF
> > file. This seems a dummy C file.
> > I recommend you drop this and create a full patch to add C and u= pdate INF
> > file.
> >
> > Since you are talking performance and size, do you have any data= ?
> > For example, how fast you have got? What is the size difference = before and
> > after?
> > This can help other people make decision to choose which version= .
> >
> >
> > Thank you
> > Yao Jiewen
> >
> >
> > > -----Original Message-----
> > > From: Christopher J Zurcher <christopher.j.zurcher@intel.com>
> > > Sent: Thursday, October 29, 2020 2:43 AM
> > > To: devel@edk2.grou= ps.io
> > > Cc: Yao, Jiewen <jiewen.yao@intel.com>; Wang, Jian J
> > > <jian.j.wang@in= tel.com>; Lu, XiaoyuX <xi= aoyux.lu@intel.com>; Jiang,
> Guomin
> > > <guomin.jiang@= intel.com>; Sung-Uk Bin <sun= guk-bin@hp.com>; Ard
> > > Biesheuvel <ar= d.biesheuvel@arm.com>
> > > Subject: [PATCH 0/1] CryptoPkg/BaseCryptLib: Add EVP implem= entation
> for
> > > CryptAes.c
> > >
> > > BZ: https://nam06.safelinks.protection.outlook.com/?url=3Dhttps%3A%2F%2Fbugzil= la.tianocore.org%2Fshow_bug.cgi%3Fid%3D2507&amp;data=3D04%7C01%7Cbret.b= arkelew%40microsoft.com%7C4a13842bdd6240d452ca08d87f95ba5f%7C72f988bf86f141= af91ab2d7cd011db47%7C1%7C0%7C637399628344133791%7CUnknown%7CTWFpbGZsb3d8eyJ= WIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&= amp;sdata=3DoOONHll9TASuW8eBAMvvLUNZhb9jOSRN18liIP7BHrk%3D&amp;reserved= = =3D0
> > >
> > > This patch provides a drop-in replacement for CryptAes.c wh= ich utilizes
> > > the EVP interface to OpenSSL. This enables access to the as= sembly-
> optimized
> > > algorithms.
> > >
> > > This patch has been unit-tested in both VS and CLANG build<= br> > environments
> > > using both an X64 assembly-optimized implementation of Open= sslLib and
> > > the
> > > standard implementation.
> > >
> > > Usage of this file does not require an assembly-optimized > implementation of
> > > OpensslLib to function; it does however require one to prov= ide a speed
> > > improvement.
> > >
> > > The C-only AES implementation included by CryptAes.c is ext= remely small,
> > > and since this file includes the EVP interface, it will sig= nificantly
> > > increase the size of any module that includes it. As a resu= lt, I have not
> > > replaced the original CryptAes.c as a default in any of the= CryptLib
> > > implementations.
> > >
> > > Cc: Jiewen Yao <= jiewen.yao@intel.com>
> > > Cc: Jian J Wang <jian.j.wang@intel.com>
> > > Cc: Xiaoyu Lu <x= iaoyux.lu@intel.com>
> > > Cc: Guomin Jiang <guomin.jiang@intel.com>
> > > Cc: Sung-Uk Bin <su= nguk-bin@hp.com>
> > > Cc: Ard Biesheuvel <ard.biesheuvel@arm.com>
> > >
> > > Christopher J Zurcher (1):
> > >   CryptoPkg/BaseCryptLib: Add EVP implementation = for CryptAes.c
> > >
> > >  CryptoPkg/Library/BaseCryptLib/Cipher/CryptAesEvp.c |= 262
> > > ++++++++++++++++++++
> > >  1 file changed, 262 insertions(+)
> > >  create mode 100644
> CryptoPkg/Library/BaseCryptLib/Cipher/CryptAesEvp.c
> > >
> > > --
> > > 2.28.0.windows.1



 

--_000_MWHPR1101MB21258391C3A37BA409DCC751B3110MWHPR1101MB2125_--