From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mga14.intel.com (mga14.intel.com [192.55.52.115]) by mx.groups.io with SMTP id smtpd.web12.4822.1585277879145858493 for ; Thu, 26 Mar 2020 19:57:59 -0700 Authentication-Results: mx.groups.io; dkim=missing; spf=pass (domain: intel.com, ip: 192.55.52.115, mailfrom: jiewen.yao@intel.com) IronPort-SDR: d1Olk1If/6Wk5iwUZbbTWBFOI0bpTgpP2sxZF4cstwQGUklzmcaVAidFCr1SAcm+Bft0JjpxDu U5qZwegBj+tw== X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga006.jf.intel.com ([10.7.209.51]) by fmsmga103.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 26 Mar 2020 19:57:58 -0700 IronPort-SDR: XwEJ+zb8/vZFLU5aT+7s/O2eHCNaOfIQG1OTlO1zHGVxgHFD4h13fboXMSbJol6IBwvO6Lva9j YqC10YfIoBzg== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.72,310,1580803200"; d="scan'208";a="251002655" Received: from fmsmsx107.amr.corp.intel.com ([10.18.124.205]) by orsmga006.jf.intel.com with ESMTP; 26 Mar 2020 19:57:58 -0700 Received: from fmsmsx114.amr.corp.intel.com (10.18.116.8) by fmsmsx107.amr.corp.intel.com (10.18.124.205) with Microsoft SMTP Server (TLS) id 14.3.439.0; Thu, 26 Mar 2020 19:57:57 -0700 Received: from shsmsx101.ccr.corp.intel.com (10.239.4.153) by FMSMSX114.amr.corp.intel.com (10.18.116.8) with Microsoft SMTP Server (TLS) id 14.3.439.0; Thu, 26 Mar 2020 19:57:57 -0700 Received: from shsmsx102.ccr.corp.intel.com ([169.254.2.50]) by SHSMSX101.ccr.corp.intel.com ([169.254.1.43]) with mapi id 14.03.0439.000; Fri, 27 Mar 2020 10:57:55 +0800 From: "Yao, Jiewen" To: "devel@edk2.groups.io" , "Fu, Siyuan" , "Gao, Zhichao" CC: "Wang, Jian J" , "Lu, XiaoyuX" , Maciej Rabeda , "Wu, Jiaxin" Subject: Re: [edk2-devel] [PATCH 0/8] CryptoPkg: Retire the deprecate function Thread-Topic: [edk2-devel] [PATCH 0/8] CryptoPkg: Retire the deprecate function Thread-Index: AQHWA9r3vfbc0WLdPUSI70pQ90E/bahbNjmAgACIDrA= Date: Fri, 27 Mar 2020 02:57:54 +0000 Message-ID: <74D8A39837DF1E4DA445A8C0B3885C503F9A0490@shsmsx102.ccr.corp.intel.com> References: <20200327015629.2588-1-zhichao.gao@intel.com> In-Reply-To: Accept-Language: zh-CN, en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: dlp-product: dlpe-windows dlp-version: 11.2.0.6 dlp-reaction: no-action x-originating-ip: [10.239.127.40] MIME-Version: 1.0 Return-Path: jiewen.yao@intel.com Content-Language: en-US Content-Type: text/plain; charset="iso-2022-jp" Content-Transfer-Encoding: quoted-printable EDKII_CRYPTO_PROTOCOL is *private*. https://github.com/tianocore/edk2/blob/master/CryptoPkg/Private/Protocol/C= rypto.h Why we cannot change? > -----Original Message----- > From: devel@edk2.groups.io On Behalf Of Siyuan, F= u > Sent: Friday, March 27, 2020 10:47 AM > To: Gao, Zhichao ; devel@edk2.groups.io > Cc: Wang, Jian J ; Lu, XiaoyuX ; > Maciej Rabeda ; Wu, Jiaxin > > Subject: Re: [edk2-devel] [PATCH 0/8] CryptoPkg: Retire the deprecate fu= nction >=20 > Hi, Zhichao >=20 > We should never move/delete a member field of a previous defined protoco= l > Interface. Instead, these protocol APIs shall be kept and return an erro= r code > If the function is retired. Otherwise the consumer driver may call into = an > Incorrect function if it's build with different codebase/PCD settings wi= th the > Crypto PEI/DXE/SMM driver. > This comment applies to all the EDKII_CRYPTO_PROTOCOL related changes in > your patch set. >=20 > Best Regards > Siyuan >=20 > > -----Original Message----- > > From: Gao, Zhichao > > Sent: 2020=1B$BG/=1B(B3=1B$B7n=1B(B27=1B$BF|=1B(B 9:56 > > To: devel@edk2.groups.io > > Cc: Wang, Jian J ; Lu, XiaoyuX > ; > > Maciej Rabeda ; Wu, Jiaxin > > ; Fu, Siyuan > > Subject: [PATCH 0/8] CryptoPkg: Retire the deprecate function > > > > REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3D1682 > > REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3D1898 > > > > MD4, AR4, Tdes, Aes Ecb mode, MD5 and SHA1 is not secure any longer. > > They are all deprecated. Edk2 would not support them any longer. > > So remove them. > > But uefi spec want to keep MD5 and SHA1 for backwards compatibility. > > So add two pcds to control the MD5 and SHA1 enablement. Set the pcds > > default value to false to indicate they are deprecated. > > > > NetWorkPkg's iSCSI driver would consume the MD5 function, so change > > the md5 pcd to TURE when iSCSI is enabled. > > > > Cc: Jian J Wang > > Cc: Xiaoyu Lu > > Cc: Maciej Rabeda > > Cc: Jiaxin Wu > > Cc: Siyuan Fu > > Signed-off-by: Zhichao Gao > > > > Zhichao Gao (8): > > CryptoPkg/BaseCrpytLib: Retire MD4 algorithm > > CryptoPkg/BaseCryptLib: Retire ARC4 algorithm > > CryptoPkg/BaseCryptLib: Retire the Tdes algorithm > > CryptoPkg/BaseCryptLib: Retire Aes Ecb mode algorithm > > CryptoPkg/dec: Add pcds to avoid building the deprecated function > > NetWorkPkg/Pcd.inc: Enable the MD5 for iSCSI > > Crypto/BaseCryptLib: Using pcd to control MD5 enablement > > CryptoPkg/BaseCryptLib: Use Pcd to control the SHA1 enablement > > > > CryptoPkg/CryptoPkg.dec | 11 + > > CryptoPkg/CryptoPkg.uni | 11 + > > CryptoPkg/Driver/Crypto.c | 634 +----------------= - > > CryptoPkg/Include/Library/BaseCryptLib.h | 548 --------------- > > .../Library/BaseCryptLib/BaseCryptLib.inf | 9 +- > > .../Library/BaseCryptLib/Cipher/CryptAes.c | 114 ---- > > .../BaseCryptLib/Cipher/CryptAesNull.c | 52 -- > > .../Library/BaseCryptLib/Cipher/CryptArc4.c | 205 ------ > > .../BaseCryptLib/Cipher/CryptArc4Null.c | 124 ---- > > .../Library/BaseCryptLib/Cipher/CryptTdes.c | 364 ---------- > > .../BaseCryptLib/Cipher/CryptTdesNull.c | 160 ----- > > .../Library/BaseCryptLib/Hash/CryptMd4.c | 223 ------ > > .../Library/BaseCryptLib/Hash/CryptMd4Null.c | 143 ---- > > .../Library/BaseCryptLib/Hash/CryptMd5.c | 5 +- > > .../Library/BaseCryptLib/Hmac/CryptHmacMd5.c | 3 + > > .../BaseCryptLib/Hmac/CryptHmacMd5Null.c | 3 + > > .../Library/BaseCryptLib/Hmac/CryptHmacSha1.c | 3 + > > .../BaseCryptLib/Hmac/CryptHmacSha1Null.c | 3 + > > .../Library/BaseCryptLib/PeiCryptLib.inf | 13 +- > > .../BaseCryptLib/Pk/CryptPkcs5Pbkdf2.c | 3 + > > .../Library/BaseCryptLib/Pk/CryptRsaBasic.c | 5 + > > .../Library/BaseCryptLib/Pk/CryptRsaExt.c | 5 + > > .../Library/BaseCryptLib/RuntimeCryptLib.inf | 13 +- > > .../Library/BaseCryptLib/SmmCryptLib.inf | 13 +- > > .../BaseCryptLibNull/BaseCryptLibNull.inf | 3 - > > .../BaseCryptLibNull/Cipher/CryptAesNull.c | 54 +- > > .../BaseCryptLibNull/Cipher/CryptArc4Null.c | 124 ---- > > .../BaseCryptLibNull/Cipher/CryptTdesNull.c | 160 ----- > > .../BaseCryptLibNull/Hash/CryptMd4Null.c | 143 ---- > > .../BaseCryptLibNull/Hash/CryptMd5Null.c | 3 + > > .../BaseCryptLibNull/Hmac/CryptHmacMd5Null.c | 3 + > > .../BaseCryptLibNull/Hmac/CryptHmacSha1Null.c | 4 +- > > .../BaseCryptLibOnProtocolPpi/CryptLib.c | 604 +---------------- > > .../Library/BaseHashApiLib/BaseHashApiLib.c | 12 + > > .../Library/BaseHashApiLib/BaseHashApiLib.inf | 1 + > > CryptoPkg/Private/Protocol/Crypto.h | 583 +--------------- > > NetworkPkg/NetworkPcds.dsc.inc | 5 +- > > 37 files changed, 145 insertions(+), 4221 deletions(-) > > delete mode 100644 CryptoPkg/Library/BaseCryptLib/Cipher/CryptArc4.c > > delete mode 100644 CryptoPkg/Library/BaseCryptLib/Cipher/CryptArc4Nul= l.c > > delete mode 100644 CryptoPkg/Library/BaseCryptLib/Cipher/CryptTdes.c > > delete mode 100644 CryptoPkg/Library/BaseCryptLib/Cipher/CryptTdesNul= l.c > > delete mode 100644 CryptoPkg/Library/BaseCryptLib/Hash/CryptMd4.c > > delete mode 100644 CryptoPkg/Library/BaseCryptLib/Hash/CryptMd4Null.c > > delete mode 100644 > > CryptoPkg/Library/BaseCryptLibNull/Cipher/CryptArc4Null.c > > delete mode 100644 > > CryptoPkg/Library/BaseCryptLibNull/Cipher/CryptTdesNull.c > > delete mode 100644 > CryptoPkg/Library/BaseCryptLibNull/Hash/CryptMd4Null.c > > > > -- > > 2.21.0.windows.1 >=20 >=20 >=20