]>
git.proxmox.com Git - mirror_edk2.git/blob - SecurityPkg/RandomNumberGenerator/RngDxe/RdRand.h
2 Header for the RDRAND APIs used by RNG DXE driver.
4 Support API definitions for RDRAND instruction access, which will leverage
5 Intel Secure Key technology to provide high-quality random numbers for use
6 in applications, or entropy for seeding other random number generators.
7 Refer to http://software.intel.com/en-us/articles/intel-digital-random-number
8 -generator-drng-software-implementation-guide/ for more information about Intel
11 Copyright (c) 2013, Intel Corporation. All rights reserved.<BR>
12 (C) Copyright 2015 Hewlett Packard Enterprise Development LP<BR>
13 SPDX-License-Identifier: BSD-2-Clause-Patent
20 #include <Library/BaseLib.h>
21 #include <Library/BaseMemoryLib.h>
22 #include <Library/UefiBootServicesTableLib.h>
23 #include <Library/TimerLib.h>
24 #include <Protocol/Rng.h>
27 Calls RDRAND to fill a buffer of arbitrary size with random bytes.
29 @param[in] Length Size of the buffer, in bytes, to fill with.
30 @param[out] RandBuffer Pointer to the buffer to store the random result.
32 @retval EFI_SUCCESS Random bytes generation succeeded.
33 @retval EFI_NOT_READY Failed to request random bytes.
44 Generate high-quality entropy source through RDRAND.
46 @param[in] Length Size of the buffer, in bytes, to fill with.
47 @param[out] Entropy Pointer to the buffer to store the entropy data.
49 @retval EFI_SUCCESS Entropy generation succeeded.
50 @retval EFI_NOT_READY Failed to request random data.
55 RdRandGenerateEntropy (
60 #endif // __RD_RAND_H__