VeraCrypt
aboutsummaryrefslogtreecommitdiff
path: root/src/Common/Apidrvr.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/Common/Apidrvr.h')
-rw-r--r--src/Common/Apidrvr.h71
1 files changed, 57 insertions, 14 deletions
diff --git a/src/Common/Apidrvr.h b/src/Common/Apidrvr.h
index 07a8448c..955286da 100644
--- a/src/Common/Apidrvr.h
+++ b/src/Common/Apidrvr.h
@@ -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-2016 IDRIX
+ and all other portions of this file are Copyright (c) 2013-2017 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. */
@@ -118,12 +118,17 @@
#define TC_IOCTL_SET_SYSTEM_FAVORITE_VOLUME_DIRTY TC_IOCTL (36)
#define TC_IOCTL_REREAD_DRIVER_CONFIG TC_IOCTL (37)
#define TC_IOCTL_GET_SYSTEM_DRIVE_DUMP_CONFIG TC_IOCTL (38)
#define VC_IOCTL_GET_BOOT_LOADER_FINGERPRINT TC_IOCTL (39)
+// result IOCTL_DISK_GET_DRIVE_GEOMETRY_EX
+// IN OUT - DISK_GEOMETRY_EX_STRUCT
+#define VC_IOCTL_GET_DRIVE_GEOMETRY_EX TC_IOCTL (40)
-// Legacy IOCTLs used before version 5.0
-#define TC_IOCTL_LEGACY_GET_DRIVER_VERSION 466968
-#define TC_IOCTL_LEGACY_GET_MOUNTED_VOLUMES 466948
+#define VC_IOCTL_EMERGENCY_CLEAR_ALL_KEYS TC_IOCTL (41)
+
+#define VC_IOCTL_IS_RAM_ENCRYPTION_ENABLED TC_IOCTL (42)
+
+#define VC_IOCTL_ENCRYPTION_QUEUE_PARAMS TC_IOCTL (43)
// Undocumented IOCTL sent by Windows 10 when handling EFS data on volumes
#define IOCTL_UNKNOWN_WINDOWS10_EFS_ACCESS 0x455610D8
@@ -160,16 +165,20 @@ typedef struct
BOOL UseBackupHeader;
BOOL RecoveryMode;
int pkcs5_prf;
int ProtectedHidVolPkcs5Prf;
- BOOL bTrueCryptMode;
+ BOOL VolumeMountedReadOnlyAfterPartialSysEnc;
uint32 BytesPerPhysicalSector;
int VolumePim;
int ProtectedHidVolPim;
wchar_t wszLabel[33]; // maximum label length is 32 for NTFS and 11 for FAT32
BOOL bIsNTFS; // output only
BOOL bDriverSetLabel;
BOOL bCachePim;
+ ULONG MaximumTransferLength;
+ ULONG MaximumPhysicalPages;
+ ULONG AlignmentMask;
+ BOOL VolumeMasterKeyVulnerable;
} MOUNT_STRUCT;
typedef struct
{
@@ -187,9 +196,9 @@ typedef struct
wchar_t volumeID[26][VOLUME_ID_SIZE]; /* IDs of mounted volumes */
unsigned __int64 diskLength[26];
int ea[26];
int volumeType[26]; /* Volume type (e.g. PROP_VOL_TYPE_OUTER, PROP_VOL_TYPE_OUTER_VOL_WRITE_PREVENTED, etc.) */
- BOOL truecryptMode[26];
+ BOOL reserved[26]; /* needed to keep the same size for the structure so that installer of new version can communicate with installed old version */
} MOUNT_LIST_STRUCT;
typedef struct
{
@@ -213,8 +222,9 @@ typedef struct
int volumePim;
wchar_t wszLabel[33];
BOOL bDriverSetLabel;
unsigned char volumeID[VOLUME_ID_SIZE];
+ BOOL mountDisabled;
} VOLUME_PROPERTIES_STRUCT;
typedef struct
{
@@ -239,8 +249,16 @@ typedef struct
DISK_GEOMETRY_STRUCT;
typedef struct
{
+ WCHAR deviceName[TC_MAX_PATH];
+ DISK_GEOMETRY diskGeometry;
+ LARGE_INTEGER DiskSize;
+}
+DISK_GEOMETRY_EX_STRUCT;
+
+typedef struct
+{
WCHAR DeviceName[TC_MAX_PATH];
LARGE_INTEGER RealDriveSize;
BOOL TimeOut;
} ProbeRealDriveSizeRequest;
@@ -251,11 +269,11 @@ typedef struct
BOOL bDetectTCBootLoader; // Whether the driver is to determine if the first sector contains a portion of the TrueCrypt Boot Loader
BOOL TCBootLoaderDetected;
BOOL DetectFilesystem;
BOOL FilesystemDetected;
- BOOL bMatchVolumeID;
- unsigned char volumeID[VOLUME_ID_SIZE];
- BOOL VolumeIDMatched;
+ BOOL bComputeVolumeIDs;
+ unsigned char volumeIDs[TC_VOLUME_TYPE_COUNT][VOLUME_ID_SIZE];
+ BOOL VolumeIDComputed[TC_VOLUME_TYPE_COUNT];
} OPEN_TEST_STRUCT;
typedef enum
@@ -298,8 +316,10 @@ typedef struct
// Number of times the filter driver answered that an unencrypted volume
// is read-only (or mounted an outer/normal TrueCrypt volume as read only)
uint32 HiddenSysLeakProtectionCount;
+ BOOL MasterKeyVulnerable;
+
} BootEncryptionStatus;
typedef struct
@@ -326,25 +346,25 @@ typedef struct
} GetBootEncryptionAlgorithmNameRequest;
typedef struct
{
- byte Fingerprint[WHIRLPOOL_DIGESTSIZE + SHA512_DIGESTSIZE];
+ uint8 Fingerprint[WHIRLPOOL_DIGESTSIZE + SHA512_DIGESTSIZE];
} BootLoaderFingerprintRequest;
typedef struct
{
wchar_t DevicePath[TC_MAX_PATH];
- byte Configuration;
+ uint8 Configuration;
BOOL DriveIsDynamic;
uint16 BootLoaderVersion;
- byte UserConfiguration;
+ uint8 UserConfiguration;
char CustomUserMessage[TC_BOOT_SECTOR_USER_MESSAGE_MAX_LENGTH + 1];
} GetSystemDriveConfigurationRequest;
typedef struct
{
WipeAlgorithmId WipeAlgorithm;
- CRYPTOPP_ALIGN_DATA(16) byte WipeKey[MASTER_KEYDATA_SIZE];
+ CRYPTOPP_ALIGN_DATA(16) uint8 WipeKey[MASTER_KEYDATA_SIZE];
} WipeDecoySystemRequest;
typedef struct
{
@@ -355,9 +375,9 @@ typedef struct
typedef struct
{
LARGE_INTEGER Offset;
- byte Data[TC_SECTOR_SIZE_BIOS];
+ uint8 Data[TC_SECTOR_SIZE_BIOS];
} WriteBootDriveSectorRequest;
typedef struct
{
@@ -370,8 +390,16 @@ typedef struct
struct _DriveFilterExtension *BootDriveFilterExtension;
BOOL HwEncryptionEnabled;
} GetSystemDriveDumpConfigRequest;
+typedef struct
+{
+ int EncryptionIoRequestCount;
+ int EncryptionItemCount;
+ int EncryptionFragmentSize;
+ int EncryptionMaxWorkItems;
+} EncryptionQueueParameters;
+
#pragma pack (pop)
#define DRIVER_STR WIDE
@@ -387,14 +415,29 @@ typedef struct
#define TC_DRIVER_CONFIG_REG_VALUE_NAME DRIVER_STR("VeraCryptConfig")
#define TC_ENCRYPTION_FREE_CPU_COUNT_REG_VALUE_NAME DRIVER_STR("VeraCryptEncryptionFreeCpuCount")
+#define VC_ENCRYPTION_IO_REQUEST_COUNT DRIVER_STR("VeraCryptEncryptionIoRequestCount")
+#define VC_ENCRYPTION_ITEM_COUNT DRIVER_STR("VeraCryptEncryptionItemCount")
+#define VC_ENCRYPTION_FRAGMENT_SIZE DRIVER_STR("VeraCryptEncryptionFragmentSize")
+#define VC_ENCRYPTION_MAX_WORK_ITEMS DRIVER_STR("VeraCryptEncryptionMaxWorkItems")
+
+#define VC_ERASE_KEYS_SHUTDOWN DRIVER_STR("VeraCryptEraseKeysShutdown")
+
+#define VC_ENABLE_MEMORY_PROTECTION DRIVER_STR("VeraCryptEnableMemoryProtection")
+
// WARNING: Modifying the following values can introduce incompatibility with previous versions.
#define TC_DRIVER_CONFIG_CACHE_BOOT_PASSWORD 0x1
#define TC_DRIVER_CONFIG_CACHE_BOOT_PASSWORD_FOR_SYS_FAVORITES 0x2
#define TC_DRIVER_CONFIG_DISABLE_NONADMIN_SYS_FAVORITES_ACCESS 0x4
#define TC_DRIVER_CONFIG_DISABLE_HARDWARE_ENCRYPTION 0x8
#define TC_DRIVER_CONFIG_ENABLE_EXTENDED_IOCTL 0x10
#define TC_DRIVER_CONFIG_DISABLE_EVIL_MAID_ATTACK_DETECTION 0x20
#define TC_DRIVER_CONFIG_CACHE_BOOT_PIM 0x40
+#define VC_DRIVER_CONFIG_ALLOW_NONSYS_TRIM 0x80
+#define VC_DRIVER_CONFIG_BLOCK_SYS_TRIM 0x100
+#define VC_DRIVER_CONFIG_ALLOW_WINDOWS_DEFRAG 0x200
+#define VC_DRIVER_CONFIG_CLEAR_KEYS_ON_NEW_DEVICE_INSERTION 0x400
+#define VC_DRIVER_CONFIG_ENABLE_CPU_RNG 0x800
+#define VC_DRIVER_CONFIG_ENABLE_RAM_ENCRYPTION 0x1000
#endif /* _WIN32 */