VeraCrypt
aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMounir IDRASSI <mounir.idrassi@idrix.fr>2019-02-27 00:14:51 +0100
committerMounir IDRASSI <mounir.idrassi@idrix.fr>2019-03-01 00:35:27 +0100
commit0391b8e550dc08d43caa9a04c06c26dd36fd544f (patch)
tree86d4f297820536273856f291e30872cc03ccf35f /src
parent8d7a3187959ed0cf7cf55e7656f8ee595db9a088 (diff)
downloadVeraCrypt-0391b8e550dc08d43caa9a04c06c26dd36fd544f.tar.gz
VeraCrypt-0391b8e550dc08d43caa9a04c06c26dd36fd544f.zip
Windows: Add some logs in functions for RAM encryption
Diffstat (limited to 'src')
-rw-r--r--src/Common/Crypto.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/Common/Crypto.c b/src/Common/Crypto.c
index 94fca8e8..d4184a53 100644
--- a/src/Common/Crypto.c
+++ b/src/Common/Crypto.c
@@ -1314,6 +1314,8 @@ BOOL InitializeSecurityParameters(GetRandSeedFn rngCallback)
byte i, tagLength;
#endif
+ Dump ("InitializeSecurityParameters BEGIN\n");
+
rngCallback (pbSeed, sizeof (pbSeed));
ChaCha20RngInit (&ctx, pbSeed, rngCallback, 0);
@@ -1345,6 +1347,7 @@ BOOL InitializeSecurityParameters(GetRandSeedFn rngCallback)
if (!pbKeyDerivationArea)
{
cbKeyDerivationArea = 0;
+ Dump ("InitializeSecurityParameters return=FALSE END\n");
return FALSE;
}
@@ -1361,11 +1364,13 @@ BOOL InitializeSecurityParameters(GetRandSeedFn rngCallback)
burn (&ctx, sizeof (ctx));
burn (&tagLength, 1);
+ Dump ("InitializeSecurityParameters return=TRUE END\n");
return TRUE;
}
void ClearSecurityParameters()
{
+ Dump ("ClearSecurityParameters BEGIN\n");
if (pbKeyDerivationArea)
{
FAST_ERASE64 (pbKeyDerivationArea, cbKeyDerivationArea);
@@ -1379,6 +1384,7 @@ void ClearSecurityParameters()
#ifdef TC_WINDOWS_DRIVER
burn (&AllocTag, sizeof (AllocTag));
#endif
+ Dump ("ClearSecurityParameters END\n");
}
#ifdef TC_WINDOWS_DRIVER
@@ -1433,6 +1439,7 @@ uint64 VcGetEncryptionID (PCRYPTO_INFO pCryptoInfo)
void VcProtectKeys (PCRYPTO_INFO pCryptoInfo, uint64 encID)
{
+ Dump ("VcProtectKeys BEGIN\n");
#ifdef TC_WINDOWS_DRIVER
VcProtectMemory (encID, pCryptoInfo->ks, MAX_EXPANDED_KEY, pCryptoInfo->ks2, MAX_EXPANDED_KEY);
#else
@@ -1441,6 +1448,7 @@ void VcProtectKeys (PCRYPTO_INFO pCryptoInfo, uint64 encID)
pCryptoInfo->master_keydata, MASTER_KEYDATA_SIZE,
pCryptoInfo->k2, MASTER_KEYDATA_SIZE);
#endif
+ Dump ("VcProtectKeys END\n");
}
void VcUnprotectKeys (PCRYPTO_INFO pCryptoInfo, uint64 encID)