On 16 September 2016 at 22:33, Palmer, Thomas <thomas.pal...@hpe.com> wrote:
> EDK2 community
> Why is the RngGetRNG  sending requests for "gEfiRngAlgorithmRaw"  to 
> "RdRandGenerateEntropy",  which does AES operations on RDRAND output, whereas 
> the requests for "gEfiRngAlgorithmSp80090Ctr256Guid" get sent to 
> RdRandGetBytes which simply reads the rdrand source without modification.
> Shouldn't the processing be switched, so that "Raw" goes to RdRandGetBytes 
> and "gEfiRngAlgorithmSp80090Ctr256Guid" goes to RdRandGenerateEntropy?  I did 
> not see anything in the UEFI 2.5 spec indicating why this was the case.

The RDRAND instruction does not give you raw entropy, but the output
of a DRBG. So the 'raw' entropy is being emulated by taking multiple
rounds of RDRAND output and shuffling it around to make it 'raw'

>From the top of RngDxe.c:

  RNG Algoritnms 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)
edk2-devel mailing list

Reply via email to