mirror of
https://github.com/veracrypt/VeraCrypt.git
synced 2025-11-11 11:08:02 -06:00
Windows: Add some logs in functions for RAM encryption
This commit is contained in:
@@ -1314,6 +1314,8 @@ BOOL InitializeSecurityParameters(GetRandSeedFn rngCallback)
|
|||||||
byte i, tagLength;
|
byte i, tagLength;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
Dump ("InitializeSecurityParameters BEGIN\n");
|
||||||
|
|
||||||
rngCallback (pbSeed, sizeof (pbSeed));
|
rngCallback (pbSeed, sizeof (pbSeed));
|
||||||
|
|
||||||
ChaCha20RngInit (&ctx, pbSeed, rngCallback, 0);
|
ChaCha20RngInit (&ctx, pbSeed, rngCallback, 0);
|
||||||
@@ -1345,6 +1347,7 @@ BOOL InitializeSecurityParameters(GetRandSeedFn rngCallback)
|
|||||||
if (!pbKeyDerivationArea)
|
if (!pbKeyDerivationArea)
|
||||||
{
|
{
|
||||||
cbKeyDerivationArea = 0;
|
cbKeyDerivationArea = 0;
|
||||||
|
Dump ("InitializeSecurityParameters return=FALSE END\n");
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1361,11 +1364,13 @@ BOOL InitializeSecurityParameters(GetRandSeedFn rngCallback)
|
|||||||
burn (&ctx, sizeof (ctx));
|
burn (&ctx, sizeof (ctx));
|
||||||
burn (&tagLength, 1);
|
burn (&tagLength, 1);
|
||||||
|
|
||||||
|
Dump ("InitializeSecurityParameters return=TRUE END\n");
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
void ClearSecurityParameters()
|
void ClearSecurityParameters()
|
||||||
{
|
{
|
||||||
|
Dump ("ClearSecurityParameters BEGIN\n");
|
||||||
if (pbKeyDerivationArea)
|
if (pbKeyDerivationArea)
|
||||||
{
|
{
|
||||||
FAST_ERASE64 (pbKeyDerivationArea, cbKeyDerivationArea);
|
FAST_ERASE64 (pbKeyDerivationArea, cbKeyDerivationArea);
|
||||||
@@ -1379,6 +1384,7 @@ void ClearSecurityParameters()
|
|||||||
#ifdef TC_WINDOWS_DRIVER
|
#ifdef TC_WINDOWS_DRIVER
|
||||||
burn (&AllocTag, sizeof (AllocTag));
|
burn (&AllocTag, sizeof (AllocTag));
|
||||||
#endif
|
#endif
|
||||||
|
Dump ("ClearSecurityParameters END\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef TC_WINDOWS_DRIVER
|
#ifdef TC_WINDOWS_DRIVER
|
||||||
@@ -1433,6 +1439,7 @@ uint64 VcGetEncryptionID (PCRYPTO_INFO pCryptoInfo)
|
|||||||
|
|
||||||
void VcProtectKeys (PCRYPTO_INFO pCryptoInfo, uint64 encID)
|
void VcProtectKeys (PCRYPTO_INFO pCryptoInfo, uint64 encID)
|
||||||
{
|
{
|
||||||
|
Dump ("VcProtectKeys BEGIN\n");
|
||||||
#ifdef TC_WINDOWS_DRIVER
|
#ifdef TC_WINDOWS_DRIVER
|
||||||
VcProtectMemory (encID, pCryptoInfo->ks, MAX_EXPANDED_KEY, pCryptoInfo->ks2, MAX_EXPANDED_KEY);
|
VcProtectMemory (encID, pCryptoInfo->ks, MAX_EXPANDED_KEY, pCryptoInfo->ks2, MAX_EXPANDED_KEY);
|
||||||
#else
|
#else
|
||||||
@@ -1441,6 +1448,7 @@ void VcProtectKeys (PCRYPTO_INFO pCryptoInfo, uint64 encID)
|
|||||||
pCryptoInfo->master_keydata, MASTER_KEYDATA_SIZE,
|
pCryptoInfo->master_keydata, MASTER_KEYDATA_SIZE,
|
||||||
pCryptoInfo->k2, MASTER_KEYDATA_SIZE);
|
pCryptoInfo->k2, MASTER_KEYDATA_SIZE);
|
||||||
#endif
|
#endif
|
||||||
|
Dump ("VcProtectKeys END\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
void VcUnprotectKeys (PCRYPTO_INFO pCryptoInfo, uint64 encID)
|
void VcUnprotectKeys (PCRYPTO_INFO pCryptoInfo, uint64 encID)
|
||||||
|
|||||||
Reference in New Issue
Block a user