/* Derived from source code of TrueCrypt 7.1a, which is Copyright (c) 2008-2012 TrueCrypt Developers Association and which is governed by the TrueCrypt License 3.0. 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 TC_HEADER_Platform_File #define TC_HEADER_Platform_File #include "PlatformBase.h" #include "Buffer.h" #include "FilesystemPath.h" #include "SystemException.h" namespace VeraCrypt { class File { public: enum FileOpenMode { CreateReadWrite, CreateWrite, OpenRead, OpenWrite, OpenReadWrite }; enum FileShareMode { ShareNone, ShareRead, ShareReadWrite, ShareReadWriteIgnoreLock }; enum FileOpenFlags { // Bitmap FlagsNone = 0, PreserveTimestamps = 1 << 0, DisableWriteCaching = 1 << 1 }; #ifdef TC_WINDOWS typedef FILE* SystemFileHandleType; #else typedef int SystemFileHandleType; #endif File () : FileIsOpen (false), SharedHandle (false) { } virtual ~File (); void AssignSystemHandle (SystemFileHandleType openFileHandle, bool sharedHandle = true) { if (FileIsOpen) Close(); FileHandle = openFileHandle; FileIsOpen = true; SharedHandle = sharedHandle; } void Close (); static void Copy (const FilePath &sourcePath, const FilePath &destinationPath, bool preserveTimestamps = true); void Delete (); void Flush () const; uint32 GetDeviceSectorSize () const; static size_t GetOptimalReadSize () { return OptimalReadSize; } static size_t GetOptimalWriteSize () { return OptimalWriteSize; } uint64 GetPartitionDeviceStartOffset () const; bool IsOpen () const { return FileIsOpen; } FilePath GetPath () const; uint64 Length () const; void Open (const FilePath &path, FileOpenMode mode = OpenRead, FileShareMode shareMode = ShareReadWrite, FileOpenFlags flags = FlagsNone); uint64 Read (const BufferPtr &buffer) const; void ReadCompleteBuffer (const BufferPtr &buffer) const; uint64 ReadAt (const BufferPtr &buffer, uint64 position) const; void SeekAt (uint64 position) const; void SeekEnd (int ofset) const; void Write (const ConstBufferPtr &buffer) const; void Write (const ConstBufferPtr &buffer, size_t length) const { Write (buffer.GetRange (0, length)); } void WriteAt (const ConstBufferPtr &buffer, uint64 position) const; protected: void ValidateState () const; static const size_t OptimalReadSize = 256 * 1024; static const size_t OptimalWriteSize = 256 * 1024; bool FileIsOpen; FileOpenFlags mFileOpenFlags; bool SharedHandle; FilePath Path; SystemFileHandleType FileHandle; #ifdef TC_WINDOWS #else time_t AccTime; time_t ModTime; #endif private: File (const File &); File &operator= (const File &); }; } #endif // TC_HEADER_Platform_File h=VeraCrypt_1.24-Update4&id=6a1b12afc1745fdb321ded484a8cab6fb4725307'>doc/html/VeraCrypt System Files.html
blob: c220ae3e263bc6ed6abd03f1a3a4f431c06de13c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
<!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="https://www.veracrypt.fr/en/Home.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="Miscellaneous.html">Miscellaneous</a>
<img src="arrow_right.gif" alt=">>" style="margin-top: 5px">
<a href="VeraCrypt%20System%20Files.html">VeraCrypt System Files</a>
</p></div>

<div class="wikidoc">
<div>
<h1>VeraCrypt System Files &amp; Application Data</h1>
<p>Note: %windir% is the main Windows installation path (e.g., C:\WINDOWS)</p>
<h4>VeraCrypt Driver</h4>
<p>%windir%\SYSTEM32\DRIVERS\veracrypt.sys</p>
<p>Note: This file is not present when VeraCrypt is run in portable mode.</p>
<h4>VeraCrypt Settings, Application Data, and Other System Files</h4>
<p>WARNING: Note that VeraCrypt does <em>not</em> encrypt any of the files listed in this section (unless it encrypts the system partition/drive).<br>
<br>
The following files are saved in the folder %APPDATA%\VeraCrypt\. In portable mode, these files are saved to the folder from which you run the file Vera<em>Crypt.exe</em> (i.e., the folder in which Vera<em>Crypt.exe</em> resides):</p>
<ul>
<li>&quot;Configuration.xml&quot; (the main configuration file). </li></ul>
<ul>
<li>&quot;System Encryption.xml&quot; (temporary configuration file used during the initial process of in-place encryption/decryption of the system partition/drive).
</li></ul>
<ul>
<li>&quot;Default Keyfiles.xml&quot;
<ul>
<li>Note: This file may be absent if the corresponding VeraCrypt feature is not used.
</li></ul>
</li></ul>
<ul>
<li>&quot;Favorite Volumes.xml&quot;
<ul>
<li>Note: This file may be absent if the corresponding VeraCrypt feature is not used.
</li></ul>
</li></ul>
<ul>
<li>&quot;History.xml&quot; (the list of last twenty files/devices attempted to be mounted as VeraCrypt volumes or attempted to be used as hosts for VeraCrypt volumes; this feature can be disabled &ndash; for more information, see the section
<em>Never Save History</em>)
<ul>
<li>Note: This file may be absent if the corresponding VeraCrypt feature is not used.
</li></ul>
</li></ul>
<ul>
<li>&quot;In-Place Encryption&quot; (temporary configuration file used during the initial process of in-place encryption/decryption of a non-system volume).
</li></ul>
<ul>
<li>&quot;In-Place Encryption Wipe Algo&quot; (temporary configuration file used during the initial process of in-place encryption/decryption of a non-system volume).
</li></ul>
<ul>
<li>&quot;Post-Install Task - Tutorial&quot; (temporary configuration file used during the process of installation or upgrade of VeraCrypt).
</li></ul>
<ul>
<li>&quot;Post-Install Task - Release Notes&quot; (temporary configuration file used during the process of installation or upgrade of VeraCrypt).
</li></ul>
<p>The following files are saved in the folder %ALLUSERSPROFILE%\VeraCrypt\:</p>
<ul>
<li>&quot;Original System Loader&quot; (a backup of the original content of the first drive track made before the VeraCrypt Boot Loader was written to it).
<ul>
<li>Note: This file is absent if the system partition/drive has not been encrypted.
</li></ul>
</li></ul>
<p>The following files are saved in the folder %windir%\system32 (32-bit systems) or %windir%\SysWOW64 (64-bit systems):</p>
<ul>
<li>&quot;VeraCrypt System Favorite Volumes.xml&quot;
<ul>
<li>Note: This file may be absent if the corresponding VeraCrypt feature is not used.
</li></ul>
</li></ul>
<ul>
<li>VeraCrypt.exe
<ul>
<li>Note: A copy of this file is located in this folder only when mounting of system favorite volumes is enabled.
</li></ul>
</li></ul>
<p>&nbsp;</p>
</div>
</div><div class="ClearBoth"></div></body></html>