diff options
Diffstat (limited to 'src/Common/Random.c')
-rw-r--r-- | src/Common/Random.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/Common/Random.c b/src/Common/Random.c index 00a00729..10995f74 100644 --- a/src/Common/Random.c +++ b/src/Common/Random.c @@ -5,9 +5,9 @@ governed by the TrueCrypt License 3.0, also from the source code of Encryption for the Masses 2.02a, which is Copyright (c) 1998-2000 Paul Le Roux and which is governed by the 'License Agreement for Encryption for the Masses' Modifications and additions to the original source code (contained in this file) - and all other portions of this file are Copyright (c) 2013-2017 IDRIX + and all other portions of this file are Copyright (c) 2013-2025 IDRIX and are governed by the Apache License 2.0 the full text of which is contained in the file License.txt included in VeraCrypt binary and source code distribution packages. */ @@ -877,16 +877,18 @@ BOOL SlowPoll (void) jent_entropy_collector_free (ec); } } +#ifndef _M_ARM64 // use RDSEED or RDRAND from CPU as source of entropy if present if ( IsCpuRngEnabled() && ( (HasRDSEED() && RDSEED_getBytes (buffer, sizeof (buffer))) || (HasRDRAND() && RDRAND_getBytes (buffer, sizeof (buffer))) )) { RandaddBuf (buffer, sizeof (buffer)); } +#endif burn(buffer, sizeof (buffer)); /* Mix the pool */ @@ -1010,16 +1012,18 @@ BOOL FastPoll (void) CryptoAPILastError = pRtlNtStatusToDosError (bStatus); return FALSE; } +#ifndef _M_ARM64 // use RDSEED or RDRAND from CPU as source of entropy if enabled if ( IsCpuRngEnabled() && ( (HasRDSEED() && RDSEED_getBytes (buffer, sizeof (buffer))) || (HasRDRAND() && RDRAND_getBytes (buffer, sizeof (buffer))) )) { RandaddBuf (buffer, sizeof (buffer)); } +#endif burn (buffer, sizeof(buffer)); /* Apply the pool mixing function */ |