SecurityPkg/RngDxe: Rename RdRandGenerateEntropy to generic name

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.
GenerateEntropy() is intended to generate high quality entropy.

Also move the definition to RngDxeInternals.h

Signed-off-by: Pierre Gondois <pierre.gondois@arm.com>
Acked-by: Jiewen Yao <jiewen.yao@intel.com>
This commit is contained in:
Sami Mujawar
2022-10-28 17:32:50 +02:00
committed by mergify[bot]
parent e00ec499c5
commit 8a89747844
5 changed files with 36 additions and 49 deletions

View File

@@ -1,15 +1,23 @@
/** @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) 2021 - 2022, Arm Limited. All rights reserved.<BR>
Copyright (c) 2013 - 2018, Intel Corporation. All rights reserved.<BR>
(C) Copyright 2015 Hewlett Packard Enterprise Development LP<BR>
SPDX-License-Identifier: BSD-2-Clause-Patent
**/
#include <Library/BaseLib.h>
#include <Library/BaseMemoryLib.h>
#include <Library/RngLib.h>
#include <Library/TimerLib.h>
#include "AesCore.h"
#include "RdRand.h"
#include "RngDxeInternals.h"
/**
@@ -87,7 +95,7 @@ RdRandGetSeed128 (
**/
EFI_STATUS
EFIAPI
RdRandGenerateEntropy (
GenerateEntropy (
IN UINTN Length,
OUT UINT8 *Entropy
)