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.web11.12984.1669099573037330010 for ; Mon, 21 Nov 2022 22:46:13 -0800 Authentication-Results: mx.groups.io; dkim=fail reason="unable to parse pub key" header.i=@intel.com header.s=intel header.b=N/IeeGtq; 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=1669099573; x=1700635573; h=from:to:cc:subject:date:message-id:references: in-reply-to:content-transfer-encoding:mime-version; bh=SfMh3ib1QvAvUy7NhMFmgwCEu+04FQmGbyy9D2pHciA=; b=N/IeeGtq4D2Z40b2EdcammxKLtXiONfKwgk4Qc5YgmWDl3LhNPWWy1q5 cbkpCz9hEgLGgKRs0UfajHnYKW5ydNSz0t1CbybIibt7mlbg5LKQpecQF e7LepIqmcHrY/s12Zc5ffDCxS5rRjDzVwmEoRKInR7M93uZBqhg5qyNkH xcXpDA/zVs7S8POK57Yfl9fSyhJdcylTCq/WLoKYUUgPnMPZ95ym055d9 xBBBn2ciBs7ypDCOCP6YRIJQGZLDLgDV1283gkR6M0kctazG0AXIormEf 9fpbaWSgeshzfV5I7y6T9sYkFM2AvHKkj/DkuYnoT6WJqDociA6vVe/Do A==; X-IronPort-AV: E=McAfee;i="6500,9779,10538"; a="294137008" X-IronPort-AV: E=Sophos;i="5.96,183,1665471600"; d="scan'208";a="294137008" Received: from orsmga006.jf.intel.com ([10.7.209.51]) by fmsmga107.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 21 Nov 2022 22:46:12 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6500,9779,10538"; a="619105525" X-IronPort-AV: E=Sophos;i="5.96,183,1665471600"; d="scan'208";a="619105525" Received: from fmsmsx603.amr.corp.intel.com ([10.18.126.83]) by orsmga006.jf.intel.com with ESMTP; 21 Nov 2022 22:46:12 -0800 Received: from fmsmsx611.amr.corp.intel.com (10.18.126.91) 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:46:12 -0800 Received: from fmsmsx612.amr.corp.intel.com (10.18.126.92) by fmsmsx611.amr.corp.intel.com (10.18.126.91) 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:46:11 -0800 Received: from fmsedg602.ED.cps.intel.com (10.1.192.136) 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 via Frontend Transport; Mon, 21 Nov 2022 22:46:11 -0800 Received: from NAM10-DM6-obe.outbound.protection.outlook.com (104.47.58.105) by edgegateway.intel.com (192.55.55.71) 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:46:11 -0800 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=ZbbyVoEoXrf0mH4Y9SXyolFA9iEPnHvS7IfNGlbEF0su4LzSC1PxxjGhPeazdFzgWRrUawgop7pDAQxxbax6MJP2x7pQ/CyQ3Jimz/rpH1E/FhZTxjO/8691q0wtLbg9hoDHhQXZB3yt+O5asvjnYliCK3xPOjlXQ/oTwg4oJ2CEeRkbE0YrxTUhcAfjFF1o9BLfMxpQWcrpM76r8zx5jvBBm7AWdJkPmCy1cskSEPqX97fdf6harYIM4uoBlmjqkD7yYCFmYJ8wIc9d402vC5sZJJEekGukgJmE9RbQkMmX/31TCRYeI9R2nYyU0G1uKoqSul+zy2FxCq/Y98DjiA== 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=QBD5bQH5Is0xMzHLYoX+E3Zq/VNcPmeCs+35EegcHzU=; b=SZOfvw1u6tWdr26bZn3Lnkk+XMBthy+M52Y2GWvP3PCMOz7FGIAoqOZffn/WkKQFFEyWFyplXBXWjrlVbMKCP+QAlIM+59qK20NLZGey6Kr7EBcMmosPWLhcc1U5y6dm3v4z1Wf9KRtn85kq5EINDPMlNBYUEhpoYsp+K3bjIliPQtcdSqXoEXVhup29IvWUE/Nfoym6l4TBftBpMg7b3eWexqzuWoRi9tw/NxBe0pkzDwZbpbo5Fm1567c8cdHWKDxAWHbVQsKI7rKB+m4sqnkJcb5RJ4Thr6f8M0mTVSXvv/Fjr+y6REMN7A9dpELJ2Y/gVkXgdHkm5YW+1o28CQ== 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 SA1PR11MB5921.namprd11.prod.outlook.com (2603:10b6:806:22a::15) 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:46:09 +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:46:09 +0000 From: "Wang, Jian J" To: "Vang, Judah" , "devel@edk2.groups.io" CC: "Yao, Jiewen" , "Mistry, Nishant C" Subject: Re: [PATCH v5 11/19] SecurityPkg: Add new KeyService types and defines Thread-Topic: [PATCH v5 11/19] SecurityPkg: Add new KeyService types and defines Thread-Index: AQHY8bJdo4ExBzLDq0WUPezzyWd7NK5KmMYQ Date: Tue, 22 Nov 2022 06:46:09 +0000 Message-ID: References: <20221106073509.3071-1-judah.vang@intel.com> <20221106073509.3071-12-judah.vang@intel.com> In-Reply-To: <20221106073509.3071-12-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_|SA1PR11MB5921:EE_ x-ms-office365-filtering-correlation-id: 7608dcdb-b1b6-4d81-5eca-08dacc553d0f x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: WQWtQhUhtfsTIGgnHTsqzwAsR6tKUA8xDqTHHLTqDyC9PMxcQNC+9Q2SZLRo/Lhe2Dr9OZhmCuW2VG7g+pFcmBMzO+EPCtyeuMcH5yYqO1PzXrpyO4t8CXGAm1iBkNwa8JoOevkz2AicxeJLKZCYtXpBSeHZtGoK8z6XIhY8BL535YvDD8ydNH9UDx46lbphu1ZNseOUFUKVAf1dqkqALoPHBXsPLvY9tIPwowCg+biqZR/I87N0yGZGyj/B92SOR9IGzPLO4qJ/v73H3NWS1vEpEl1WsyL6V7iWsXQXYG7i2T5WtQ9daxgIAb5NdTBKI9xCRaF26uQdaHy2VLfRsD1QaiS/pHPtHPq5wfgFVIRqc9y+LmMyfiZcqE8fav7ieFK/McPefTsShg3Ak5efWDJK6s8nj9/XZc+kRb7oxFLeSyi8RRqOSjBKAFcdn5ePPiMGZaJDgnE17be64CdTz8H0a2yHvL0hUxyWI4pJXnXUI3mbWMJCvpo+SagLWBP72a+5On7Cx/Zul1u8JVqfcczbuGqGGuet6Osf4B/l1FzvkoU2G/rtAc2x991U3jLiJEFgNbL46huEAxe77a7u0u4ZYy8vYRkRswgjwK0is2MgoeTy3eF5QF9j/SSoMYpvAaJWEp6L5RhlE9mJsBZH6xlsUuK+15t/Jc2KYPjlhA4JRLtF9b+14cKG6E3Xa/p+HZMb6cUEdGRWt4YbN6Rtg0ub44IOz8L3WaRWhFKul/8= 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)(346002)(366004)(39860400002)(376002)(396003)(136003)(451199015)(966005)(76116006)(66946007)(4326008)(478600001)(33656002)(66476007)(66556008)(64756008)(8676002)(41300700001)(38100700002)(82960400001)(66446008)(54906003)(110136005)(186003)(38070700005)(83380400001)(55016003)(26005)(6506007)(7696005)(9686003)(71200400001)(86362001)(107886003)(316002)(53546011)(122000001)(2906002)(15650500001)(52536014)(8936002)(5660300002);DIR:OUT;SFP:1102; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?kua65bSfMKo/PWZ9VIcmyGMuLdrE4ANZbXCcsOYl5InUMmsVk4qb0Ux4hSr0?= =?us-ascii?Q?zFztzPd43m48jjVFwUSbForBczq7acvMOP/i34U86/jiePDLoynOvEjpFXR9?= =?us-ascii?Q?5egEJm/TmW0h1JxNAQrH8doM2Yq9UIeZpqsPOFjjhcNh1AUU2LQi7DEDqGow?= =?us-ascii?Q?R7dEOvJ0w2yTVK0y9ZnEEbgAX0BvaiOD6LIf6kZ4OT8Xs16Yq8nrPLJfPISQ?= =?us-ascii?Q?raNeZ0WoIOBBeWBYRDddlnXpuD1MuAUJADsrVyuocNTM+/SuVTsF+y6zH9gD?= =?us-ascii?Q?sRFb0nAf+VYLOUCGvn2Gd7G09qAPl6bw3vuZrBn0flI5y2G2agLp2LU1Iy7k?= =?us-ascii?Q?OW/8Y2rl2HM7Hx0D0iBlBB3xRGHbJg3bcBx2/Bkfz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reOJrJ/5m2jzkozxlRWVQSB5Qvyy3ZYZyM/b5ZVdpxLKZq?= =?us-ascii?Q?euReZvDwF+FEfP/sHvAhrxOE9qL4pvdtoq3gf0Bb90iYyyKgftJ7B4Cq5l8Q?= =?us-ascii?Q?KqdvEGdgCz58ZuTyrCb2M/9O0Cf6q3Meqr0nfKTAIr5CAqg5LJIwQOieeUJq?= =?us-ascii?Q?bcJ1hkcJw1ntl/g93KnOnqp96mDcc+Wi0v4wrbK7Ig3alDtfFBraov3VNpRF?= =?us-ascii?Q?5H3YXy96HN1CXo+8ILK4X2eEwysugEOkFNiDfqsGF0BumVtsYJEf1d1fqNA9?= =?us-ascii?Q?Lw1hpO3jPSpDy0uluzAWzS3k6el2JAFtzly+Ng3A?= 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: 7608dcdb-b1b6-4d81-5eca-08dacc553d0f X-MS-Exchange-CrossTenant-originalarrivaltime: 22 Nov 2022 06:46:09.4582 (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: kNs/Bprzldjmt0yEuKpmt8VpTW5vVawB+Gh2BNdI3zMKYPcKwJL5D6ZORKcpk2UeaEeEEhMO1Fk4NkU38eY4bg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: SA1PR11MB5921 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 11/19] SecurityPkg: Add new KeyService types and defin= es >=20 > REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3D2594 >=20 > V4: revert copyright date change. >=20 > V1: Add new KeyService types and defines. >=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/Include/Ppi/KeyServicePpi.h | 57 ++++++++++++++++++++ > 1 file changed, 57 insertions(+) >=20 > diff --git a/SecurityPkg/Include/Ppi/KeyServicePpi.h > b/SecurityPkg/Include/Ppi/KeyServicePpi.h > new file mode 100644 > index 000000000000..8cfec04f96e5 > --- /dev/null > +++ b/SecurityPkg/Include/Ppi/KeyServicePpi.h > @@ -0,0 +1,57 @@ > +/** @file > + Provides Key Services. > + > +Copyright (c) 2008 - 2022, Intel Corporation. All rights reserved.
> +SPDX-License-Identifier: BSD-2-Clause-Patent > + > +@par Specification Reference: > +**/ > + > +#ifndef PEI_KEY_SERVICE_PPI_H_ > +#define PEI_KEY_SERVICE_PPI_H_ > +/// > +/// KEY SERVICE PPI GUID > +/// > +extern EFI_GUID gKeyServicePpiGuid; > + > +/** > + Generate a new key from root key. > + > + @param[in] Salt Pointer to the salt(non-secret) = value. > + @param[in] SaltSize Salt size in bytes. > + @param[out] NewKey Pointer to buffer to receive new= key. > + @param[in] NewKeySize Size of new key bytes to generat= e. > + > + @retval EFI_SUCCESS The function completed successfu= lly > + @retval OTHER The function completed with fail= ure. > +**/ > +typedef > +EFI_STATUS > +(EFIAPI *KEY_SERVICE_GEN_KEY)( > + IN UINT8 *Salt, > + IN UINTN SaltSize, > + OUT UINT8 *NewKey, > + IN UINTN NewKeySize > + ); > + > +#define KEY_SERVICE_PPI_REVISION 1 > +#define ROOT_KEY_LEN 64 > +#define SALT_SIZE_MIN_LEN 64 > +#define KEY_SERVICE_KEY_NAME L"KEY_SERVICE_KEY" > + > +typedef struct { > + UINT8 RootKey[ROOT_KEY_LEN]; > + UINT8 PreviousRootKey[ROOT_KEY_LEN]; > +} KEY_SERVICE_DATA; > + > +typedef struct _KEY_SERVICE_PPI KEY_SERVICE_PPI; > + > +/// > +/// KEY SERVICE PPI > +/// The interface functions are for Key Service in PEI Phase > +/// > +struct _KEY_SERVICE_PPI { > + KEY_SERVICE_GEN_KEY GenerateKey; /// Generate Key > +}; > + > +#endif > -- > 2.35.1.windows.2