/*
Copyright (c) 2008 TrueCrypt Developers Association. All rights reserved.
Governed by the TrueCrypt License 3.0 the full text of which is contained in
the file License.txt included in TrueCrypt binary and source code distribution
packages.
*/
#include "Crypto.h"
#include "Platform.h"
#include "BootConfig.h"
#include "BootDebug.h"
#include "BootDefs.h"
#include "BootDiskIo.h"
#include "BootEncryptedIo.h"
BiosResult ReadEncryptedSectors (uint16 destSegment, uint16 destOffset, byte drive, uint64 sector, uint16 sectorCount)
{
BiosResult result;
bool decrypt = true;
if (BootCryptoInfo->hiddenVolume)
{
if (ReadWritePartiallyCoversEncryptedArea (sector, sectorCount))
return BiosResultInvalidFunction;
if (sector >= EncryptedVirtualPartition.StartSector && sector <= EncryptedVirtualPartition.EndSector)
{
// Remap the request to the hidden volume
sector -= EncryptedVirtualPartition.StartSector;
sector += HiddenVolumeStartSector;
}
else
decrypt = false;
}
result = ReadSectors (destSegment, destOffset, drive, sector, sectorCount);
if (result != BiosResultSuccess || !decrypt)
return result;
if (BootCryptoInfo->hiddenVolume)
{
// Convert sector number to data unit number of the hidden volume
sector -= HiddenVolumeStartSector;
sector += HiddenVolumeStartUnitNo;
}
if (drive == EncryptedVirtualPartition.Drive)
{
while (sectorCount-- > 0)
{
if (BootCryptoInfo->hiddenVolume
|| (sector >= EncryptedVirtualPartition.StartSector && sector <= EncryptedVirtualPartition.EndSector))
{
AcquireSectorBuffer();
CopyMemory (destSegment, destOffset, SectorBuffer, TC_LB_SIZE);
DecryptDataUnits (SectorBuffer, §or, 1, BootCryptoInfo);
CopyMemory (SectorBuffer, destSegment, destOffset, TC_LB_SIZE);
ReleaseSectorBuffer();
}
++sector;
destOffset += TC_LB_SIZE;
}
}
return result;
}
BiosResult WriteEncryptedSectors (uint16 sourceSegment, uint16 sourceOffset, byte drive, uint64 sector, uint16 sectorCount)
{
BiosResult result;
AcquireSectorBuffer();
uint64 dataUnitNo;
uint64 writeOffset;
dataUnitNo = sector;
writeOffset.HighPart = 0;
writeOffset.LowPart = 0;
if (BootCryptoInfo->hiddenVolume)
{
if (ReadWritePartiallyCoversEncryptedArea (sector, sectorCount))
return BiosResultInvalidFunction;
// Remap the request to the hidden volume
writeOffset = HiddenVolumeStartSector;
writeOffset -= EncryptedVirtualPartition.StartSector;
dataUnitNo -= EncryptedVirtualPartition.StartSector;
dataUnitNo += HiddenVolumeStartUnitNo;
}
while (sectorCount-- > 0)
{
CopyMemory (sourceSegment, sourceOffset, SectorBuffer, TC_LB_SIZE);
if (drive == EncryptedVirtualPartition.Drive && sector >= EncryptedVirtualPartition.StartSector && sector <= EncryptedVirtualPartition.EndSector)
{
EncryptDataUnits (SectorBuffer, &dataUnitNo, 1, BootCryptoInfo);
}
result = WriteSectors (SectorBuffer, drive, sector + writeOffset, 1);
if (result != BiosResultSuccess)
break;
++sector;
++dataUnitNo;
sourceOffset += TC_LB_SIZE;
}
ReleaseSectorBuffer();
return result;
}
static bool ReadWritePartiallyCoversEncryptedArea (const uint64 §or, uint16 sectorCount)
{
uint64 readWriteEnd = sector + --sectorCount;
return ((sector < EncryptedVirtualPartition.StartSector && readWriteEnd >= EncryptedVirtualPartition.StartSector)
|| (sector >= EncryptedVirtualPartition.StartSector && readWriteEnd > EncryptedVirtualPartition.EndSector));
}
f0181b02fb421a4458c0'>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
|
<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="Supported%20Operating%20Systems.html">Supported Operating Systems</a>
</p></div>
<div class="wikidoc">
<h1>Supported Operating Systems</h1>
<div style="text-align:left; margin-top:19px; margin-bottom:19px; padding-top:0px; padding-bottom:0px">
VeraCrypt currently supports the following operating systems:</div>
<ul 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">
Windows 10 </li><li style="text-align:left; margin-top:0px; margin-bottom:0px; padding-top:0px; padding-bottom:0px">
Windows 8 and 8.1 </li><li style="text-align:left; margin-top:0px; margin-bottom:0px; padding-top:0px; padding-bottom:0px">
Windows 7 </li><li style="text-align:left; margin-top:0px; margin-bottom:0px; padding-top:0px; padding-bottom:0px">
Windows Vista </li><li style="text-align:left; margin-top:0px; margin-bottom:0px; padding-top:0px; padding-bottom:0px">
Windows XP </li><li style="text-align:left; margin-top:0px; margin-bottom:0px; padding-top:0px; padding-bottom:0px">
Windows Server 2012 </li><li style="text-align:left; margin-top:0px; margin-bottom:0px; padding-top:0px; padding-bottom:0px">
Windows Server 2008 R2 (64-bit) </li><li style="text-align:left; margin-top:0px; margin-bottom:0px; padding-top:0px; padding-bottom:0px">
Windows Server 2008 </li><li style="text-align:left; margin-top:0px; margin-bottom:0px; padding-top:0px; padding-bottom:0px">
Windows Server 2003 </li><li style="text-align:left; margin-top:0px; margin-bottom:0px; padding-top:0px; padding-bottom:0px">
Mac OS X 10.12 Sierra </li><li style="text-align:left; margin-top:0px; margin-bottom:0px; padding-top:0px; padding-bottom:0px">
Mac OS X 10.11 El Capitan </li><li style="text-align:left; margin-top:0px; margin-bottom:0px; padding-top:0px; padding-bottom:0px">
Mac OS X 10.10 Yosemite </li><li style="text-align:left; margin-top:0px; margin-bottom:0px; padding-top:0px; padding-bottom:0px">
Mac OS X 10.9 Mavericks </li><li style="text-align:left; margin-top:0px; margin-bottom:0px; padding-top:0px; padding-bottom:0px">
Mac OS X 10.8 Mountain Lion </li><li style="text-align:left; margin-top:0px; margin-bottom:0px; padding-top:0px; padding-bottom:0px">
Mac OS X 10.7 Lion </li><li style="text-align:left; margin-top:0px; margin-bottom:0px; padding-top:0px; padding-bottom:0px">
Mac OS X 10.6 Snow Leopard </li><li style="text-align:left; margin-top:0px; margin-bottom:0px; padding-top:0px; padding-bottom:0px">
Linux x86 (32-bit and 64-bit versions, kernel 2.6 or compatible) </li></ul>
<div style="text-align:left; margin-top:19px; margin-bottom:19px; padding-top:0px; padding-bottom:0px">
<br style="text-align:left">
<span style="text-align:left; font-size:10px; line-height:12px">Note: The following operating systems (among others) are not supported: Windows RT, Windows 2003 IA-64, Windows 2008 IA-64, Windows XP IA-64, and the Embedded/Tablet versions of Windows.</span></div>
<p><br style="text-align:left">
<br style="text-align:left">
Also see the section <strong style="text-align:left"><a href="Supported%20Systems%20for%20System%20Encryption.html" style="text-align:left; color:#0080c0; text-decoration:none.html">Operating Systems Supported for System
Encryption</a></strong></p>
</div>
</body></html>
|