From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from EUR02-AM5-obe.outbound.protection.outlook.com (EUR02-AM5-obe.outbound.protection.outlook.com [40.107.0.59]) by mx.groups.io with SMTP id smtpd.web12.8617.1637062415103211695 for ; Tue, 16 Nov 2021 03:33:37 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@armh.onmicrosoft.com header.s=selector2-armh-onmicrosoft-com header.b=hnFyIEkp; spf=pass (domain: arm.com, ip: 40.107.0.59, mailfrom: sami.mujawar@arm.com) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=armh.onmicrosoft.com; s=selector2-armh-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=Q/YH9yklmbqn+UHUj6imBJCMq+RFIipLAxft5CRxxgI=; b=hnFyIEkprvY4dM3dH4nlCv9lfPKxiDAOnhtvAwOou4ludY/blEdUb+uNjdgXXIH1zTLNSTixn3uvla4zYy7awLCDtK28RDfdPpdn5LgZ95iTdB0dom5EKJXHO5svEtlcZ/IhtlbxcWJBCWNEY10fDmbo/5UOvULvqAqQdGriFJs= Received: from AS9P194CA0013.EURP194.PROD.OUTLOOK.COM (2603:10a6:20b:46d::17) by AS8PR08MB6325.eurprd08.prod.outlook.com (2603:10a6:20b:332::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4690.26; Tue, 16 Nov 2021 11:33:29 +0000 Received: from AM5EUR03FT018.eop-EUR03.prod.protection.outlook.com (2603:10a6:20b:46d:cafe::70) by AS9P194CA0013.outlook.office365.com (2603:10a6:20b:46d::17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4690.18 via Frontend Transport; Tue, 16 Nov 2021 11:33:28 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 63.35.35.123) smtp.mailfrom=arm.com; dkim=pass (signature was verified) header.d=armh.onmicrosoft.com;dmarc=pass action=none header.from=arm.com; Received-SPF: Pass (protection.outlook.com: domain of arm.com designates 63.35.35.123 as permitted sender) receiver=protection.outlook.com; client-ip=63.35.35.123; helo=64aa7808-outbound-1.mta.getcheckrecipient.com; Received: from 64aa7808-outbound-1.mta.getcheckrecipient.com (63.35.35.123) by AM5EUR03FT018.mail.protection.outlook.com (10.152.16.114) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4690.20 via Frontend Transport; Tue, 16 Nov 2021 11:33:28 +0000 Received: ("Tessian outbound c61f076cbd30:v110"); Tue, 16 Nov 2021 11:33:28 +0000 X-CheckRecipientChecked: true X-CR-MTA-CID: 08fa2737907bfeb1 X-CR-MTA-TID: 64aa7808 Received: from 652cc0100523.1 by 64aa7808-outbound-1.mta.getcheckrecipient.com id BAA5B4B7-3FDA-437B-8504-AB18E805A2B9.1; Tue, 16 Nov 2021 11:33:21 +0000 Received: from EUR02-VE1-obe.outbound.protection.outlook.com by 64aa7808-outbound-1.mta.getcheckrecipient.com with ESMTPS id 652cc0100523.1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384); Tue, 16 Nov 2021 11:33:21 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=d3x8VPivFE3EbCDQ8pM/d9/AFx3HQxu2sQlA0AvLw6UIw2l4YPFEuyNUoSQqyve9ssPByTEUsIqhe+zNJvyRyx/K6hY/859nZ2XIBZWdPoqjU62zZbmn4G0HwXp3lsCcusBnkR7BWGJo2dopx+sh5WQhk/vSy+kRalMw0z81d2wlXz3SZpJiwIYFd9RAwJykcgxCYJ4Q2lxbc5ywMr0mMb5lT/hEjETqe8EKG3o4mSfEiU+iHV1LacIIOEOI2QJn099j8iMzr+GDMNVnO0UE1Z61JIEqlr9rqqE25ta0IFatwAwZqj5mHa6TlCWi7JNC4BYOEPDVugvm/GYxpTVFbg== 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=Q/YH9yklmbqn+UHUj6imBJCMq+RFIipLAxft5CRxxgI=; b=R7Ct7hI5aUulywA2qTny6OKBafjZg1qPrxyan+qCFciKrvB9BN9kGV6T2eeDbUJydRyIKVkxHaY4UhnztehOdDF/k3HXjR3plWFg34FORfjp0v5mKy5gqv1ZZDqsA6Dr/KOOGvsVv7yOrhPIANUq+mXg/offcBwWTXAH6XAgLuNLSRUAqtOxORmOoTpOjqqzL3gUHG5ayl1DIEmeMiJtiSX6ydmCo1J7nxJqANvIZqFzRi43ifFSJ3WaU5sP9ciP+O3nIrBPHQghJc3KOFvuQzxGhnVyDDuvO5qoK4lNqnTZItjKbOYB/yJI0w/plYX7zhMmQIYpFEzaLsS5GHK59A== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 40.67.248.234) smtp.rcpttodomain=edk2.groups.io smtp.mailfrom=arm.com; dmarc=pass (p=none sp=none pct=100) action=none header.from=arm.com; dkim=none (message not signed); arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=armh.onmicrosoft.com; s=selector2-armh-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=Q/YH9yklmbqn+UHUj6imBJCMq+RFIipLAxft5CRxxgI=; b=hnFyIEkprvY4dM3dH4nlCv9lfPKxiDAOnhtvAwOou4ludY/blEdUb+uNjdgXXIH1zTLNSTixn3uvla4zYy7awLCDtK28RDfdPpdn5LgZ95iTdB0dom5EKJXHO5svEtlcZ/IhtlbxcWJBCWNEY10fDmbo/5UOvULvqAqQdGriFJs= Received: from AS9PR06CA0149.eurprd06.prod.outlook.com (2603:10a6:20b:467::31) by AM6PR08MB5128.eurprd08.prod.outlook.com (2603:10a6:20b:e3::19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4690.26; Tue, 16 Nov 2021 11:33:19 +0000 Received: from AM5EUR03FT055.eop-EUR03.prod.protection.outlook.com (2603:10a6:20b:467:cafe::83) by AS9PR06CA0149.outlook.office365.com (2603:10a6:20b:467::31) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4690.15 via Frontend Transport; Tue, 16 Nov 2021 11:33:19 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 40.67.248.234) smtp.mailfrom=arm.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=arm.com; Received-SPF: Pass (protection.outlook.com: domain of arm.com designates 40.67.248.234 as permitted sender) receiver=protection.outlook.com; client-ip=40.67.248.234; helo=nebula.arm.com; Received: from nebula.arm.com (40.67.248.234) by AM5EUR03FT055.mail.protection.outlook.com (10.152.17.214) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.4690.20 via Frontend Transport; Tue, 16 Nov 2021 11:33:19 +0000 Received: from AZ-NEU-EX01.Emea.Arm.com (10.251.26.4) by AZ-NEU-EX04.Arm.com (10.251.24.32) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256) id 15.1.2308.20; Tue, 16 Nov 2021 11:32:56 +0000 Received: from AZ-NEU-EX03.Arm.com (10.251.24.31) by AZ-NEU-EX01.Emea.Arm.com (10.251.26.4) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2308.20; Tue, 16 Nov 2021 11:32:55 +0000 Received: from E114225.Arm.com (10.1.196.43) by mail.arm.com (10.251.24.31) with Microsoft SMTP Server id 15.1.2308.20 via Frontend Transport; Tue, 16 Nov 2021 11:32:55 +0000 From: "Sami Mujawar" To: CC: Sami Mujawar , , , , , , , , , , , , , Subject: [PATCH v2 5/8] SecurityPkg: Rename RdRandGenerateEntropy to common name Date: Tue, 16 Nov 2021 11:32:57 +0000 Message-ID: <20211116113301.31088-6-sami.mujawar@arm.com> X-Mailer: git-send-email 2.16.2.windows.1 In-Reply-To: <20211116113301.31088-1-sami.mujawar@arm.com> References: <20211116113301.31088-1-sami.mujawar@arm.com> MIME-Version: 1.0 X-EOPAttributedMessage: 1 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: db4011d6-2d03-44af-cc59-08d9a8f4e8fc X-MS-TrafficTypeDiagnostic: AM6PR08MB5128:|AS8PR08MB6325: X-Microsoft-Antispam-PRVS: x-checkrecipientrouted: true NoDisclaimer: true X-MS-Oob-TLC-OOBClassifiers: OLM:5797;OLM:5797; X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam-Untrusted: BCL:0; X-Microsoft-Antispam-Message-Info-Original: DfEZ5O53O8m8dsbLjY6xYUuDDZA2X3ejkHtbChWbmaDGdJcUYSpj43dNZYqhmrOkGT0xe9pca5itdpaucRes2SOo/tAxYH0oR+HjCwRHI6wkDw34ua02phbmR4wEEcNZJwrFw/OTZhirMpIj02jVFPxAEJJOQEM1PpaxHfQbsn4PeupOlRBk7u0sRn3+zgh7sFHS69KFOi169GDZQTpwl33zDOqgZxPxBCAeawMMenPFr+b4Dy4OPJ0n2ITEbo4bb6GJ2DnDRh6qKs9c0dWDmFg3N8LAku2dlfOnEocaZiA9wlhZSCNub80rs7k4JBxQKYhcqVxd9T0AR+IW1JgzOF0FW8MZmTS7exjwgyVCCtO3+EWycZcbcj9VLZvcj3To0dIFzDjadeyahU4r3iESfGfQmh3VC/vOO6QcrL80W2KOU96YF7sQGWebdlmH01C35HazjGjSdGmh5/4NHrA4lBloVg5iUvfiFhDN61dNCcGo5Jio/RbDjrCiQUP7DGqnWz6gQA+27tpruHK5/cML+wcXD2ImFLCzXYNOMQZ3PqffCSAdPpFDuYnwYu3cLRWbD2y/KYasJ4uWSO5xP9jMzGlhSmmENQKu861boyhNPh54PJre5NfdzCHxIGprAsSEdoOtCM0k+MrAiTcICPqOKnPfMtr3H7UsT3OmSrIF6MHg9uxJHNQC5sdxOI5S3RnrF7QdLoqiBvHvgTHnVsuKPSYEY9CVCpKjPKyujZiL5jWhngyE7lMBjyyVfAUnQvy3UP/LxD7OLZYky5SSbxrHdtlDnD4gz76Onc8TH5G5UXomv4p5Cn+FDfGC5UktTA3WZRf23Sotwu93zTUDcUt5Sw+Ga2DeOhhanXOdyt0WujU= X-Forefront-Antispam-Report-Untrusted: CIP:40.67.248.234;CTRY:IE;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:nebula.arm.com;PTR:InfoDomainNonexistent;CAT:NONE;SFS:(6029001)(4636009)(36840700001)(46966006)(426003)(1076003)(2616005)(6916009)(83380400001)(966005)(356005)(26005)(36756003)(2906002)(508600001)(7696005)(54906003)(47076005)(8936002)(86362001)(4326008)(36860700001)(44832011)(186003)(8676002)(336012)(316002)(82310400003)(5660300002)(15650500001)(70586007)(70206006)(7416002)(81166007)(36900700001);DIR:OUT;SFP:1101; X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM6PR08MB5128 Return-Path: Sami.Mujawar@arm.com X-MS-Exchange-Transport-CrossTenantHeadersStripped: AM5EUR03FT018.eop-EUR03.prod.protection.outlook.com X-MS-Office365-Filtering-Correlation-Id-Prvs: 615da9f7-13c9-45b9-e826-08d9a8f4e37c X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: YUjmcNVSW9NZIodPlkxpzAFqDAjwg0ctRVM+G/EVGWEWfOilsELYnLGXNGAU2WfKYoQUR5rB04d3FKQ/IXaKC9gbE0zfHvMns9JW9a7Flug76DHOZZQcN8DWpkI338fqgJsDDAjVgJV40veaV1yAC3lTWpMwEV8bfjFMFFJWP4tyeIdsjkC0GonihkiV41VgVNJvUwKhI56sj4+mFEuzaOx4nB9GsXgOPPUAhPB46uecGccNGQgaq4nBcOu0BHaCV4ARm55nSFNNZyG8CM/hhOgs2Pln+Lq8B9hxj2NHPkFvvOto2HR/P4mdmYktUg5fA1WNhcJPC9LYy45oZhLQnX7VQIgF0Uithmns7Z4swt9/+vYD19KSKNA/t3NFbx2hVNkgbyFNhZTAbMM8i1cq/opSqoOYr+BLobKdciZ6RW0kWQvYEAZnP+k+q2wXdg37NXA8Qk/303QQEP2n8gl4iPm5Xu0p4a+Q4KwZOyEOAqpKMV07iGNkkVK1qq5MRWsgctBI1/1ings55XTI58dX1/ykYfZPPnE1bzGsrDtIha60XT/xQgZyzCLgWkbyVA6W3hz2dckSQfn1UXKkvI7nS8GIxmDtOOuXaXjaRAT7n6dMuyeZ/2m8uGflddFVD4m2VNsl0ORxBPjzoe7eEpuKAVRbYQ9cEFGAaDVPYwZ9hb1ZJHVD7Do0IDWvrXSp3xdvmQxxFGzSdY84DB6fBjf2WkZUXkFI0hv4+TWddBAYUkPpIDtNGSTy7hWvPHPhaIMAt5fT6jyepqyAyF/Oa4zNpIy8UMCiZKpuPshLFCbMniIMdxK28xxH4UgKGXKpYAtz X-Forefront-Antispam-Report: CIP:63.35.35.123;CTRY:IE;LANG:en;SCL:1;SRV:;IPV:CAL;SFV:NSPM;H:64aa7808-outbound-1.mta.getcheckrecipient.com;PTR:ec2-63-35-35-123.eu-west-1.compute.amazonaws.com;CAT:NONE;SFS:(6029001)(4636009)(36840700001)(46966006)(1076003)(54906003)(36756003)(4326008)(15650500001)(186003)(47076005)(70206006)(70586007)(83380400001)(316002)(5660300002)(8936002)(2616005)(82310400003)(26005)(81166007)(426003)(966005)(6916009)(7696005)(336012)(508600001)(36860700001)(8676002)(2906002)(86362001)(44832011);DIR:OUT;SFP:1101; X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 16 Nov 2021 11:33:28.3439 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: db4011d6-2d03-44af-cc59-08d9a8f4e8fc X-MS-Exchange-CrossTenant-Id: f34e5979-57d9-4aaa-ad4d-b122a662184d X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=f34e5979-57d9-4aaa-ad4d-b122a662184d;Ip=[63.35.35.123];Helo=[64aa7808-outbound-1.mta.getcheckrecipient.com] X-MS-Exchange-CrossTenant-AuthSource: AM5EUR03FT018.eop-EUR03.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: AS8PR08MB6325 Content-Type: text/plain Bugzilla: 3668 (https://bugzilla.tianocore.org/show_bug.cgi?id=3668) Rename RdRandGenerateEntropy() to GenerateEntropy() to provide a common interface to generate entropy on other architectures. Also move the definition to RngDxeInternals.h Signed-off-by: Sami Mujawar --- Notes: v2: - No code change since v1. Re-sending with V2 series. [SAMI] SecurityPkg/RandomNumberGenerator/RngDxe/Rand/RdRand.c | 13 ++++-- SecurityPkg/RandomNumberGenerator/RngDxe/Rand/RdRand.h | 43 -------------------- SecurityPkg/RandomNumberGenerator/RngDxe/Rand/RngDxe.c | 6 ++- SecurityPkg/RandomNumberGenerator/RngDxe/RngDxe.inf | 1 - SecurityPkg/RandomNumberGenerator/RngDxe/RngDxeInternals.h | 19 +++++++++ 5 files changed, 33 insertions(+), 49 deletions(-) diff --git a/SecurityPkg/RandomNumberGenerator/RngDxe/Rand/RdRand.c b/SecurityPkg/RandomNumberGenerator/RngDxe/Rand/RdRand.c index 83025a47d43d442bfe1c324eda2916e6b5599a7e..0ee99a8661fc20094daef019a2f8015597073be4 100644 --- a/SecurityPkg/RandomNumberGenerator/RngDxe/Rand/RdRand.c +++ b/SecurityPkg/RandomNumberGenerator/RngDxe/Rand/RdRand.c @@ -1,15 +1,22 @@ /** @file - Support routines for RDRAND instruction access. + Support routines for RDRAND instruction access, which will leverage + Intel Secure Key technology to provide high-quality random numbers for use + in applications, or entropy for seeding other random number generators. + Refer to http://software.intel.com/en-us/articles/intel-digital-random-number + -generator-drng-software-implementation-guide/ for more information about Intel + Secure Key technology. Copyright (c) 2013 - 2018, Intel Corporation. All rights reserved.
(C) Copyright 2015 Hewlett Packard Enterprise Development LP
SPDX-License-Identifier: BSD-2-Clause-Patent **/ +#include +#include #include +#include #include "AesCore.h" -#include "RdRand.h" #include "RngDxeInternals.h" /** @@ -87,7 +94,7 @@ RdRandGetSeed128 ( **/ EFI_STATUS EFIAPI -RdRandGenerateEntropy ( +GenerateEntropy ( IN UINTN Length, OUT UINT8 *Entropy ) diff --git a/SecurityPkg/RandomNumberGenerator/RngDxe/Rand/RdRand.h b/SecurityPkg/RandomNumberGenerator/RngDxe/Rand/RdRand.h deleted file mode 100644 index 072378e062e7bee81a7e763fe9b4ed4517e4d82c..0000000000000000000000000000000000000000 --- a/SecurityPkg/RandomNumberGenerator/RngDxe/Rand/RdRand.h +++ /dev/null @@ -1,43 +0,0 @@ -/** @file - Header for the RDRAND APIs used by RNG DXE driver. - - Support API definitions for RDRAND instruction access, which will leverage - Intel Secure Key technology to provide high-quality random numbers for use - in applications, or entropy for seeding other random number generators. - Refer to http://software.intel.com/en-us/articles/intel-digital-random-number - -generator-drng-software-implementation-guide/ for more information about Intel - Secure Key technology. - -Copyright (c) 2013, Intel Corporation. All rights reserved.
-(C) Copyright 2015 Hewlett Packard Enterprise Development LP
-SPDX-License-Identifier: BSD-2-Clause-Patent - -**/ - -#ifndef __RD_RAND_H__ -#define __RD_RAND_H__ - -#include -#include -#include -#include -#include - -/** - Generate high-quality entropy source through RDRAND. - - @param[in] Length Size of the buffer, in bytes, to fill with. - @param[out] Entropy Pointer to the buffer to store the entropy data. - - @retval EFI_SUCCESS Entropy generation succeeded. - @retval EFI_NOT_READY Failed to request random data. - -**/ -EFI_STATUS -EFIAPI -RdRandGenerateEntropy ( - IN UINTN Length, - OUT UINT8 *Entropy - ); - -#endif // __RD_RAND_H__ diff --git a/SecurityPkg/RandomNumberGenerator/RngDxe/Rand/RngDxe.c b/SecurityPkg/RandomNumberGenerator/RngDxe/Rand/RngDxe.c index d0e6b7de06352b6a92a823681eab92b7a4ca720f..2009f95b4cadb07fc9073c3c0660cf549965422a 100644 --- a/SecurityPkg/RandomNumberGenerator/RngDxe/Rand/RngDxe.c +++ b/SecurityPkg/RandomNumberGenerator/RngDxe/Rand/RngDxe.c @@ -20,7 +20,9 @@ **/ -#include "RdRand.h" +#include +#include + #include "RngDxeInternals.h" /** @@ -88,7 +90,7 @@ RngGetRNG ( return EFI_INVALID_PARAMETER; } - Status = RdRandGenerateEntropy (RNGValueLength, RNGValue); + Status = GenerateEntropy (RNGValueLength, RNGValue); return Status; } diff --git a/SecurityPkg/RandomNumberGenerator/RngDxe/RngDxe.inf b/SecurityPkg/RandomNumberGenerator/RngDxe/RngDxe.inf index f3300971993f7c6fcdca441858de4c2fb35912e8..ef5cd73273e68c67bec7411279bb8433c45ab2d4 100644 --- a/SecurityPkg/RandomNumberGenerator/RngDxe/RngDxe.inf +++ b/SecurityPkg/RandomNumberGenerator/RngDxe/RngDxe.inf @@ -36,7 +36,6 @@ [Sources.common] [Sources.IA32, Sources.X64] Rand/RngDxe.c Rand/RdRand.c - Rand/RdRand.h Rand/AesCore.c Rand/AesCore.h diff --git a/SecurityPkg/RandomNumberGenerator/RngDxe/RngDxeInternals.h b/SecurityPkg/RandomNumberGenerator/RngDxe/RngDxeInternals.h index 2660ed5875e0d52a6b9d806341431859374b1047..34886adcf549efdedc1a7b8f16b81a5148531de2 100644 --- a/SecurityPkg/RandomNumberGenerator/RngDxe/RngDxeInternals.h +++ b/SecurityPkg/RandomNumberGenerator/RngDxe/RngDxeInternals.h @@ -10,6 +10,8 @@ #ifndef RNGDXE_INTERNALS_H_ #define RNGDXE_INTERNALS_H_ +#include + /** Returns information about the random number generation implementation. @@ -114,4 +116,21 @@ RngGetBytes ( OUT UINT8 *RandBuffer ); +/** + Generate high-quality entropy source using a TRNG or through RDRAND. + + @param[in] Length Size of the buffer, in bytes, to fill with. + @param[out] Entropy Pointer to the buffer to store the entropy data. + + @retval EFI_SUCCESS Entropy generation succeeded. + @retval EFI_NOT_READY Failed to request random data. + +**/ +EFI_STATUS +EFIAPI +GenerateEntropy ( + IN UINTN Length, + OUT UINT8 *Entropy + ); + #endif // RNGDXE_INTERNALS_H_ -- 'Guid(CE165669-3EF3-493F-B85D-6190EE5B9759)'