DxeRngLib iterates over a list of secure algorithms before trying
to use the default algorithm provided by the Rng protocol. Add
gEfiRngAlgorithmArmRndr to this list. The algorithm represented by
this GUID is a secure DRBG of an unknown type, implemented by the
aarch64 RNDR instruction.
On AARCH64 platform, use the RNDR instruction as the first option
if it is available.
Signed-off-by: Pierre Gondois <pierre.gondois@arm.com>
// the RNG protocol and are generally considered secure.\r
//\r
GLOBAL_REMOVE_IF_UNREFERENCED SECURE_RNG_ALGO_ARRAY mSecureHashAlgorithms[] = {\r
+ #ifdef MDE_CPU_AARCH64\r
+ {\r
+ &gEfiRngAlgorithmArmRndr, // unspecified SP800-90A DRBG (through RNDR instr.)\r
+ "ARM-RNDR",\r
+ FALSE,\r
+ },\r
+ #endif\r
{\r
&gEfiRngAlgorithmSp80090Ctr256Guid, // SP800-90A DRBG CTR using AES-256\r
"DRBG-CTR",\r
gEfiRngAlgorithmSp80090Hmac256Guid\r
gEfiRngAlgorithmRaw\r
\r
+[Guids.AARCH64]\r
+ gEfiRngAlgorithmArmRndr\r
+\r
[FixedPcd]\r
gEfiMdePkgTokenSpaceGuid.PcdEnforceSecureRngAlgorithms ## CONSUMES\r