TianoCore EDK2 master
|
Go to the source code of this file.
Data Structures | |
struct | _EFI_RNG_PROTOCOL |
Macros | |
#define | EFI_RNG_PROTOCOL_GUID |
#define | EFI_RNG_ALGORITHM_SP800_90_HASH_256_GUID |
#define | EFI_RNG_ALGORITHM_SP800_90_HMAC_256_GUID |
#define | EFI_RNG_ALGORITHM_SP800_90_CTR_256_GUID |
#define | EFI_RNG_ALGORITHM_X9_31_3DES_GUID |
#define | EFI_RNG_ALGORITHM_X9_31_AES_GUID |
#define | EFI_RNG_ALGORITHM_RAW |
#define | EFI_RNG_ALGORITHM_ARM_RNDR |
Typedefs | |
typedef struct _EFI_RNG_PROTOCOL | EFI_RNG_PROTOCOL |
typedef EFI_GUID | EFI_RNG_ALGORITHM |
typedef EFI_STATUS(EFIAPI * | EFI_RNG_GET_INFO) (IN EFI_RNG_PROTOCOL *This, IN OUT UINTN *RNGAlgorithmListSize, OUT EFI_RNG_ALGORITHM *RNGAlgorithmList) |
typedef EFI_STATUS(EFIAPI * | EFI_RNG_GET_RNG) (IN EFI_RNG_PROTOCOL *This, IN EFI_RNG_ALGORITHM *RNGAlgorithm OPTIONAL, IN UINTN RNGValueLength, OUT UINT8 *RNGValue) |
Variables | |
EFI_GUID | gEfiRngProtocolGuid |
EFI_GUID | gEfiRngAlgorithmSp80090Hash256Guid |
EFI_GUID | gEfiRngAlgorithmSp80090Hmac256Guid |
EFI_GUID | gEfiRngAlgorithmSp80090Ctr256Guid |
EFI_GUID | gEfiRngAlgorithmX9313DesGuid |
EFI_GUID | gEfiRngAlgorithmX931AesGuid |
EFI_GUID | gEfiRngAlgorithmRaw |
EFI_GUID | gEfiRngAlgorithmArmRndr |
EFI_RNG_PROTOCOL as defined in UEFI 2.4. The UEFI Random Number Generator Protocol is used to provide random bits for use in applications, or entropy for seeding other random number generators.
Copyright (c) 2013 - 2018, Intel Corporation. All rights reserved.
SPDX-License-Identifier: BSD-2-Clause-Patent
Definition in file Rng.h.
#define EFI_RNG_ALGORITHM_ARM_RNDR |
The Arm Architecture states the RNDR that the DRBG algorithm should be compliant with NIST SP800-90A, while not mandating a particular algorithm, so as to be inclusive of different geographies.
#define EFI_RNG_ALGORITHM_RAW |
#define EFI_RNG_ALGORITHM_SP800_90_CTR_256_GUID |
#define EFI_RNG_ALGORITHM_SP800_90_HASH_256_GUID |
#define EFI_RNG_ALGORITHM_SP800_90_HMAC_256_GUID |
#define EFI_RNG_ALGORITHM_X9_31_3DES_GUID |
The algorithms correspond to X9.31 as defined in NIST, "Recommended Random Number Generator Based on ANSI X9.31 Appendix A.2.4 Using the 3-Key Triple DES and AES Algorithm", January 2005.
#define EFI_RNG_ALGORITHM_X9_31_AES_GUID |
#define EFI_RNG_PROTOCOL_GUID |
typedef EFI_GUID EFI_RNG_ALGORITHM |
typedef EFI_STATUS(EFIAPI * EFI_RNG_GET_INFO) (IN EFI_RNG_PROTOCOL *This, IN OUT UINTN *RNGAlgorithmListSize, OUT EFI_RNG_ALGORITHM *RNGAlgorithmList) |
Returns information about the random number generation implementation.
[in] | This | A pointer to the EFI_RNG_PROTOCOL instance. |
[in,out] | RNGAlgorithmListSize | On input, the size in bytes of RNGAlgorithmList. On output with a return code of EFI_SUCCESS, the size in bytes of the data returned in RNGAlgorithmList. On output with a return code of EFI_BUFFER_TOO_SMALL, the size of RNGAlgorithmList required to obtain the list. |
[out] | RNGAlgorithmList | A caller-allocated memory buffer filled by the driver with one EFI_RNG_ALGORITHM element for each supported RNG algorithm. The list must not change across multiple calls to the same driver. The first algorithm in the list is the default algorithm for the driver. |
EFI_SUCCESS | The RNG algorithm list was returned successfully. |
EFI_UNSUPPORTED | The services is not supported by this driver. |
EFI_DEVICE_ERROR | The list of algorithms could not be retrieved due to a hardware or firmware error. |
EFI_INVALID_PARAMETER | One or more of the parameters are incorrect. |
EFI_BUFFER_TOO_SMALL | The buffer RNGAlgorithmList is too small to hold the result. |
typedef EFI_STATUS(EFIAPI * EFI_RNG_GET_RNG) (IN EFI_RNG_PROTOCOL *This, IN EFI_RNG_ALGORITHM *RNGAlgorithm OPTIONAL, IN UINTN RNGValueLength, OUT UINT8 *RNGValue) |
Produces and returns an RNG value using either the default or specified RNG algorithm.
[in] | This | A pointer to the EFI_RNG_PROTOCOL instance. |
[in] | RNGAlgorithm | A pointer to the EFI_RNG_ALGORITHM that identifies the RNG algorithm to use. May be NULL in which case the function will use its default RNG algorithm. |
[in] | RNGValueLength | The length in bytes of the memory buffer pointed to by RNGValue. The driver shall return exactly this numbers of bytes. |
[out] | RNGValue | A caller-allocated memory buffer filled by the driver with the resulting RNG value. |
EFI_SUCCESS | The RNG value was returned successfully. |
EFI_UNSUPPORTED | The algorithm specified by RNGAlgorithm is not supported by this driver. |
EFI_DEVICE_ERROR | An RNG value could not be retrieved due to a hardware or firmware error. |
EFI_NOT_READY | There is not enough random data available to satisfy the length requested by RNGValueLength. |
EFI_INVALID_PARAMETER | RNGValue is NULL or RNGValueLength is zero. |
typedef struct _EFI_RNG_PROTOCOL EFI_RNG_PROTOCOL |