/*
---------------------------------------------------------------------------
Copyright (c) 1998-2007, Brian Gladman, Worcester, UK. All rights reserved.
LICENSE TERMS
The free distribution and use of this software is allowed (with or without
changes) provided that:
1. source code distributions include the above copyright notice, this
list of conditions and the following disclaimer;
2. binary distributions include the above copyright notice, this list
of conditions and the following disclaimer in their documentation;
3. the name of the copyright holder is not used to endorse products
built using this software without specific written permission.
DISCLAIMER
This software is provided 'as is' with no explicit or implied warranties
in respect of its properties, including, but not limited to, correctness
and/or fitness for purpose.
---------------------------------------------------------------------------
Issue Date: 20/12/2007
*/
/* Adapted for TrueCrypt:
- Added run-time table generator for Aes_x86_v2.asm
*/
#define DO_TABLES
#include "Aes.h"
#include "Aesopt.h"
#if defined(FIXED_TABLES)
#define sb_data(w) {\
w(0x63), w(0x7c), w(0x77), w(0x7b), w(0xf2), w(0x6b), w(0x6f), w(0xc5),\
w(0x30), w(0x01), w(0x67), w(0x2b), w(0xfe), w(0xd7), w(0xab), w(0x76),\
w(0xca), w(0x82), w(0xc9), w(0x7d), w(0xfa), w(0x59), w(0x47), w(0xf0),\
w(0xad), w(0xd4), w(0xa2), w(0xaf), w(0x9c), w(0xa4), w(0x72), w(0xc0),\
w(0xb7), w(0xfd), w(0x93), w(0x26), w(0x36), w(0x3f), w(0xf7), w(0xcc),\
w(0x34), w(0xa5), w(0xe5), w(0xf1), w(0x71), w(0xd8), w(0x31), w(0x15),\
w(0x04), w(0xc7), w(0x23), w(0xc3), w(0x18), w(0x96), w(0x05), w(0x9a),\
w(0x07), w(0x12), w(0x80), w(0xe2), w(0xeb), w(0x27), w(0xb2), w(0x75),\
w(0x09), w(0x83), w(0x2c), w(0x1a), w(0x1b), w(0x6e), w(0x5a), w(0xa0),\
w(0x52), w(0x3b), w(0xd6), w(0xb3), w(0x29), w(0xe3), w(0x2f), w(0x84),\
w(0x53), w(0xd1), w(0x00), w(0xed), w(0x20), w(0xfc), w(0xb1), w(0x5b),\
w(0x6a), w(0xcb), w(0xbe), w(0x39), w(0x4a), w(0x4c), w(0x58), w(0xcf),\
w(0xd0), w(0xef), w(0xaa), w(0xfb), w(0x43), w(0x4d), w(0x33), w(0x85),\
w(0x45), w(0xf9), w(0x02), w(0x7f), w(0x50), w(0x3c), w(0x9f), w(0xa8),\
w(0x51), w(0xa3), w(0x40), w(0x8f), w(0x92), w(0x9d), w(0x38), w(0xf5),\
w(0xbc), w(0xb6), w(0xda), w(0x21), w(0x10), w(0xff), w(0xf3), w(0xd2),\
w(0xcd), w(0x0c), w(0x13), w(0xec), w(0x5f), w(0x97), w(0x44), w(0x17),\
w(0xc4), w(0xa7), w(0x7e), w(0x3d), w(0x64), w(0x5d), w(0x19), w(0x73),\
w(0x60), w(0x81), w(0x4f), w(0xdc), w(0x22), w(0x2a), w(0x90), w(0x88),\
w(0x46), w(0xee), w(0xb8), w(0x14), w(0xde), w(0x5e), w(0x0b), w(0xdb),\
w(0xe0), w(0x32), w(0x3a), w(0x0a), w(0x49), w(0x06), w(0x24), w(0x5c),\
w(0xc2), w(0xd3), w(0xac), w(0x62), w(0x91), w(0x95), w(0xe4), w(0x79),\
w(0xe7), w(0xc8<?xml version="1.0" encoding="Windows-1252"?>
<VisualStudioProject
ProjectType="Visual C++"
Version="9.00"
Name="Format"
ProjectGUID="{9DC1ABE2-D18B-48FB-81D2-8C50ADC57BCF}"
RootNamespace="Format"
Keyword="Win32Proj"
TargetFrameworkVersion="131072"
>
<Platforms>
<Platform
Name="Win32"
/>
</Platforms>
<ToolFiles>
</ToolFiles>
<Configurations>
<Configuration
Name="Debug|Win32"
OutputDirectory="Debug"
IntermediateDirectory="Debug"
ConfigurationType="1"
InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
CharacterSet="2"
>
<Tool
Name="VCPreBuildEventTool"
/>
<Tool
Name="VCCustomBuildTool"
/>
<Tool
Name="VCXMLDataGeneratorTool"
/>
<Tool
Name="VCWebServiceProxyGeneratorTool"
/>
<Tool
Name="VCMIDLTool"
TypeLibraryName="$(SolutionDir)/$(ProjectName)/$(ProjectName).tlb"
/>
<Tool
Name="VCCLCompilerTool"
Optimization="0"
AdditionalIncludeDirectories="..\Common;..\Crypto;..\;$(PKCS11_INC)"
PreprocessorDefinitions="VOLFORMAT;WIN32;DEBUG;_DEBUG;_WINDOWS;_CRT_SECURE_NO_DEPRECATE;_CRT_NON_CONFORMING_SWPRINTFS"
MinimalRebuild="true"
BasicRuntimeChecks="3"
RuntimeLibrary="1"
BufferSecurityCheck="true"
UsePrecompiledHeader="0"
WarningLevel="4"
DebugInformationFormat="4"
DisableSpecificWarnings="4057;4100;4127;4201;4204;4701;4706"
/>
<Tool
Name="VCManagedResourceCompilerTool"
/>
<Tool
Name="VCResourceCompilerTool"
/>
<Tool
Name="VCPreLinkEventTool"
/>
<Tool
Name="VCLinkerTool"
AdditionalDependencies="comctl32.lib setupapi.lib ..\Crypto\Debug\crypto.lib"
OutputFile="$(OutDir)/VeraCryptFormat.exe"
LinkIncremental="2"
GenerateManifest="false"
IgnoreAllDefaultLibraries="false"
GenerateDebugInformation="true"
ProgramDatabaseFile="$(OutDir)/Format.pdb"
SubSystem="2"
RandomizedBaseAddress="1"
DataExecutionPrevention="2"
TargetMachine="1"
/>
<Tool
Name="VCALinkTool"
/>
<Tool
Name="VCManifestTool"
AdditionalManifestFiles="Format.manifest"
/>
<Tool
Name="VCXDCMakeTool"
/>
<Tool
Name="VCBscMakeTool"
/>
<Tool
Name="VCFxCopTool"
/>
<Tool
Name="VCAppVerifierTool"
/>
<Tool
Name="VCPostBuildEventTool"
CommandLine="md "..\Debug\Setup Files" 2>NUL:
copy Debug\VeraCryptFormat.exe "..\Debug\Setup Files\VeraCrypt Format.exe" >NUL:
"
/>
</Configuration>
<Configuration
Name="Release|Win32"
OutputDirectory="Release"
IntermediateDirectory="Release"
ConfigurationType="1"
InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
CharacterSet="2"
>
<Tool
Name="VCPreBuildEventTool"
/>
<Tool
Name="VCCustomBuildTool"
/>
<Tool
Name="VCXMLDataGeneratorTool"
/>
<Tool
Name="VCWebServiceProxyGeneratorTool"
/>
<Tool
Name="VCMIDLTool"
TypeLibraryName="$(SolutionDir)/$(ProjectName)/$(ProjectName).tlb"
/>
<Tool
Name="VCCLCompilerTool"
AdditionalOptions="/w34189"
Optimization="2"
AdditionalIncludeDirectories="..\Common;..\Crypto;..\;$(PKCS11_INC)"
PreprocessorDefinitions="VOLFORMAT;WIN32;NDEBUG;_WINDOWS;_CRT_SECURE_NO_DEPRECATE;_CRT_NON_CONFORMING_SWPRINTFS"
RuntimeLibrary="0"
BufferSecurityCheck="true"
UsePrecompiledHeader="0"
AssemblerOutput="2"
AssemblerListingLocation="$(IntDir)/"
WarningLevel="4"
DebugInformationFormat="0"
DisableSpecificWarnings="4057;4100;4127;4201;4204;4701;4706"
/>
<Tool
Name="VCManagedResourceCompilerTool"
/>
<Tool
Name="VCResourceCompilerTool"
/>
<Tool
Name="VCPreLinkEventTool"
/>
<Tool
Name="VCLinkerTool"
AdditionalDependencies="comctl32.lib setupapi.lib ..\Crypto\Release\crypto.lib"
OutputFile="$(OutDir)/VeraCryptFormat.exe"
LinkIncremental="1"
GenerateManifest="false"
IgnoreAllDefaultLibraries="false"
GenerateDebugInformation="false"
GenerateMapFile="true"
SubSystem="2"
OptimizeReferences="2"
EnableCOMDATFolding="2"
RandomizedBaseAddress="1"
DataExecutionPrevention="2"
TargetMachine="1"
/>
<Tool
Name="VCALinkTool"
/>
<Tool
Name="VCManifestTool"
AdditionalManifestFiles="Format.manifest"
/>
<Tool
Name="VCXDCMakeTool"
/>
<Tool
Name="VCBscMakeTool"
/>
<Tool
Name="VCFxCopTool"
/>
<Tool
Name="VCAppVerifierTool"
/>
<Tool
Name="VCPostBuildEventTool"
CommandLine="copy Release\VeraCryptFormat.exe "..\Release\Setup Files\VeraCrypt Format.exe""
/>
</Configuration>
</Configurations>
<References>
</References>
<Files>
<Filter
Name="Source Files"
Filter="cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx"
UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
>
<File
RelativePath=".\FormatCom.cpp"
>
</File>
<File
RelativePath=".\FormatCom.idl"
>
</File>
<File
RelativePath=".\InPlace.c"
>
<FileConfiguration
Name="Debug|Win32"
>
<Tool
Name="VCCLCompilerTool"
CompileAs="2"
/>
</FileConfiguration>
<FileConfiguration
Name="Release|Win32"
>
<Tool
Name="VCCLCompilerTool"
CompileAs="2"
/>
</FileConfiguration>
</File>
<File
RelativePath=".\Tcformat.c"
>
<FileConfiguration
Name="Debug|Win32"
>
<Tool
Name="VCCLCompilerTool"
CompileAs="2"
/>
</FileConfiguration>
<FileConfiguration
Name="Release|Win32"
>
<Tool
Name="VCCLCompilerTool"
CompileAs="2"
/>
</FileConfiguration>
</File>
<Filter
Name="Common"
>
<File
RelativePath="..\Common\BaseCom.cpp"
>
</File>
<File
RelativePath="..\Common\BootEncryption.cpp"
>
</File>
<File
RelativePath="..\Common\Cmdline.c"
>
</File>
<File
RelativePath="..\Common\Combo.c"
>
</File>
<File
RelativePath="..\Common\Crc.c"
>
</File>
<File
RelativePath="..\Common\Crypto.c"
>
</File>
<File
RelativePath="..\Common\Dictionary.c"
>
<FileConfiguration
Name="Debug|Win32"
>
<Tool
Name="VCCLCompilerTool"
CompileAs="2"
/>
</FileConfiguration>
<FileConfiguration
Name="Release|Win32"
>
<Tool
Name="VCCLCompilerTool"
CompileAs="2"
/>
</FileConfiguration>
</File>
<File
RelativePath="..\Common\Dlgcode.c"
>
<FileConfiguration
Name="Debug|Win32"
>
<Tool
Name="VCCLCompilerTool"
CompileAs="2"
/>
</FileConfiguration>
<FileConfiguration
Name="Release|Win32"
>
<Tool
Name="VCCLCompilerTool"
CompileAs="2"
/>
</FileConfiguration>
</File>
<File
RelativePath="..\Common\EncryptionThreadPool.c"
>
</File>
<File
RelativePath="..\Common\Endian.c"
>
</File>
<File
RelativePath="..\Common\Fat.c"
>
</File>
<File
RelativePath="..\Common\Format.c"
>
</File>
<File
RelativePath="..\Common\GfMul.c"
>
</File>
<File
RelativePath="..\Common\Keyfiles.c"
>
<FileConfiguration
Name="Debug|Win32"
>
<Tool
Name="VCCLCompilerTool"
CompileAs="2"
/>
</FileConfiguration>
<FileConfiguration
Name="Release|Win32"
>
<Tool
Name="VCCLCompilerTool"
CompileAs="2"
/>
</FileConfiguration>
</File>
<File
RelativePath="..\Common\Language.c"
>
</File>
<File
RelativePath="..\Common\Password.c"
>
</File>
<File
RelativePath="..\Common\Pkcs5.c"
>
</File>
<File
RelativePath="..\Common\Progress.c"
>
</File>
<File
RelativePath="..\Common\Random.c"
>
</File>
<File
RelativePath="..\Common\Registry.c"
>
</File>
<File
RelativePath="..\Common\SecurityToken.cpp"
>
</File>
<File
RelativePath="..\Common\Tests.c"
>
</File>
<File
RelativePath="..\Common\Volumes.c"
>
</File>
<File
RelativePath="..\Common\Wipe.c"
>
</File>
<File
RelativePath="..\Common\Xml.c"
>
</File>
<File
RelativePath="..\Common\Xts.c"
>
</File>
</Filter>
</Filter>
<Filter
Name="Header Files"
Filter="h;hpp;hxx;hm;inl;inc;xsd"
UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"
>
<File
RelativePath="..\Common\BaseCom.h"
>
</File>
<File
RelativePath="..\Common\Common.h"
>
</File>
<File
RelativePath="..\Common\Crc.h"
>
</File>
<File
RelativePath="..\Common\Crypto.h"
>
</File>
<File
RelativePath="..\Common\Dictionary.h"
>
</File>
<File
RelativePath="..\Common\Dlgcode.h"
>
</File>
<File
RelativePath="..\Common\EncryptionThreadPool.h"
>
</File>
<File
RelativePath="..\Common\Endian.h"
>
</File>
<File
RelativePath="..\Common\Exception.h"
>
</File>
<File
RelativePath="..\Common\Fat.h"
>
</File>
<File
RelativePath="..\Common\Format.h"
>
</File>
<File
RelativePath=".\FormatCom.h"
>
</File>
<File
RelativePath="..\Common\GfMul.h"
>
</File>
<File
RelativePath=".\InPlace.h"
>
</File>
<File
RelativePath="..\Common\Keyfiles.h"
>
</File>
<File
RelativePath="..\Common\Language.h"
>
</File>
<File
RelativePath="..\Mount\Mount.h"
>
</File>
<File
RelativePath="..\Common\Pkcs5.h"
>
</File>
<File
RelativePath="..\Common\Progress.h"
>
</File>
<File
RelativePath="..\Common\Random.h"
>
</File>
<File
RelativePath="..\Common\Registry.h"
>
</File>
<File
RelativePath=".\resource.h"
>
</File>
<File
RelativePath="..\Common\Resource.h"
>
</File>
<File
RelativePath="..\Common\SecurityToken.h"
>
</File>
<File
RelativePath="..\Common\Tcdefs.h"
>
</File>
<File
RelativePath=".\Tcformat.h"
>
</File>
<File
RelativePath="..\Common\Tests.h"
>
</File>
<File
RelativePath="..\Common\Volumes.h"
>
</File>
<File
RelativePath="..\Common\Wipe.h"
>
</File>
<File
RelativePath="..\Common\Xml.h"
>
</File>
<File
RelativePath="..\Common\Xts.h"
>
</File>
</Filter>
<Filter
Name="Resource Files"
Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx"
UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}"
>
<File
RelativePath=".\Format.manifest"
>
</File>
<File
RelativePath=".\Format.rc"
>
</File>
<File
RelativePath=".\Format.tlb"
SubType="Designer"
>
</File>
<File
RelativePath="..\Common\VeraCrypt_Volume.ico"
>
</File>
<File
RelativePath=".\VeraCrypt_wizard.bmp"
>
</File>
<Filter
Name="Common"
>
<File
RelativePath="..\Boot\Windows\Rescue_AES\BootLoader.com.gz"
>
</File>
<File
RelativePath="..\Boot\Windows\Rescue\BootLoader.com.gz"
>
</File>
<File
RelativePath="..\Boot\Windows\Rescue_Twofish\BootLoader.com.gz"
>
</File>
<File
RelativePath="..\Boot\Windows\Release_Serpent\BootLoader.com.gz"
>
</File>
<File
RelativePath="..\Boot\Windows\Release_AES\BootLoader.com.gz"
>
</File>
<File
RelativePath="..\Boot\Windows\Release\BootLoader.com.gz"
>
</File>
<File
RelativePath="..\Boot\Windows\Release_Twofish\BootLoader.com.gz"
>
</File>
<File
RelativePath="..\Boot\Windows\Rescue_Serpent\BootLoader.com.gz"
>
</File>
<File
RelativePath="..\Boot\Windows\Rescue_AES\BootSector.bin"
>
</File>
<File
RelativePath="..\Boot\Windows\Rescue\BootSector.bin"
>
</File>
<File
RelativePath="..\Boot\Windows\Release\BootSector.bin"
>
</File>
<File
RelativePath="..\Boot\Windows\Release_Serpent\BootSector.bin"
>
</File>
<File
RelativePath="..\Boot\Windows\Rescue_Serpent\BootSector.bin"
>
</File>
<File
RelativePath="..\Boot\Windows\Rescue_Twofish\BootSector.bin"
>
</File>
<File
RelativePath="..\Boot\Windows\Release_Twofish\BootSector.bin"
>
</File>
<File
RelativePath="..\Boot\Windows\Release_AES\BootSector.bin"
>
</File>
<File
RelativePath="..\Common\Common.rc"
>
<FileConfiguration
Name="Debug|Win32"
ExcludedFromBuild="true"
>
<Tool
Name="VCResourceCompilerTool"
/>
</FileConfiguration>
<FileConfiguration
Name="Release|Win32"
ExcludedFromBuild="true"
>
<Tool
Name="VCResourceCompilerTool"
/>
</FileConfiguration>
</File>
<File
RelativePath="..\Boot\Windows\Release\Decompressor.com"
>
</File>
<File
RelativePath="..\Common\Language.xml"
>
</File>
<File
RelativePath="..\Resources\Texts\License.rtf"
>
</File>
<File
RelativePath="..\Common\Textual_logo_288dpi.bmp"
>
</File>
<File
RelativePath="..\Common\Textual_logo_96dpi.bmp"
>
</File>
<File
RelativePath="..\Common\Textual_logo_background.bmp"
>
</File>
<File
RelativePath="..\Common\VeraCrypt.ico"
>
</File>
</Filter>
</Filter>
</Files>
<Globals>
</Globals>
</VisualStudioProject>