iPXE
Data Structures | Defines | Typedefs | Functions | Variables
Rng.h File Reference

EFI_RNG_PROTOCOL as defined in UEFI 2.4. More...

Go to the source code of this file.

Data Structures

struct  _EFI_RNG_PROTOCOL
 The Random Number Generator (RNG) protocol provides random bits for use in applications, or entropy for seeding other random number generators. More...

Defines

#define EFI_RNG_PROTOCOL_GUID
 Global ID for the Random Number Generator Protocol.
#define EFI_RNG_ALGORITHM_SP800_90_HASH_256_GUID
 The algorithms corresponds to SP800-90 as defined in NIST SP 800-90, "Recommendation for Random Number Generation Using Deterministic Random Bit Generators", March 2007.
#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
 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_ALGORITHM_RAW
 The "raw" algorithm, when supported, is intended to provide entropy directly from the source, without it going through some deterministic random bit generator.

Typedefs

typedef struct _EFI_RNG_PROTOCOL EFI_RNG_PROTOCOL
typedef EFI_GUID EFI_RNG_ALGORITHM
 A selection of EFI_RNG_PROTOCOL algorithms.
typedef IN OUT UINTNRNGAlgorithmListSize
typedef IN OUT UINTN OUT
EFI_RNG_ALGORITHM
RNGAlgorithmList
typedef IN EFI_RNG_ALGORITHMRNGAlgorithm
typedef IN EFI_RNG_ALGORITHM
OPTIONAL IN UINTN 
RNGValueLength
typedef IN EFI_RNG_ALGORITHM
OPTIONAL IN UINTN OUT UINT8
RNGValue

Functions

 FILE_LICENCE (BSD3)
typedef EFI_STATUS (EFIAPI *EFI_RNG_GET_INFO)(IN EFI_RNG_PROTOCOL *This
 Returns information about the random number generation implementation.

Variables

EFI_GUID gEfiRngProtocolGuid
EFI_GUID gEfiRngAlgorithmSp80090Hash256Guid
EFI_GUID gEfiRngAlgorithmSp80090Hmac256Guid
EFI_GUID gEfiRngAlgorithmSp80090Ctr256Guid
EFI_GUID gEfiRngAlgorithmX9313DesGuid
EFI_GUID gEfiRngAlgorithmX931AesGuid
EFI_GUID gEfiRngAlgorithmRaw

Detailed Description

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, Intel Corporation. All rights reserved.
This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License that accompanies this distribution. The full text of the license may be found at http://opensource.org/licenses/bsd-license.php.

THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.

Definition in file Rng.h.


Define Documentation

Value:
{ \
    0x3152bca5, 0xeade, 0x433d, {0x86, 0x2e, 0xc0, 0x1c, 0xdc, 0x29, 0x1f, 0x44 } \
  }

Global ID for the Random Number Generator Protocol.

Definition at line 25 of file Rng.h.

Value:
{ \
    0xa7af67cb, 0x603b, 0x4d42, {0xba, 0x21, 0x70, 0xbf, 0xb6, 0x29, 0x3f, 0x96 } \
  }

The algorithms corresponds to SP800-90 as defined in NIST SP 800-90, "Recommendation for Random Number Generation Using Deterministic Random Bit Generators", March 2007.

Definition at line 45 of file Rng.h.

Value:
{ \
    0xc5149b43, 0xae85, 0x4f53, {0x99, 0x82, 0xb9, 0x43, 0x35, 0xd3, 0xa9, 0xe7 } \
  }

Definition at line 49 of file Rng.h.

Value:
{ \
    0x44f0de6e, 0x4d8c, 0x4045, {0xa8, 0xc7, 0x4d, 0xd1, 0x68, 0x85, 0x6b, 0x9e } \
  }

Definition at line 53 of file Rng.h.

Value:
{ \
    0x63c4785a, 0xca34, 0x4012, {0xa3, 0xc8, 0x0b, 0x6a, 0x32, 0x4f, 0x55, 0x46 } \
  }

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.

Definition at line 62 of file Rng.h.

Value:
{ \
    0xacd03321, 0x777e, 0x4d3d, {0xb1, 0xc8, 0x20, 0xcf, 0xd8, 0x88, 0x20, 0xc9 } \
  }

Definition at line 66 of file Rng.h.

Value:
{ \
    0xe43176d7, 0xb6e8, 0x4827, {0xb7, 0x84, 0x7f, 0xfd, 0xc4, 0xb6, 0x85, 0x61 } \
  }

The "raw" algorithm, when supported, is intended to provide entropy directly from the source, without it going through some deterministic random bit generator.

Definition at line 74 of file Rng.h.


Typedef Documentation

Definition at line 30 of file Rng.h.

A selection of EFI_RNG_PROTOCOL algorithms.

The algorithms listed are optional, not meant to be exhaustive and be argmented by vendors or other industry standards.

Definition at line 38 of file Rng.h.

Definition at line 106 of file Rng.h.

Definition at line 106 of file Rng.h.

Definition at line 136 of file Rng.h.

Definition at line 136 of file Rng.h.

Definition at line 136 of file Rng.h.


Function Documentation

FILE_LICENCE ( BSD3  )
typedef EFI_STATUS ( EFIAPI EFI_RNG_GET_RNG)

Returns information about the random number generation implementation.

Produces and returns an RNG value using either the default or specified RNG algorithm.

Parameters:
[in]ThisA pointer to the EFI_RNG_PROTOCOL instance.
[in,out]RNGAlgorithmListSizeOn 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]RNGAlgorithmListA 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.
Return values:
EFI_SUCCESSThe RNG algorithm list was returned successfully.
EFI_UNSUPPORTEDThe services is not supported by this driver.
EFI_DEVICE_ERRORThe list of algorithms could not be retrieved due to a hardware or firmware error.
EFI_INVALID_PARAMETEROne or more of the parameters are incorrect.
EFI_BUFFER_TOO_SMALLThe buffer RNGAlgorithmList is too small to hold the result.
Parameters:
[in]ThisA pointer to the EFI_RNG_PROTOCOL instance.
[in]RNGAlgorithmA 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]RNGValueLengthThe length in bytes of the memory buffer pointed to by RNGValue. The driver shall return exactly this numbers of bytes.
[out]RNGValueA caller-allocated memory buffer filled by the driver with the resulting RNG value.
Return values:
EFI_SUCCESSThe RNG value was returned successfully.
EFI_UNSUPPORTEDThe algorithm specified by RNGAlgorithm is not supported by this driver.
EFI_DEVICE_ERRORAn RNG value could not be retrieved due to a hardware or firmware error.
EFI_NOT_READYThere is not enough random data available to satisfy the length requested by RNGValueLength.
EFI_INVALID_PARAMETERRNGValue is NULL or RNGValueLength is zero.

Variable Documentation