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.web10.12877.1669100152710041347 for ; Mon, 21 Nov 2022 22:55:53 -0800 Authentication-Results: mx.groups.io; dkim=fail reason="unable to parse pub key" header.i=@intel.com header.s=intel header.b=IEmQi8Xs; spf=pass (domain: intel.com, ip: 192.55.52.115, 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=1669100152; x=1700636152; h=from:to:cc:subject:date:message-id:references: in-reply-to:content-transfer-encoding:mime-version; bh=q+c8oEp2QR2VB5C3nC5Eu5nr93TCOCXzdIcJZ5fTekY=; b=IEmQi8Xs4lF8wtHTMabn3wzan5ohRYhmphOx7NlrN8kkzddKK9RnX9FY 0SlLezNOo58Twlrd4Ih1kVQi/P0+R4TWOXn/Gfo3WNHGYTl699/ReN9We t6jyg5E6gEtkgkm/RAU6LpyZwCNfvMmWtq/JwPXclXLGpomE154eC0Op4 d4BSIROM/u+FN/9WGQRmZDqEp141ndqvNkQDs/UGZXomGPxM9+yq0Ec8p n1QGZ0As0SLwqeTgvzMX1JveGVQTT5iIVM76sr+9h2VHUNsNXVllbSEIU JsCpzTrdJJig2QFvTY493kNdbaVbCNX1YN/3KGvM1s0el6cEbVmqCSmJV w==; X-IronPort-AV: E=McAfee;i="6500,9779,10538"; a="313778636" X-IronPort-AV: E=Sophos;i="5.96,183,1665471600"; d="scan'208";a="313778636" Received: from fmsmga007.fm.intel.com ([10.253.24.52]) by fmsmga103.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 21 Nov 2022 22:55:52 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6500,9779,10538"; a="643613104" X-IronPort-AV: E=Sophos;i="5.96,183,1665471600"; d="scan'208";a="643613104" Received: from fmsmsx603.amr.corp.intel.com ([10.18.126.83]) by fmsmga007.fm.intel.com with ESMTP; 21 Nov 2022 22:55:52 -0800 Received: from fmsmsx612.amr.corp.intel.com (10.18.126.92) by fmsmsx603.amr.corp.intel.com (10.18.126.83) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.31; Mon, 21 Nov 2022 22:55:51 -0800 Received: from fmsmsx603.amr.corp.intel.com (10.18.126.83) 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; Mon, 21 Nov 2022 22:55:51 -0800 Received: from fmsedg601.ED.cps.intel.com (10.1.192.135) by fmsmsx603.amr.corp.intel.com (10.18.126.83) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.31 via Frontend Transport; Mon, 21 Nov 2022 22:55:51 -0800 Received: from NAM11-CO1-obe.outbound.protection.outlook.com (104.47.56.172) 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; Mon, 21 Nov 2022 22:55:50 -0800 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=D3I6nzvk7ndv4fg5+nsWRGHeosroBIwupQPrA7/KjlyZdSJpkrmL/pyPk0Er1eOqIv9yF1MtZjvyZXKq6ZVBTM49YFibpbvWjM6O5Pxi2whQlbcjFWqhinUPejgI5xp+8j/GMF0K8E0Eyi80f/JcpZisJin5az3UoPDrE0n1zM7l+UHoUSZ/vRqXaudguMf7KNjdoFygEsu1oTR0Xsu9nyB7nWICLq7466GdL345micFzuSFk2kBNrKP2F/UKigChMyJhrK2bppzkZH355buPKK73bzEP/ywd7EaAcjzPndwr8h70QGI88IxQ82bcM8fJM1GoVd18i1Ygcc36Sc1NQ== 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=MQyTXRhpSdFrBVF1z0C5jx44YW5W5qfJ571JAP8DczQ=; b=IglW8a1Za2X5bQVJAXpFqJTfoIFXR5UlQrQw+b4NwAty6O7KX3BuGnzNZBPUptMbLR067jtXSDqkCqQw86kPWjUgtKlZUdVkNk39MWTMW2nqlm2v+fIggBfUh1QzRVTG61w+2O4lXK/3jjoXstFFyajnb4KmxMD2aFPPUl3Yx9EoC1Bv2Pk3R5GxGs4pMsAVwCOla7Fo5yLIPWpscZUAebQX99zV7FNn3PN07rJpUuEmcLhbaMNSHDMia808+QnwYkHjqJsKfLkMRKqBvA5pjCzaP/MwrRlVOvskUmKFWkx33XqHw0WSIFrB/3chDP/X6niq/9JI1jyaiJPtFH7NDw== 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 MW4PR11MB6763.namprd11.prod.outlook.com (2603:10b6:303:20b::7) by PH7PR11MB7451.namprd11.prod.outlook.com (2603:10b6:510:27b::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5834.15; Tue, 22 Nov 2022 06:55:48 +0000 Received: from MW4PR11MB6763.namprd11.prod.outlook.com ([fe80::1440:650:6a28:88d9]) by MW4PR11MB6763.namprd11.prod.outlook.com ([fe80::1440:650:6a28:88d9%4]) with mapi id 15.20.5834.015; Tue, 22 Nov 2022 06:55:48 +0000 From: "Wang, Jian J" To: "Vang, Judah" , "devel@edk2.groups.io" CC: "Yao, Jiewen" , "Mistry, Nishant C" Subject: Re: [PATCH v5 15/19] SecurityPkg: Add null encryption variable libs Thread-Topic: [PATCH v5 15/19] SecurityPkg: Add null encryption variable libs Thread-Index: AQHY8bJduVHqW+AVl0Sz8IphfS14965Km3Qw Date: Tue, 22 Nov 2022 06:55:48 +0000 Message-ID: References: <20221106073509.3071-1-judah.vang@intel.com> <20221106073509.3071-16-judah.vang@intel.com> In-Reply-To: <20221106073509.3071-16-judah.vang@intel.com> Accept-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: 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: MW4PR11MB6763:EE_|PH7PR11MB7451:EE_ x-ms-office365-filtering-correlation-id: a5d8a18c-4180-4bd7-1b9c-08dacc569624 x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: pu9QyLOI8RG9hebI+9+4U8wxy2hc55u0JhzfRO3SwFOoTDDiRy37QhPKjGrwnCXMm5jZRpMcfwSqFwFNEC8CTIgZM1ZGRTcBjJnkqBC0BTAdH7CCZ/eSwUxC+crH5SCJbUPEIaQ0d3M1D9wE3Mh2jyATqvfOxCLJumCPpwN+1/+QG55tvqQag7Ch5Bo7vuP1LVopTkE+9Iru0JAdiUR3Pk+qK9z7/gzkf4qJKUDpexMVcWIfgAMoSIev1ws2ToZs0jWqC7zTUu5M6ozA9zhfVqOVrMd8Au9rYsAJZGp2hfbS882Nxr7bhadDzYp0HKCDKcR52TjHgO3P2yo1eX3Z/+bhPmz+DcFiEzUNBzs68tRN82UacmIHeU6h3LhIwt9IrA2m6oVDrSH1Zwp/j5GnPju4GGq5VBQV3qOeGKVVVENmO8gRyz27ri7d4cGt+rzFBPnVse+9CEplzjPcbbHwwt3AtwWb6zV3WYD5UoKwVfp4Tn/FrOknYWHd/lMNDZqo5rKt2iK4Q3114bHqz1sZi2cOOda1O/nx/QtJ7y3X05nNF3wkC6AhnT4X31riD/pXbEh0o1z+3gPdWJeUDPO9+yf67fqwrHpsH+sr+4yYXOaF1LjB9zZi0ddoh8tbcO4MIqaQvk21BAqQB9Tf/fbwJ5idvTQ5Wjpm4vLe1Hc8vtqK48kj+sgUlobITfSVvNIWhtDbarQXXMKUC2m4XT8rW6OeM6bYST3Z6WJjHGaKIz8= x-forefront-antispam-report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:MW4PR11MB6763.namprd11.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230022)(396003)(366004)(376002)(39860400002)(136003)(346002)(451199015)(316002)(33656002)(110136005)(54906003)(53546011)(107886003)(38070700005)(83380400001)(55016003)(186003)(9686003)(71200400001)(966005)(6506007)(26005)(478600001)(7696005)(52536014)(15650500001)(8936002)(41300700001)(5660300002)(38100700002)(64756008)(86362001)(2906002)(82960400001)(76116006)(4326008)(66446008)(66476007)(122000001)(66946007)(8676002)(66556008);DIR:OUT;SFP:1102; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?/HOCXgXjRrMXn0F9NQYetHG/ZKsAJz7XbvsO89sjWNGqqwQo5LjtfG6jDell?= =?us-ascii?Q?illx/WYAtZBjBxKoY2DdwWkNSOhy/cCmYUkS7O5JbrKo4iAJn2NltWBLdEMQ?= =?us-ascii?Q?b2G02gW2+bBN9MnTiJ0BcAibAS6Z/nwpdJmzh872cSFT2Xyaj41FbTcsWfN7?= =?us-ascii?Q?N6VoL0+tkfqYecWNtJaQemNZqoCM6RcjhDlpm0tGthg1eQagC5PACZ6M/x5a?= =?us-ascii?Q?EDg5qlm8IL7MsBWDZeeil3jQkh8p5haBN4ouxwDdpJBjJ23L3U93pdpHBy0+?= =?us-ascii?Q?Oriz9tSroqEO5DU6JllFhOMmJDVK5FOa3VBp9BfdzcgZvcAATIjQf7OqcCBw?= =?us-ascii?Q?Z1nu5yHmmxm+sdoH+9KaYMXrV1PBJ8Ko10vFW4m3I/vG/CRyGOHlSXljzh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ZtrAcyu6GrpMklqWSPPA7/6pg0xqWJDNbL?= =?us-ascii?Q?YWpfyPYrNi/V1PUTxmMB8sWEYek88GsSM8Ub7l268iLB9/GRAgtA3mzGyd1o?= =?us-ascii?Q?AnhrfdtF5Sw6l4E6oaykl1tM5Khsb965GcqVxG+e+/UoFaaTFSUrOIXV1m9l?= =?us-ascii?Q?Rty22F8V7SpPSnNlil5FhNr5iNwuMQKJXuXR1KzJ376BscOwZXPHuDAiHBM/?= =?us-ascii?Q?i+pyuOsnngLcdi0TkyXQW9JIcIoIEX0OBuLk2+0Km7+2R30/6HQ/OP4srwbk?= =?us-ascii?Q?vR7vmxGwVIO9umoAF+O+ScxFr7wRQQiURitH8GZ5?= MIME-Version: 1.0 X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: MW4PR11MB6763.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: a5d8a18c-4180-4bd7-1b9c-08dacc569624 X-MS-Exchange-CrossTenant-originalarrivaltime: 22 Nov 2022 06:55:48.4236 (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: 6C0UHnZ5cTbG2zM/LbtvFCG490iv/ZHpz2usM5XLF4Pa/1jl2/tVVBv8UfhrCDKYxYx0V3R1E5kYJa5JCggQ6g== X-MS-Exchange-Transport-CrossTenantHeadersStamped: PH7PR11MB7451 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: Sunday, November 06, 2022 3:35 PM > To: devel@edk2.groups.io > Cc: Wang, Jian J ; Yao, Jiewen ; > Mistry, Nishant C > Subject: [PATCH v5 15/19] 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