1
0
mirror of https://github.com/veracrypt/VeraCrypt.git synced 2025-11-11 02:58:02 -06:00

Windows: Add option to enable use of CPU RDRAND/RDSEED as source of entropy which is now disabled by default

This commit is contained in:
Mounir IDRASSI
2019-02-07 15:24:56 +01:00
parent 6bb1f24ed5
commit e5b9cee868
48 changed files with 108 additions and 15 deletions

View File

@@ -1216,3 +1216,29 @@ BOOL IsHwEncryptionEnabled ()
}
#endif // !TC_WINDOWS_BOOT
#ifndef TC_WINDOWS_BOOT
static BOOL CpuRngDisabled = FALSE;
BOOL IsCpuRngSupport ()
{
if (HasRDSEED() || HasRDSEED())
return TRUE;
else
return FALSE;
}
void EnableCpuRng (BOOL enable)
{
CpuRngDisabled = !enable;
}
BOOL IsCpuRngEnabled ()
{
return !CpuRngDisabled;
}
#endif