TianoCore EDK2 master
Loading...
Searching...
No Matches
ArmTrng.c File Reference

Go to the source code of this file.

Functions

EFI_STATUS EFIAPI GenerateEntropy (IN UINTN Length, OUT UINT8 *Entropy)
 

Detailed Description

RNG Driver to produce the UEFI Random Number Generator protocol.

The driver implements the EFI_RNG_ALGORITHM_RAW using the FW-TRNG interface to provide entropy.

Copyright (c) 2021 - 2022, Arm Limited. All rights reserved.

SPDX-License-Identifier: BSD-2-Clause-Patent

Definition in file ArmTrng.c.

Function Documentation

◆ GenerateEntropy()

EFI_STATUS EFIAPI GenerateEntropy ( IN UINTN  Length,
OUT UINT8 *  Entropy 
)

Generate high-quality entropy source using a TRNG or through RDRAND.

Parameters
[in]LengthSize of the buffer, in bytes, to fill with.
[out]EntropyPointer to the buffer to store the entropy data.
Return values
RETURN_SUCCESSThe function completed successfully.
RETURN_INVALID_PARAMETERInvalid parameter.
RETURN_UNSUPPORTEDFunction not implemented.
RETURN_BAD_BUFFER_SIZEBuffer size is too small.
RETURN_NOT_READYNo Entropy available.

Definition at line 35 of file ArmTrng.c.