/* Legal Notice: Some portions of the source code contained in this file were derived from the source code of TrueCrypt 7.1a, which is Copyright (c) 2003-2012 TrueCrypt Developers Association and which is 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-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. */ #ifndef TCDEFS_H #define TCDEFS_H #if defined(_UEFI) #undef _WIN32 #undef _WIN64 #undef _DEBUG #include #include #include void* VeraCryptMemAlloc(IN UINTN size); void VeraCryptMemFree(IN VOID* ptr); #define BOOL int #ifndef FALSE #define FALSE 0 #define TRUE 1 #endif #define max(a,b) ((a)>(b))?(a):(b) #define min(a,b) ((a)<(b))?(a):(b) #ifdef __cplusplus extern "C" { #endif extern unsigned __int64 __cdecl _rotl64(unsigned __int64,int); extern unsigned __int64 __cdecl _rotr64(unsigned __int64,int); extern unsigned int __cdecl _rotl(unsigned int,int); extern unsigned int __cdecl _rotr(unsigned int,int); extern unsigned char _rotr8(unsigned char value, unsigned char shift); extern unsigned short _rotr16(unsigned short value, unsigned char shift); extern unsigned char _rotl8(unsigned char value, unsigned char shift); extern unsigned short _rotl16(unsigned short value, unsigned char shift); #ifdef __cplusplus } #endif #endif // defined(_UEFI) #define TC_APP_NAME "VeraCrypt" // Version displayed to user #define VERSION_STRING "1.22" // Version number to compare against driver #define VERSION_NUM 0x0122 // Release date #define TC_STR_RELEASE_DATE L"March 30, 2018" #define TC_RELEASE_DATE_YEAR 2018 #define TC_RELEASE_DATE_MONTH 03 #define BYTES_PER_KB 1024LL #define BYTES_PER_MB 1048576LL #define BYTES_PER_GB 1073741824LL #define BYTES_PER_TB 1099511627776LL #define BYTES_PER_PB 1125899906842624LL /* GUI/driver errors */ #define WIDE(x) (LPWSTR)L##x #define VC_MAX(a,b) ((a)>(b))?(a):(b) #define VC_MIN(a,b) ((a)<(b))?(a):(b) #ifdef _MSC_VER typedef __int8 int8; typedef __int16 int16; typedef __int32 int32; typedef unsigned __int8 byte; typedef unsigned __int16 uint16; typedef unsigned __int32 uint32; #ifdef TC_NO_COMPILER_INT64 typedef unsigned __int32 TC_LARGEST_COMPILER_UINT; #else typedef unsigned __int64 TC_LARGEST_COMPILER_UINT; typedef __int64 int64; typedef unsigned __int64 uint64; #define LL(x) x##ui64 #endif #pragma warning( disable : 4201 ) // disable: 4201 nonstandard extension used : nameless struct/union #pragma warning( disable : 4324 ) // disable: 4324 structure was padded due to __declspec(align()) #else // !_MSC_VER #include #include #include typedef int8_t int8; typedef int16_t int16; typedef int32_t int32; typedef int64_t int64; typedef uint8_t byte; typedef uint16_t uint16; typedef uint32_t uint32; typedef uint64_t uint64; #define LL(x) x##ULL #if UCHAR_MAX != 0xffU #error UCHAR_MAX != 0xff #endif #define __int8 char #if USHRT_MAX != 0xffffU #error USHRT_MAX != 0xffff #endif #define __int16 short #if UINT_MAX != 0xffffffffU #error UINT_MAX != 0xffffffff #endif #define __int32 int typedef uint64 TC_LARGEST_COMPILER_UINT; #define BOOL int #ifndef FALSE #define FALSE 0 #define TRUE 1 #endif #endif // !_MSC_VER #define TC_INT_TYPES_DEFINED // Integer types required by Cryptolib typedef unsigned __int8 uint_8t; typedef unsigned __int16 uint_16t; typedef unsigned __int32 uint_32t; #ifndef TC_NO_COMPILER_INT64 typedef uint64 uint_64t; #endif typedef union { struct { unsigned __int32 LowPart; unsigned __int32 HighPart; }; #ifndef TC_NO_COMPILER_INT64 uint64 Value; #endif } UINT64_STRUCT; #ifndef __has_builtin // Optional of course #define __has_builtin(x) 0 // Compatibility with non-clang compilers #endif #if defined(_UEFI) typedef UINTN size_t; typedef uint64 uint_64t; typedef CHAR16 wchar_t; typedef int LONG; #define wcscpy StrCpy #define wcslen StrLen #define wcscmp StrCmp #define wcscat StrCat #define memcpy(dest,source,count) CopyMem(dest,source,(UINTN)(count)) #define memset(dest,ch,count) SetMem(dest,(UINTN)(count),(UINT8)(ch)) #define memchr(buf,ch,count) ScanMem8(buf,(UINTN)(count),(UINT8)ch) #define memcmp(buf1,buf2,count) (int)(CompareMem(buf1,buf2,(UINTN)(count))) #define MAX_STRING_SIZE 0x1000 #define strcat(strDest,strSource) AsciiStrCatS(strDest,MAX_STRING_SIZE,strSource) #define strchr(str,ch) ScanMem8((VOID *)(str),AsciiStrSize(str),(UINT8)ch) #define strcmp AsciiStrCmp #define strncmp(string1,string2,count) (int)(AsciiStrnCmp(string1,string2,(UINTN)(count))) #define strcpy(strDest,strSource) AsciiStrCpyS(strDest,MAX_STRING_SIZE,strSource) #define strncpy(strDest,strSource,count) AsciiStrnCpyS(strDest,MAX_STRING_SIZE,strSource,(UINTN)count) #define strlen(str) (size_t)(AsciiStrnLenS(str,MAX_STRING_SIZE)) #define strstr AsciiStrStr // #define rotr32(x,n) (((x) >> n) | ((x) << (32 - n))) // #define rotl32(x,n) (((x) << n) | ((x) >> (32 - n))) // #define rotr64(x,n) (((x) >> n) | ((x) << (64 - n))) // #define rotl64(x,n) (((x) << n) | ((x) >> (64 - n))) // #define bswap_32(x) (rotl32((((x) & 0xFF00FF00) >> 8) | (((x) & 0x00FF00FF) << 8), 16U)) // #define bswap_64(x) rotl64(((((((x & LL(0xFF00FF00FF00FF00)) >> 8) | ((x & LL(0x00FF00FF00FF00FF)) << 8)) & LL(0xFFFF0000FFFF0000)) >> 16) | (((((x & LL(0xFF00FF00FF00FF00)) >> 8) | ((x & LL(0x00FF00FF00FF00FF)) << 8)) & LL(0x0000FFFF0000FFF
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>VeraCrypt - Free Open source disk encryption with strong security for the Paranoid</title>
<meta name="description" content="VeraCrypt is free open-source disk encryption software for Windows, Mac OS X and Linux. In case an attacker forces you to reveal the password, VeraCrypt provides plausible deniability. In contrast to file encryption, data encryption performed by VeraCrypt is real-time (on-the-fly), automatic, transparent, needs very little memory, and does not involve temporary unencrypted files."/>
<meta name="keywords" content="encryption, security"/>
<link href="styles.css" rel="stylesheet" type="text/css" />
</head>
<body>

<div>
<a href="Documentation.html"><img src="VeraCrypt128x128.png" alt="VeraCrypt"/></a>
</div>

<div id="menu">
	<ul>
	  <li><a href="Home.html">Home</a></li>
	  <li><a href="/code/">Source Code</a></li>
	  <li><a href="Downloads.html">Downloads</a></li>
	  <li><a class="active" href="Documentation.html">Documentation</a></li>
	  <li><a href="Donation.html">Donate</a></li>
	  <li><a href="https://sourceforge.net/p/veracrypt/discussion/" target="_blank">Forums</a></li>
	</ul>
</div>

<div>
<p>
<a href="Documentation.html">Documentation</a>
<img src="arrow_right.gif" alt=">>" style="margin-top: 5px">
<a href="Incompatibilities.html">Incompatibilities</a>
</p></div>

<div class="wikidoc">
<h1>Incompatibilities</h1>
<h2>
Activation of Adobe Photoshop&reg; and Other Products Using FLEXnet Publisher&reg; / SafeCast</h2>
<div style="text-align:left; margin-top:19px; margin-bottom:19px; padding-top:0px; padding-bottom:0px">
<em style="text-align:left">Note: The issue described below does <strong style="text-align:left">
not</strong> affect you if you use a non-cascade encryption algorithm (i.e., AES, Serpent, or Twofish).* The issue also does
<strong style="text-align:left">not</strong> affect you if you do not use <a href="System%20Encryption.html" style="text-align:left; color:#0080c0; text-decoration:none.html">
system encryption</a> (pre-boot authentication).</em></div>
<div style="text-align:left; margin-top:19px; margin-bottom:19px; padding-top:0px; padding-bottom:0px">
Acresso FLEXnet Publisher activation software, formerly Macrovision SafeCast, (used for activation of third-party software, such as Adobe Photoshop) writes data to the first drive track. If this happens when your system partition/drive is encrypted by VeraCrypt,
 a portion of the VeraCrypt Boot Loader will be damaged and you will not be able to start Windows. In that case, please use your
<a href="VeraCrypt%20Rescue%20Disk.html" style="text-align:left; color:#0080c0; text-decoration:none.html">
VeraCrypt Rescue Disk</a> to regain access to your system. There are two ways to do so:</div>
<ol style="text-align:left; margin-top:18px; margin-bottom:19px; padding-top:0px; padding-bottom:0px">
<li style="text-align:left; margin-top:0px; margin-bottom:0px; padding-top:0px; padding-bottom:0px">
You may keep the third-party software activated but you will need to boot your system from the VeraCrypt Rescue Disk CD/DVD
<em style="text-align:left">every time</em>. Just insert your Rescue Disk into your CD/DVD drive and then enter your password in the Rescue Disk screen.
</li><li style="text-align:left; margin-top:0px; margin-bottom:0px; padding-top:0px; padding-bottom:0px">
If you do not want to boot your system from the VeraCrypt Rescue Disk CD/DVD every time, you can restore the VeraCrypt Boot Loader on the system drive. To do so, in the Rescue Disk screen, select
<em style="text-align:left">Repair Options</em> &gt; <em style="text-align:left">
Restore VeraCrypt Boot Loader</em>. However, note that this will deactivate the third-party software.
</li></ol>
<div style="text-align:left; margin-top:19px; margin-bottom:19px; padding-top:0px; padding-bottom:0px">
For information on how to use your VeraCrypt Rescue Disk, please see the chapter <a href="VeraCrypt%20Rescue%20Disk.html" style="text-align:left; color:#0080c0; text-decoration:none.html">
VeraCrypt Rescue Disk</a>.</div>
<div style="text-align:left; margin-top:19px; margin-bottom:19px; padding-top:0px; padding-bottom:0px">
<strong style="text-align:left">Possible permanent solution</strong>: decrypt the system partition/drive, and then re-encrypt it using a non-cascade encryption algorithm (i.e., AES, Serpent, or Twofish).*</div>
<div style="text-align:left; margin-top:19px; margin-bottom:19px; padding-top:0px; padding-bottom:0px">
Please note that this not a bug in VeraCrypt (the issue is caused by inappropriate design of the third-party activation software).</div>
<h2>Outpost Firewall and Outpost Security Suite</h2>
<div style="text-align:left; margin-top:19px; margin-bottom:19px; padding-top:0px; padding-bottom:0px">
If Outpost Firewall or Outpost Security Suite is installed with Proactive Protection enabled, the machine freezes completely for 5-10 seconds during the volume mount/dismount operation. This is caused by a conflict between Outpost System Guard option that protects "Active Desktop" objects and VeraCrypt waiting dialog displayed during mount/dismount operations.</div>
<div style="text-align:left; margin-top:19px; margin-bottom:19px; padding-top:0px; padding-bottom:0px">
A workaround that fixes this issue is to disable VeraCrypt waiting dialog in the Preferences: use menu "Settings -> Preferences" and check the option "Don't show wait message dialog when performing operations".</div>
<div style="text-align:left; margin-top:19px; margin-bottom:19px; padding-top:0px; padding-bottom:0px">
More information can be found at <a href="https://sourceforge.net/p/veracrypt/tickets/100/">https://sourceforge.net/p/veracrypt/tickets/100/</a>
</div>
<hr align="left" size="1" width="189" style="text-align:left; height:0px; border-width:0px 1px 1px; border-style:solid; border-color:#000000">
<p><span style="text-align:left; font-size:10px; line-height:12px">* The reason is that the VeraCrypt Boot Loader is smaller than the one used for cascades of ciphers and, therefore, there is enough space in the first drive track for a backup of the VeraCrypt
 Boot Loader. Hence, whenever the VeraCrypt Boot Loader is damaged, its backup copy is run automatically instead.</span><br style="text-align:left">
<br style="text-align:left">
<br style="text-align:left">
<br style="text-align:left">
&nbsp;&nbsp;See also: <a href="Issues%20and%20Limitations.html" style="text-align:left; color:#0080c0; text-decoration:none; font-weight:bold.html">
Known Issues &amp; Limitations</a>,&nbsp;&nbsp;<a href="Troubleshooting.html" style="text-align:left; color:#0080c0; text-decoration:none; font-weight:bold.html">Troubleshooting</a></p>
</div><div class="ClearBoth"></div></body></html>