From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mga17.intel.com (mga17.intel.com [192.55.52.151]) by mx.groups.io with SMTP id smtpd.web10.14370.1661140091104687241 for ; Sun, 21 Aug 2022 20:48:11 -0700 Authentication-Results: mx.groups.io; dkim=fail reason="unable to parse pub key" header.i=@intel.com header.s=intel header.b=TB0pASMz; spf=pass (domain: intel.com, ip: 192.55.52.151, mailfrom: jian.j.wang@intel.com) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1661140091; x=1692676091; h=from:to:cc:subject:date:message-id:references: in-reply-to:content-transfer-encoding:mime-version; bh=4x+WCIsdPfBZHm4GldCqTFhzTurK0z724c9NZ47rTJo=; b=TB0pASMzzAfflUasBUjIJFWS+IFZIUhLqdu988c20KPi274xix6QIvGw Ot8a7BTfrObSdtJdfleUGdxNVt6mPRG+tLhw5alO61z2TEUUQvgcNv/Q8 HA91rY+BABfiIRKEAACfvNlQ2QTYBZ26ixY+4EO0rTU4GpW3WfKLZ2+NF yC8JXpBADDZjVh4g3/Fz/BO98xvs46qaHHAIyQpjikeThGuqrGH1C43QB srW7xTbUT6QONLKq0bYfB95H45IzduyCUN53Dqlb9JjyTam8xKz5Y7EYJ ntS4a0zM9Li4qtoPWdiQzHl6AE3vNMR1b7VD8+gr18PqsR6img1ZLYy7y Q==; X-IronPort-AV: E=McAfee;i="6500,9779,10446"; a="273701401" X-IronPort-AV: E=Sophos;i="5.93,254,1654585200"; d="scan'208";a="273701401" Received: from fmsmga007.fm.intel.com ([10.253.24.52]) by fmsmga107.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 21 Aug 2022 20:48:10 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.93,254,1654585200"; d="scan'208";a="611889021" Received: from orsmsx603.amr.corp.intel.com ([10.22.229.16]) by fmsmga007.fm.intel.com with ESMTP; 21 Aug 2022 20:48:10 -0700 Received: from orsmsx612.amr.corp.intel.com (10.22.229.25) by ORSMSX603.amr.corp.intel.com (10.22.229.16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.31; Sun, 21 Aug 2022 20:48:10 -0700 Received: from ORSEDG601.ED.cps.intel.com (10.7.248.6) by orsmsx612.amr.corp.intel.com (10.22.229.25) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.31 via Frontend Transport; Sun, 21 Aug 2022 20:48:10 -0700 Received: from NAM04-MW2-obe.outbound.protection.outlook.com (104.47.73.173) 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; Sun, 21 Aug 2022 20:48:09 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=OenW60zXth+zIJyBBUU5kyJmW0dYaFnbSIhBBJk7Ir53+phTZTxqssASbCYAY0cRK5U4J0eat7DzP4WujajxLiiA6xLFg6eNCKZ7SaWuS8JbZm+3u0oNeSkOlvqbE/2xRuqDK3uC7EPG9Cn4cKkWK1xPkZB4TGb7xu8363225CKryOsPcZlAT1rJ+G02pkgVg8GpsThSWVDxORUSdMjQG4/ySnnRjPh7nxRtAb5b4A4Y32IFn3VvCusUb82zlGZ7YFVocOu5wdB5Wjr7TcQto1DYjMMT2bz/U09RoS+uEspQCFCFjvfQXw7e2PNmzPZgZgp6TMN3b8ETRAeuQ2i3Gw== 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=h7s9Hj8Fx1+KJNvBO59kaYk6dnfeG+kwN0QuD80em/8=; b=kp1nJV4a/gIeyievwhpQ9yuwAA2k4oyBMGGhZC41P/HCX8lsPInYeXdHijp+4QzrZ42p7kb5DqbK+XWXYgnhMJODk2FEobNy7C7BN78ogAurDK49+3dDQda2v9QpYWa2xxA5BYUFpWGU1xerhFQrma/oM1vdMD2wAkgbWDZGy71DWQ+MLhkAzT9Vu2WoK3ZsMl/OlPsB9w0WcaouPevcXth/UaOsnPkmG9PqfNhIyDIGIL5Yzvt2ykI3fAxaxDmUj8lU+QEJ32W3A9JQ27GT/roh1lQvDGi4x6JRkMiOyHlYrocBz4kPdGLMutjb8+vaNUGNbBj58MU9e5sTjKMP9g== 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 CO1PR11MB4945.namprd11.prod.outlook.com (2603:10b6:303:9c::8) by CH0PR11MB5266.namprd11.prod.outlook.com (2603:10b6:610:e1::7) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5546.16; Mon, 22 Aug 2022 03:48:00 +0000 Received: from CO1PR11MB4945.namprd11.prod.outlook.com ([fe80::ece8:740d:999a:e17d]) by CO1PR11MB4945.namprd11.prod.outlook.com ([fe80::ece8:740d:999a:e17d%5]) with mapi id 15.20.5546.022; Mon, 22 Aug 2022 03:48:00 +0000 From: "Wang, Jian J" To: "Vang, Judah" , "devel@edk2.groups.io" CC: "Yao, Jiewen" , "Mistry, Nishant C" Subject: Re: [PATCH v4 15/28] SecurityPkg: Add null encryption variable libs Thread-Topic: [PATCH v4 15/28] SecurityPkg: Add null encryption variable libs Thread-Index: AQHYrU8y53ZBgrYr+k2/B0Kjf1SAg626WUnQ Date: Mon, 22 Aug 2022 03:48:00 +0000 Message-ID: References: <20220811065337.2068-1-judah.vang@intel.com> <20220811065337.2068-16-judah.vang@intel.com> In-Reply-To: <20220811065337.2068-16-judah.vang@intel.com> Accept-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: dlp-reaction: no-action dlp-version: 11.6.500.17 dlp-product: dlpe-windows authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=intel.com; x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 6b84b532-7dba-4d37-358d-08da83f11c14 x-ms-traffictypediagnostic: CH0PR11MB5266:EE_ x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: zl2oiAyu9dZIOmZD27PrWjiz7pAwBneYVe2W+w++Dd/sgN8zzNTEcOiJPeErHpsfD0gM+IpDaAffEZmrm1483z51nSJlL+RIY0klfXYVWh42bxbcSXlcQrD4wqMIA2UenyG64wtDHl9eiycqRYepYWtlQWqzHMxeOQFx1cuh1kjLbQyFPN6+8Q41MVDWYiIkVMHX0uTa1zIIlD4WSaV3a5CsKz4Kasq1R4wvODpB4GKS4qkPok/78vFjdMUk7uFnr5VgZcGE5m0pEl4D/7iHGFhAUKCzDjJnLBx5NyLDkB37u9y25wWbvp0qy+ZxH/evt4HBGWVKyQtgwFkkPJdGUJx7UbluzBU6cakHZwmuPZhI1Goy+f4d7hWviMeADfzPXIb4/HLTnNpdUwO2FmadAdZ69UrkZnCcKr0VETci396s+dut4mIiC9sspkPy+/Fo6VkFxr6J33IvZcfxMGSyzwT4vka53hxurjQiDuVZV57DzBtGvlKTft6XT845di2CN+1axBPHA2QFgP+EmFl4GHj6EVqwG78w5dmLr9LeZCPZWKZ5onfTYaSfMn0YudY931tcadYpwNyjNve/ootIFoupSM/Zx+wE5LCZP17lkbEXjbEaST+r25IBQjZyPwc5okCr+NRV9VG9mOn7PUQVYGXoOrl9nOTlMOsjep0jWJFpqB1bn5qdi8SRySURJAcSCSLEUqf19DvvXKK/3Tzt4aVZRPQL70T5MFYVa0kebnKa65aw2No/OdZobm8AfhTo19hgFaU4xg8xCuTqFO/Keu22prAZ/8/By0jYha/gSTw= x-forefront-antispam-report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:CO1PR11MB4945.namprd11.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230016)(39860400002)(396003)(366004)(136003)(376002)(346002)(122000001)(76116006)(66476007)(4326008)(66446008)(64756008)(8676002)(66556008)(33656002)(66946007)(86362001)(38100700002)(38070700005)(82960400001)(110136005)(54906003)(186003)(53546011)(9686003)(6506007)(107886003)(41300700001)(478600001)(966005)(71200400001)(7696005)(52536014)(316002)(8936002)(55016003)(15650500001)(2906002)(83380400001)(5660300002);DIR:OUT;SFP:1102; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?OaGjoY1p+dx2bmg24Q9d81nMdfhoVylQPyFxizYTLQZj9+J1ftMDaxrK2Cgw?= =?us-ascii?Q?qSW5y2++sJuDUriGrvFp1cHSjv/8p02ISe2Hc/3H2wmk6MfcYyy1JShNSF/e?= =?us-ascii?Q?RDKKHpIctFYhxzcuRCRp+3p0a76f9ZeK3zWJD1oqhdnkmqCSzvhB0YgGAuWO?= =?us-ascii?Q?OSyBgaIS8KQ4hos/KSDrMgQG3FuPd6ZrphnzHwsUITxMupqyOOEWvhKlgsm3?= =?us-ascii?Q?XbdbSRRN/XQAE4FzQ2WsyU9fbPT5sJz6dxaIhFBtL2+5NU/looSLJQUnOpUm?= =?us-ascii?Q?OGYennMllWied5Dlf6a+G/P+yvZP2b2g117p2kMcgJRL+z8d2peQXTG6Qtka?= =?us-ascii?Q?mDMhAYwhT43SmD45cGQJtS0+B0vbwdwve8RvotPhT1++aPGovqE6+yLHjIvV?= =?us-ascii?Q?GoSCHrthRDvPFlEFTLDGEWFoRyGbiwreCu5BHv76iqSA8gevDZYkMPeJCFSb?= =?us-ascii?Q?/nWOWq+olpiy4RerRbVvP2KriXqBWP34sEf1MYC09uRWjAXDkV3S2YvApfQQ?= =?us-ascii?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mCqt3vV?= =?us-ascii?Q?kKE8yk98VWTKTplOoNh4Y3XxSfhA8Ilm5lyKI2RZEMppej/YKfwj7quHCGNo?= =?us-ascii?Q?Bn5fehcJAuOxx18i5wnZsC6lXi8OLUsHq5prPSe/e6rYt9zkf+252aisLjVu?= =?us-ascii?Q?Y4DpzNE+DnEjGnuLi32beP83VAACsjImAcEMLJvbdSaQ8E1c8NQVJ16qrSmo?= =?us-ascii?Q?C4H7JnbABr+EDmfRArhYFQO8lkb5TrNxGSJO/y1Q6zDg?= MIME-Version: 1.0 X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: CO1PR11MB4945.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 6b84b532-7dba-4d37-358d-08da83f11c14 X-MS-Exchange-CrossTenant-originalarrivaltime: 22 Aug 2022 03:48:00.7633 (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: S1b8PE/wlfKqtW+iCcUz2DypLG22D/HhG/hRKeDjetVdc4uhtWEEbQbOewujxb09qwR/Lhk4oErWzMg7CUYwUw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: CH0PR11MB5266 Return-Path: jian.j.wang@intel.com X-OriginatorOrg: intel.com Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Reviewed-by: Jian J Wang Regards, Jian > -----Original Message----- > From: Vang, Judah > Sent: Thursday, August 11, 2022 2:53 PM > To: devel@edk2.groups.io > Cc: Wang, Jian J ; Yao, Jiewen ; > Mistry, Nishant C > Subject: [PATCH v4 15/28] SecurityPkg: Add null encryption variable libs >=20 > REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3D2594 >=20 > V4: Applied code review - Remove empty Guids section > from .inf file. Update description in *.c. Remove *.uni file > and reference to it. >=20 > V1: Provide null ecryption variable libraries. > These will be used by default for platforms that don't > support protected variable encryption. >=20 > Cc: Jian J Wang > Cc: Jiewen Yao > Cc: Nishant C Mistry > Signed-off-by: Jian J Wang > Signed-off-by: Nishant C Mistry > Signed-off-by: Judah Vang > --- > SecurityPkg/Library/EncryptionVariableLibNull/EncryptionVariableLibNull.= inf | > 34 ++++++++ > SecurityPkg/Library/EncryptionVariableLibNull/EncryptionVariable.c = | 92 > ++++++++++++++++++++ > 2 files changed, 126 insertions(+) >=20 > diff --git > a/SecurityPkg/Library/EncryptionVariableLibNull/EncryptionVariableLibNull= .inf > b/SecurityPkg/Library/EncryptionVariableLibNull/EncryptionVariableLibNull= .inf > new file mode 100644 > index 000000000000..185b6f9bedf7 > --- /dev/null > +++ > b/SecurityPkg/Library/EncryptionVariableLibNull/EncryptionVariableLibNull= .inf > @@ -0,0 +1,34 @@ > +## @file > +# Provides NULL version of encryption variable services. > +# > +# Copyright (c) 2015 - 2022, Intel Corporation. All rights reserved. > +# > +# SPDX-License-Identifier: BSD-2-Clause-Patent > +# > +## > + > +[Defines] > + INF_VERSION =3D 0x00010005 > + BASE_NAME =3D EncryptionVariableLibNull > + FILE_GUID =3D 3972E6FE-74D5-45C3-A9FB-DB9E5E5C9C1= 7 > + MODULE_TYPE =3D BASE > + VERSION_STRING =3D 1.0 > + LIBRARY_CLASS =3D EncryptionVariableLib > + > +# > +# The following information is for reference only and not required by th= e build > tools. > +# > +# VALID_ARCHITECTURES =3D IA32 X64 > +# > + > +[Sources] > + EncryptionVariable.c > + > +[Packages] > + MdePkg/MdePkg.dec > + MdeModulePkg/MdeModulePkg.dec > + SecurityPkg/SecurityPkg.dec > + > +[LibraryClasses] > + BaseLib > + DebugLib > diff --git a/SecurityPkg/Library/EncryptionVariableLibNull/EncryptionVari= able.c > b/SecurityPkg/Library/EncryptionVariableLibNull/EncryptionVariable.c > new file mode 100644 > index 000000000000..52ee8a7b5aae > --- /dev/null > +++ b/SecurityPkg/Library/EncryptionVariableLibNull/EncryptionVariable.c > @@ -0,0 +1,92 @@ > +/** @file > + NULL implementation of EncryptionVariableLib. > + > +Copyright (c) 2022, Intel Corporation. All rights reserved.
> +SPDX-License-Identifier: BSD-2-Clause-Patent > + > +**/ > + > +#include > + > +#include > +#include > + > +/** > + Encrypt variable data. > + > + Null version. > + > + @param[in, out] VarEncInfo Pointer to structure containing detaile= d > + information about a variable. > + > + @retval EFI_UNSUPPORTED Unsupported to encrypt variable. > + > +**/ > +EFI_STATUS > +EFIAPI > +EncryptVariable ( > + IN OUT VARIABLE_ENCRYPTION_INFO *VarEncInfo > + ) > +{ > + return EFI_UNSUPPORTED; > +} > + > +/** > + Decrypt variable data. > + > + Null version. > + > + @param[in, out] VarEncInfo Pointer to structure containing detaile= d > + information about a variable. > + > + @retval EFI_UNSUPPORTED Unsupported to encrypt variable. > + > +**/ > +EFI_STATUS > +EFIAPI > +DecryptVariable ( > + IN OUT VARIABLE_ENCRYPTION_INFO *VarEncInfo > + ) > +{ > + return EFI_UNSUPPORTED; > +} > + > +/** > + Get cipher information. > + > + Null version. > + > + @param[in] VarEncInfo Pointer to structure containing detailed > + information about a variable. > + > + @retval EFI_UNSUPPORTED Unsupported interface. > + > +**/ > +EFI_STATUS > +EFIAPI > +GetCipherDataInfo ( > + IN VARIABLE_ENCRYPTION_INFO *VarEncInfo > + ) > +{ > + return EFI_UNSUPPORTED; > +} > + > +/** > + Set cipher information for a variable. > + > + Null version. > + > + @param[in] VarEncInfo Pointer to structure containing detailed > + information about a variable. > + > + @retval EFI_UNSUPPORTED If this method is not supported. > + > +**/ > +EFI_STATUS > +EFIAPI > +SetCipherDataInfo ( > + IN VARIABLE_ENCRYPTION_INFO *VarEncInfo > + ) > +{ > + return EFI_UNSUPPORTED; > +} > -- > 2.35.1.windows.2