mirror of
https://github.com/tianocore/edk2
synced 2026-08-27 00:23:19 -04:00
SecurityPkg/RngDxe: Replace Intel-specific with arch-neutral comments
The RngDxe driver and its non-AArch64 support files still contained comments and descriptions referring to Intel Secure Key technology, RDRAND/RDSEED instructions, and the Intel DRNG implementation guide. These references are no longer accurate because the driver obtains random data through the platform-provided RngLib abstraction rather than relying on Intel-specific CPU features. Update the comments and descriptions to use architecture-neutral language that better reflects the current implementation. Signed-off-by: Tuan Phan <tuan.phan@oss.qualcomm.com>
This commit is contained in:
parent
3fec625408
commit
fb42b39a7d
9 changed files with 40 additions and 47 deletions
|
|
@ -3,8 +3,9 @@
|
|||
Refer to FIPS PUB 197 ("Advanced Encryption Standard (AES)") for detailed algorithm
|
||||
description of AES.
|
||||
|
||||
Copyright (c) 2013 - 2018, Intel Corporation. All rights reserved.<BR>
|
||||
SPDX-License-Identifier: BSD-2-Clause-Patent
|
||||
Copyright (c) 2013 - 2018, Intel Corporation. All rights reserved.<BR>
|
||||
|
||||
SPDX-License-Identifier: BSD-2-Clause-Patent
|
||||
|
||||
**/
|
||||
|
||||
|
|
|
|||
|
|
@ -1,8 +1,9 @@
|
|||
/** @file
|
||||
Function prototype for AES Block Cipher support.
|
||||
|
||||
Copyright (c) 2013, Intel Corporation. All rights reserved.<BR>
|
||||
SPDX-License-Identifier: BSD-2-Clause-Patent
|
||||
Copyright (c) 2013, Intel Corporation. All rights reserved.<BR>
|
||||
|
||||
SPDX-License-Identifier: BSD-2-Clause-Patent
|
||||
|
||||
**/
|
||||
|
||||
|
|
|
|||
|
|
@ -1,15 +1,13 @@
|
|||
/** @file
|
||||
Support routines for RDRAND instruction access, which will leverage
|
||||
Intel Secure Key technology to provide high-quality random numbers for use
|
||||
Support routines for random number generation, which will leverage
|
||||
the platform RngLib 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
|
||||
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>
|
||||
|
|
@ -22,10 +20,8 @@ SPDX-License-Identifier: BSD-2-Clause-Patent
|
|||
|
||||
/**
|
||||
Creates a 128bit random value that is fully forward and backward prediction resistant,
|
||||
suitable for seeding a NIST SP800-90 Compliant, FIPS 1402-2 certifiable SW DRBG.
|
||||
This function takes multiple random numbers through RDRAND without intervening
|
||||
delays to ensure reseeding and performs AES-CBC-MAC over the data to compute the
|
||||
seed value.
|
||||
suitable for seeding a NIST SP800-90 Compliant, FIPS 1402-2 certifiable SW DRBG using
|
||||
the platform RngLib.
|
||||
|
||||
@param[out] SeedBuffer Pointer to a 128bit buffer to store the random seed.
|
||||
|
||||
|
|
@ -84,7 +80,7 @@ RdRandGetSeed128 (
|
|||
}
|
||||
|
||||
/**
|
||||
Generate high-quality entropy source through RDRAND.
|
||||
Generate high-quality entropy source.
|
||||
|
||||
@param[in] Length Size of the buffer, in bytes, to fill with.
|
||||
@param[out] Entropy Pointer to the buffer to store the entropy data.
|
||||
|
|
|
|||
|
|
@ -1,14 +1,12 @@
|
|||
/** @file
|
||||
RNG Driver to produce the UEFI Random Number Generator protocol.
|
||||
|
||||
The driver will use the new RDRAND instruction to produce high-quality, high-performance
|
||||
entropy and random number.
|
||||
The driver uses the platform RngLib to produce high-quality, high-performance
|
||||
entropy and random numbers.
|
||||
|
||||
RNG Algorithms defined in UEFI 2.4:
|
||||
- EFI_RNG_ALGORITHM_SP800_90_CTR_256_GUID - Supported
|
||||
(RDRAND implements a hardware NIST SP800-90 AES-CTR-256 based DRBG)
|
||||
- EFI_RNG_ALGORITHM_RAW - Supported
|
||||
(Structuring RDRAND invocation can be guaranteed as high-quality entropy source)
|
||||
- EFI_RNG_ALGORITHM_SP800_90_HMAC_256_GUID - Unsupported
|
||||
- EFI_RNG_ALGORITHM_SP800_90_HASH_256_GUID - Unsupported
|
||||
- EFI_RNG_ALGORITHM_X9_31_3DES_GUID - Unsupported
|
||||
|
|
@ -17,6 +15,7 @@
|
|||
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
|
||||
|
||||
**/
|
||||
|
|
@ -181,8 +180,6 @@ RngGetInfo (
|
|||
}
|
||||
|
||||
CopyMem (&RNGAlgorithmList[0], &gEfiRngAlgorithmSp80090Ctr256Guid, sizeof (EFI_RNG_ALGORITHM));
|
||||
|
||||
// x86 platforms also support EFI_RNG_ALGORITHM_RAW via RDSEED
|
||||
CopyMem (&RNGAlgorithmList[1], &gEfiRngAlgorithmRaw, sizeof (EFI_RNG_ALGORITHM));
|
||||
|
||||
*RNGAlgorithmListSize = RequiredSize;
|
||||
|
|
|
|||
|
|
@ -1,8 +1,9 @@
|
|||
/** @file
|
||||
RNG Driver to produce the UEFI Random Number Generator protocol.
|
||||
|
||||
The driver uses CPU RNG instructions to produce high-quality,
|
||||
high-performance entropy and random number.
|
||||
The driver uses the platform RngLib and/or architecture specific
|
||||
instructions or firmware interface implementation to produce
|
||||
high-quality, high-performance entropy and random numbers.
|
||||
|
||||
RNG Algorithms defined in UEFI 2.4:
|
||||
- EFI_RNG_ALGORITHM_SP800_90_CTR_256_GUID
|
||||
|
|
@ -12,10 +13,10 @@
|
|||
- EFI_RNG_ALGORITHM_X9_31_3DES_GUID
|
||||
- EFI_RNG_ALGORITHM_X9_31_AES_GUID
|
||||
|
||||
Copyright (c) 2013 - 2018, Intel Corporation. All rights reserved.<BR>
|
||||
(C) Copyright 2015 Hewlett Packard Enterprise Development LP<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
|
||||
SPDX-License-Identifier: BSD-2-Clause-Patent
|
||||
|
||||
**/
|
||||
|
||||
|
|
@ -118,7 +119,7 @@ RngDriverUnLoad (
|
|||
}
|
||||
|
||||
/**
|
||||
Runs CPU RNG instruction to fill a buffer of arbitrary size with random bytes.
|
||||
Fills a buffer of arbitrary size with random bytes.
|
||||
|
||||
@param[in] Length Size of the buffer, in bytes, to fill with.
|
||||
@param[out] RandBuffer Pointer to the buffer to store the random result.
|
||||
|
|
|
|||
|
|
@ -1,16 +1,16 @@
|
|||
## @file
|
||||
## @file
|
||||
# Produces the UEFI Random Number Generator protocol
|
||||
#
|
||||
# This module will leverage Intel Secure Key technology to produce the Random
|
||||
# Number Generator protocol, which is used 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.
|
||||
# This module produces the Random Number Generator protocol, which is used to
|
||||
# provide high-quality random numbers for use in applications, or entropy for
|
||||
# seeding other random number generators. It relies on the platform RngLib and/or
|
||||
# architecture specific instructions or firmware interface implementation to
|
||||
# access the hardware random number source.
|
||||
#
|
||||
# Copyright (c) 2013 - 2018, Intel Corporation. All rights reserved.<BR>
|
||||
# (C) Copyright 2015 Hewlett Packard Enterprise Development LP<BR>
|
||||
# Copyright (c) 2021 - 2022, Arm Limited. All rights reserved.<BR>
|
||||
#
|
||||
# SPDX-License-Identifier: BSD-2-Clause-Patent
|
||||
#
|
||||
##
|
||||
|
|
|
|||
|
|
@ -1,12 +1,11 @@
|
|||
// /** @file
|
||||
// Produces the UEFI Random Number Generator protocol
|
||||
//
|
||||
// This module will leverage Intel Secure Key technology to produce the Random
|
||||
// Number Generator protocol, which is used 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.
|
||||
// This module produces the Random Number Generator protocol, which is used to
|
||||
// provide high-quality random numbers for use in applications, or entropy for
|
||||
// seeding other random number generators. It relies on the platform RngLib and/or
|
||||
// architecture specific instructions or firmware interface implementation to
|
||||
// access the hardware random number source.
|
||||
//
|
||||
// Copyright (c) 2013 - 2018, Intel Corporation. All rights reserved.<BR>
|
||||
//
|
||||
|
|
|
|||
|
|
@ -10,5 +10,3 @@
|
|||
#string STR_PROPERTIES_MODULE_NAME
|
||||
#language en-US
|
||||
"UEFI Random Number Generator DXE"
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -101,7 +101,7 @@ RngGetRNG (
|
|||
);
|
||||
|
||||
/**
|
||||
Runs CPU RNG instruction to fill a buffer of arbitrary size with random bytes.
|
||||
Fills a buffer of arbitrary size with random bytes.
|
||||
|
||||
@param[in] Length Size of the buffer, in bytes, to fill with.
|
||||
@param[out] RandBuffer Pointer to the buffer to store the random result.
|
||||
|
|
@ -118,7 +118,7 @@ RngGetBytes (
|
|||
);
|
||||
|
||||
/**
|
||||
Generate high-quality entropy source using a TRNG or through RDRAND.
|
||||
Generate high-quality entropy source.
|
||||
|
||||
@param[in] Length Size of the buffer, in bytes, to fill with.
|
||||
@param[out] Entropy Pointer to the buffer to store the entropy data.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue