mirror of
https://github.com/veracrypt/VeraCrypt.git
synced 2025-11-11 11:08:02 -06:00
Windows: remove unused fields from CRYPTO_INFO structure
This commit is contained in:
@@ -245,18 +245,13 @@ typedef struct CRYPTO_INFO_t
|
|||||||
#ifndef TC_WINDOWS_BOOT
|
#ifndef TC_WINDOWS_BOOT
|
||||||
uint16 HeaderVersion;
|
uint16 HeaderVersion;
|
||||||
|
|
||||||
GfCtx gf_ctx;
|
|
||||||
|
|
||||||
CRYPTOPP_ALIGN_DATA(16) unsigned __int8 master_keydata[MASTER_KEYDATA_SIZE]; /* This holds the volume header area containing concatenated master key(s) and secondary key(s) (XTS mode). For LRW (deprecated/legacy), it contains the tweak key before the master key(s). For CBC (deprecated/legacy), it contains the IV seed before the master key(s). */
|
CRYPTOPP_ALIGN_DATA(16) unsigned __int8 master_keydata[MASTER_KEYDATA_SIZE]; /* This holds the volume header area containing concatenated master key(s) and secondary key(s) (XTS mode). For LRW (deprecated/legacy), it contains the tweak key before the master key(s). For CBC (deprecated/legacy), it contains the IV seed before the master key(s). */
|
||||||
CRYPTOPP_ALIGN_DATA(16) unsigned __int8 k2[MASTER_KEYDATA_SIZE]; /* For XTS, this contains the secondary key (if cascade, multiple concatenated). For LRW (deprecated/legacy), it contains the tweak key. For CBC (deprecated/legacy), it contains the IV seed. */
|
CRYPTOPP_ALIGN_DATA(16) unsigned __int8 k2[MASTER_KEYDATA_SIZE]; /* For XTS, this contains the secondary key (if cascade, multiple concatenated). For LRW (deprecated/legacy), it contains the tweak key. For CBC (deprecated/legacy), it contains the IV seed. */
|
||||||
unsigned __int8 salt[PKCS5_SALT_SIZE];
|
|
||||||
int noIterations;
|
int noIterations;
|
||||||
BOOL bTrueCryptMode;
|
BOOL bTrueCryptMode;
|
||||||
int volumePim;
|
int volumePim;
|
||||||
|
|
||||||
uint64 volume_creation_time; // Legacy
|
|
||||||
uint64 header_creation_time; // Legacy
|
|
||||||
|
|
||||||
BOOL bProtectHiddenVolume; // Indicates whether the volume contains a hidden volume to be protected against overwriting
|
BOOL bProtectHiddenVolume; // Indicates whether the volume contains a hidden volume to be protected against overwriting
|
||||||
BOOL bHiddenVolProtectionAction; // TRUE if a write operation has been denied by the driver in order to prevent the hidden volume from being overwritten (set to FALSE upon volume mount).
|
BOOL bHiddenVolProtectionAction; // TRUE if a write operation has been denied by the driver in order to prevent the hidden volume from being overwritten (set to FALSE upon volume mount).
|
||||||
|
|
||||||
|
|||||||
@@ -465,13 +465,13 @@ KeyReady: ;
|
|||||||
|
|
||||||
// Header version
|
// Header version
|
||||||
cryptoInfo->HeaderVersion = headerVersion;
|
cryptoInfo->HeaderVersion = headerVersion;
|
||||||
|
#if 0
|
||||||
// Volume creation time (legacy)
|
// Volume creation time (legacy)
|
||||||
cryptoInfo->volume_creation_time = GetHeaderField64 (header, TC_HEADER_OFFSET_VOLUME_CREATION_TIME).Value;
|
cryptoInfo->volume_creation_time = GetHeaderField64 (header, TC_HEADER_OFFSET_VOLUME_CREATION_TIME).Value;
|
||||||
|
|
||||||
// Header creation time (legacy)
|
// Header creation time (legacy)
|
||||||
cryptoInfo->header_creation_time = GetHeaderField64 (header, TC_HEADER_OFFSET_MODIFICATION_TIME).Value;
|
cryptoInfo->header_creation_time = GetHeaderField64 (header, TC_HEADER_OFFSET_MODIFICATION_TIME).Value;
|
||||||
|
#endif
|
||||||
// Hidden volume size (if any)
|
// Hidden volume size (if any)
|
||||||
cryptoInfo->hiddenVolumeSize = GetHeaderField64 (header, TC_HEADER_OFFSET_HIDDEN_VOLUME_SIZE).Value;
|
cryptoInfo->hiddenVolumeSize = GetHeaderField64 (header, TC_HEADER_OFFSET_HIDDEN_VOLUME_SIZE).Value;
|
||||||
|
|
||||||
@@ -529,7 +529,6 @@ KeyReady: ;
|
|||||||
memcpy (cryptoInfo->master_keydata, keyInfo.master_keydata, MASTER_KEYDATA_SIZE);
|
memcpy (cryptoInfo->master_keydata, keyInfo.master_keydata, MASTER_KEYDATA_SIZE);
|
||||||
|
|
||||||
// PKCS #5
|
// PKCS #5
|
||||||
memcpy (cryptoInfo->salt, keyInfo.salt, PKCS5_SALT_SIZE);
|
|
||||||
cryptoInfo->pkcs5 = pkcs5_prf;
|
cryptoInfo->pkcs5 = pkcs5_prf;
|
||||||
cryptoInfo->noIterations = keyInfo.noIterations;
|
cryptoInfo->noIterations = keyInfo.noIterations;
|
||||||
cryptoInfo->bTrueCryptMode = truecryptMode;
|
cryptoInfo->bTrueCryptMode = truecryptMode;
|
||||||
|
|||||||
@@ -1136,7 +1136,6 @@ void ReopenBootVolumeHeader (PIRP irp, PIO_STACK_LOCATION irpSp)
|
|||||||
Dump ("Header reopened\n");
|
Dump ("Header reopened\n");
|
||||||
ComputeBootLoaderFingerprint (BootDriveFilterExtension->LowerDeviceObject, header);
|
ComputeBootLoaderFingerprint (BootDriveFilterExtension->LowerDeviceObject, header);
|
||||||
|
|
||||||
BootDriveFilterExtension->Queue.CryptoInfo->header_creation_time = BootDriveFilterExtension->HeaderCryptoInfo->header_creation_time;
|
|
||||||
BootDriveFilterExtension->Queue.CryptoInfo->pkcs5 = BootDriveFilterExtension->HeaderCryptoInfo->pkcs5;
|
BootDriveFilterExtension->Queue.CryptoInfo->pkcs5 = BootDriveFilterExtension->HeaderCryptoInfo->pkcs5;
|
||||||
BootDriveFilterExtension->Queue.CryptoInfo->noIterations = BootDriveFilterExtension->HeaderCryptoInfo->noIterations;
|
BootDriveFilterExtension->Queue.CryptoInfo->noIterations = BootDriveFilterExtension->HeaderCryptoInfo->noIterations;
|
||||||
BootDriveFilterExtension->Queue.CryptoInfo->volumePim = BootDriveFilterExtension->HeaderCryptoInfo->volumePim;
|
BootDriveFilterExtension->Queue.CryptoInfo->volumePim = BootDriveFilterExtension->HeaderCryptoInfo->volumePim;
|
||||||
|
|||||||
Reference in New Issue
Block a user