Total Pageviews

Wednesday, 26 September 2012

TrueCrypt Tutorial


TrueCrypt is a software system for establishing and maintaining an on-the-fly-encrypted volume (data storage device). On-the-fly encryption means that data is automatically encrypted right before it is saved and decrypted right after it is loaded, without any user intervention. No data stored on an encrypted volume can be read (decrypted) without using the correct password/keyfile(s) or correct encryption keys. Entire file system is encrypted (e.g., file names, folder names, contents of every file, free space, meta data, etc).


TrueCrypt can currently encrypt the following operating systems:
  • Windows 7  (32-bit and 64-bit)
  • Windows Vista
  • Windows Vista x64 (64-bit) Edition
  • Windows XP
  • Windows XP x64 (64-bit) Edition
  • Windows Server 2008 R2 (64-bit)
  • Windows Server 2008
  • Windows Server 2008 x64 (64-bit)
  • Windows Server 2003
  • Windows Server 2003 x64 (64-bit)
  • Windows 2000 SP4
  • Mac OS X 10.7 Lion  (64-bit and 32-bit)
  • Mac OS X 10.6 Snow Leopard  (32-bit)
  • Mac OS X 10.5 Leopard
  • Mac OS X 10.4 Tiger
  • Linux (32-bit and 64-bit versions, kernel 2.6 or compatible)

Downloads (.exe and PGP signature)

How to Create and Use a TrueCrypt Container (Tutorial)
Step 1:
If you have not done so, download and install TrueCrypt. Then launch TrueCrypt by double-clicking the file TrueCrypt.exe or by clicking the TrueCrypt shortcut in your Windows Start menu.
Step 2:
The main TrueCrypt window should appear. Click Create Volume (marked with a red rectangle for clarity)
Step 3:
The TrueCrypt Volume Creation Wizard window should appear.
In this step you need to choose where you wish the TrueCrypt volume to be created. A TrueCrypt volume can reside in a file, which is also called container, in a partition or drive. In this tutorial, we will choose the first option and create a TrueCrypt volume within a file.
As the option is selected by default, you can just click Next
Note: In the following steps, the screenshots will show only the right-hand part of the Wizard window.
Step 4:
In this step you need to choose whether to create a standard or hidden TrueCrypt volume. In this tutorial, we will choose the former option and create a standard TrueCrypt volume.
As the option is selected by default, you can just click Next.
Step 5:
In this step you have to specify where you wish the TrueCrypt volume (file container) to be created. Note that a TrueCrypt container is just like any normal file. It can be, for example, moved or deleted as any normal file. It also needs a filename, which you will choose in the next step.
Click Select File.
The standard Windows file selector should appear (while the window of the TrueCrypt Volume Creation Wizard remains open in the background).
Step 6:
In this tutorial, we will create our TrueCrypt volume in the folder D:\My Documents\and the filename of the volume (container) will be My Volume (as can be seen in the screenshot above). You may, of course, choose any other filename and location you like (for example, on a USB memory stick). Note that the file My Volume does not exist yet – TrueCrypt will create it.
IMPORTANTNote that TrueCrypt will not encrypt any existing files (when creating a TrueCrypt file container). If you select an existing file in this step, it will be overwritten and replaced by the newly created volume (so the overwritten file will belostnot encrypted). You will be able to encrypt existing files (later on) by moving them to the TrueCrypt volume that we are creating now.*
Select the desired path (where you wish the container to be created) in the file selector.
Type the desired container filename in the File name box.
Click Save.
The file selector window should disappear.
In the following steps, we will return to the TrueCrypt Volume Creation Wizard.
* Note that after you copy existing unencrypted files to a TrueCrypt volume, you should securely erase (wipe) the original unencrypted files. There are software tools that can be used for the purpose of secure erasure (many of them are free).
Step 7:
In the Volume Creation Wizard window, click Next.
Step 8:
Here you can choose an encryption algorithm and a hash algorithm for the volume. If you are not sure what to select here, you can use the default settings and clickNext
Here is some technical details, but not part of actual installation, you may skip this and go straight to step 9.

TrueCrypt volumes can be encrypted using the following algorithms:
Algorithm -Key size (bits)-Block size (bits) 
AES -256-128
Serpent -256-128
Twofish -256 -128
AES-Twofish -256;256 -128
AES-Twofish-Serpent-256;256;256 -128
Serpent-AES -256;256-128
Serpent-Twofish-AES -256;256;256-128
Twofish-Serpent -256;256 -128
The mode of operation used by TrueCrypt for encrypted partitions, drives, and virtual volumes is XTS.

TrueCrypt currently supports the following hash algorithms:
  • RIPEMD-160
  • SHA512
  • Whirlpool
Now back to installation:
Step 9:
Here we specify that we wish the size of our TrueCrypt container to be 1 megabyte. You may, of course, specify a different size. After you type the desired size in the input field (marked with a red rectangle), click Next.
Step 10:
This is one of the most important steps. Here you have to choose a good volume password.

Read carefully the information displayed in the Wizard window about what is considered a good password.
After you choose a good password, type it in the first input field. Then re-type it in the input field below the first one and click Next.
Step 11:
Move your mouse as randomly as possible within the Volume Creation Wizard window at least for 30 seconds. The longer you move the mouse, the better. This significantly increases the cryptographic strength of the encryption keys (which increases security).
Click Format.
Volume creation should begin. TrueCrypt will now create a file called My Volume in the folder D:\My Documents\ (as we specified in Step 6). This file will be a TrueCrypt container (it will contain the encrypted TrueCrypt volume). Depending on the size of the volume, the volume creation may take a long time. After it finishes, the following dialog box will appear:
Click OK to close the dialog box.
Step 12:
We have just successfully created a TrueCrypt volume (file container).
In the TrueCrypt Volume Creation Wizard window, click Exit.
The Wizard window should disappear.

In the remaining steps, we will mount the volume we just created. We will return to the main TrueCrypt window (which should still be open, but if it is not, repeat Step 1 to launch TrueCrypt and then continue from Step 13.)
Step 13:
Select a drive letter from the list (marked with a red rectangle). This will be the drive letter to which the TrueCrypt container will be mounted.

Note: In this tutorial, we chose the drive letter M, but you may of course choose any other available drive letter.
Step 14:
Click Select File.
The standard file selector window should appear.
Step 15:
In the file selector, browse to the container file (which we created in Steps 6-11) and select it.
Click Open (in the file selector window).
The file selector window should disappear.

In the following steps, we will return to the main TrueCrypt window.
Step 16:
In the main TrueCrypt window, click Mount.
Password prompt dialog window should appear.
Step 17:
Type the password (which you specified in Step 10) in the password input field (marked with a red rectangle).
Step 18:
Click OK in the password prompt window.
TrueCrypt will now attempt to mount the volume. If the password is incorrect (for example, if you typed it incorrectly), TrueCrypt will notify you and you will need to repeat the previous step (type the password again and click OK). If the password is correct, the volume will be mounted.
Final Step:
We have just successfully mounted the container as a virtual disk M:
The virtual disk is entirely encrypted (including file names, allocation tables, free space, etc.) and behaves like a real disk. You can save (or copy, move, etc.) files to this virtual disk and they will be encrypted on the fly as they are being written.
If you open a file stored on a TrueCrypt volume, for example, in media player, the file will be automatically decrypted to RAM (memory) on-the-fly while it is being read.

Important: Note that when you open a file stored on a TrueCrypt volume (or when you write/copy a file to/from the TrueCrypt volume) you will not be asked to enter the password again. You need to enter the correct password only when mounting the volume.
You can open the mounted volume, for example, by double-clicking the item marked with a red rectangle in the screenshot above.
You can also browse to the mounted volume the way you normally browse to any other types of volumes. For example, by opening the ‘Computer’ (or ‘My Computer’) list and double clicking the corresponding drive letter (in this case, it is the letter M).
You can copy files (or folders) to and from the TrueCrypt volume just as you would copy them to any normal disk (for example, by simple drag-and-drop operations). Files that are being read or copied from the encrypted TrueCrypt volume are automatically decrypted on the fly in RAM (memory). Similarly, files that are being written or copied to the TrueCrypt volume are automatically encrypted on the fly in RAM (right before they are written to the disk).
Note that TrueCrypt never saves any decrypted data to a disk – it only stores them temporarily in RAM (memory). Even when the volume is mounted, data stored in the volume is still encrypted. When you restart Windows or turn off your computer, the volume will be dismounted and all files stored on it will be inaccessible (and encrypted). Even when power supply is suddenly interrupted (without proper system shut down), all files stored on the volume will be inaccessible (and encrypted). To make them accessible again, you have to mount the volume. To do so, repeat Steps 13-18.

If you want to close the volume and make files stored on it inaccessible, either restart your operating system or dismount the volume. To do so, follow these steps:
Select the volume from the list of mounted volumes in the main TrueCrypt window (marked with a red rectangle in the screenshot above) and then click Dismount(also marked with a red rectangle in the screenshot above). To make files stored on the volume accessible again, you will have to mount the volume. To do so, repeat Steps 13-18.
How to create and use a TrueCrypt-encrypted partition/device:
Instead of creating file containers, you can also encrypt physical partitions or drives (i.e., create TrueCrypt device-hosted volumes). To do so, repeat the steps 1-3, but in the step 3 select the second or third option. Then follow the remaining instructions in the wizard. When you create a device-hosted TrueCrypt volume within a non-system partition/drive, you can mount it by clicking Auto-Mount Devices in the main TrueCrypt window.
System Encryption:
TrueCrypt can on-the-fly encrypt a system partition or entire system drive, i.e. a partition or drive where Windows is installed and from which it boots.
System encryption provides the highest level of security and privacy, because all files, including any temporary files that Windows and applications create on the system partition (typically, without your knowledge or consent), hibernation files, swap files, etc., are always permanently encrypted (even when power supply is suddenly interrupted). Windows also records large amounts of potentially sensitive data, such as the names and locations of files you open, applications you run, etc. All such log files and registry entries are always permanently encrypted too.
System encryption involves pre-boot authentication, which means that anyone who wants to gain access and use the encrypted system, read and write files stored on the system drive, etc., will need to enter the correct password each time before Windows boots (starts). Pre-boot authentication is handled by the TrueCrypt Boot Loader, which resides in the first track of the boot drive and on the TrueCrypt Rescue Disc*
TrueCrypt Rescue Disc:
During the process of preparing the encryption of a system partition/drive, TrueCrypt requires that you create a so-called TrueCrypt Rescue Disk (CD/DVD), which serves the following purposes:
  • If the TrueCrypt Boot Loader screen does not appear after you start your computer (or if Windows does not boot), the TrueCrypt Boot Loader may be damaged. The TrueCrypt Rescue Disk allows you restore it and thus to regain access to your encrypted system and data (however, note that you will still have to enter the correct password then). In the Rescue Disk screen, select Repair Options > Restore TrueCrypt Boot Loader. Then press ‘Y’ to confirm the action, remove the Rescue Disk from your CD/DVD drive and restart your computer.
  • If the TrueCrypt Boot Loader is frequently damaged (for example, by inappropriately designed activation software) or if you do not want the TrueCrypt boot loader to reside on the hard drive (for example, if you want to use an alternative boot loader/manager for other operating systems), you can boot directly from the TrueCrypt Rescue Disk (as it contains the TrueCrypt boot loader too) without restoring the boot loader to the hard drive. Just insert your Rescue Disk into your CD/DVD drive and then enter your password in the Rescue Disk screen.
  • If you repeatedly enter the correct password but TrueCrypt says that the password is incorrect, it is possible that the master key or other critical data are damaged. The TrueCrypt Rescue Disk allows you to restore them and thus to regain access to your encrypted system and data (however, note that you will still have to enter the correct password then). In the Rescue Disk screen, select Repair Options > Restore key data. Then enter your password, press ‘Y’ to confirm the action, remove the Rescue Disk from your CD/DVD drive, and restart your computer.

    Note: This feature cannot be used to restore the header of a hidden volume within which a hidden operating system resides. To restore such a volume header, click Select Device, select the partition behind the decoy system partition, click OK, select Tools > Restore Volume Header and then follow the instructions.

    WARNING: By restoring key data using a TrueCrypt Rescue Disk, you also restore the password that was valid when the TrueCrypt Rescue Disk was created. Therefore, whenever you change the password, you should destroy your TrueCrypt Rescue Disk and create a new one (select System -> Create Rescue Disk). Otherwise, if an attacker knows your old password (for example, captured by a keystroke logger) and if he then finds your old TrueCrypt Rescue Disk, he could use it to restore the key data (the master key encrypted with the old password) and thus decrypt your system partition/drive
  • If Windows is damaged and cannot start, the TrueCrypt Rescue Disk allows you to permanently decrypt the partition/drive before Windows starts. In the Rescue Disk screen, select Repair Options > Permanently decrypt system partition/drive. Enter the correct password and wait until decryption is complete. Then you can e.g. boot your MS Windows setup CD/DVD to repair your Windows installation. Note that this feature cannot be used to decrypt a hidden volume within which a hidden operating system resides.

    Note: Alternatively, if Windows is damaged (cannot start) and you need to repair it (or access files on it), you can avoid decrypting the system partition/drive by following these steps: Boot another operating system, run TrueCrypt, click Select Device, select the affected system partition, selectSystem > Mount Without Pre-Boot Authentication, enter your pre-boot-authentication password and click OK. The partition will be mounted as a regular TrueCrypt volume (data will be on-the-fly decrypted/encrypted in RAM on access, as usual).
  • Your TrueCrypt Rescue Disk contains a backup of the original content of the first drive track (made before the TrueCrypt Boot Loader was written to it) and allows you to restore it if necessary. The first track of a boot drive typically contains a system loader or boot manager. In the Rescue Disk screen, select Repair Options > Restore original system loader.
Note that even if you lose your TrueCrypt Rescue Disk and an attacker finds it, he or she will not be able to decrypt the system partition or drive without the correct password.
To boot a TrueCrypt Rescue Disk, insert it into your CD/DVD drive and restart your computer. If the TrueCrypt Rescue Disk screen does not appear (or if you do not see the ‘Repair Options’ item in the ‘Keyboard Controls’ section of the screen), it is possible that your BIOS is configured to attempt to boot from hard drives before CD/DVD drives. If that is the case, restart your computer, press F2 or Delete (as soon as you see a BIOS start-up screen), and wait until a BIOS configuration screen appears. If no BIOS configuration screen appears, restart (reset) the computer again and start pressing F2 or Delete repeatedly as soon as you restart (reset) the computer. When a BIOS configuration screen appears, configure your BIOS to boot from the CD/DVD drive first (for information on how to do so, please refer to the documentation for your BIOS/motherboard or contact your computer vendor’s technical support team for assistance). Then restart your computer. The TrueCrypt Rescue Disk screen should appear now. Note: In the TrueCrypt Rescue Disk screen, you can select ‘Repair Options’ by pressing F8 on your keyboard.
If your TrueCrypt Rescue Disk is damaged, you can create a new one by selectingSystem > Create Rescue Disk. To find out whether your TrueCrypt Rescue Disk is damaged, insert it into your CD/DVD drive and select System > Verify Rescue Disk.
Note that TrueCrypt can encrypt an existing unencrypted system partition/drive in-place while the operating system is running (while the system is being encrypted, you can use your computer as usual without any restrictions). Likewise, a TrueCrypt-encrypted system partition/drive can be decrypted in-place while the operating system is running. You can interrupt the process of encryption or decryption anytime, leave the partition/drive partially unencrypted, restart or shut down the computer, and then resume the process, which will continue from the point it was stopped.
To encrypt a system partition or entire system drive, select System > Encrypt System Partition/Drive and then follow the instructions in the wizard. To decrypt a system partition/drive, select System > Permanently Decrypt System Partition/Drive.
Note: By default, Windows 7 and later boot from a special small partition. The partition contains files that are required to boot the system. Windows allows only applications that have administrator privileges to write to the partition (when the system is running). TrueCrypt encrypts the partition only if you choose to encrypt the whole system drive (as opposed to choosing to encrypt only the partition where Windows is installed).

Technical Details:
Notation:
C Cipher text block

DK() Decryption algorithm using encryption/decryption key K

EK() Encryption algorithm using encryption/decryption key K

H() Hash function

i Block index for n-bit blocks; n is context-dependent

K Cryptographic key

P Plaintext block

^ Bitwise exclusive-OR operation (XOR)

Addition Modulo 2n addition, where n is the bit size of the left-most operand and of the resultant value (e.g., if the left operand is a 1-bit value, and the right operand is a 2-bit value, then: 1 Addition 0 = 1; 1 Addition 1 = 0;   1 Addition 2 = 1;   1 Addition 3 = 0;   0 Addition 0 = 0;   0 Addition 1 = 1;   0 Addition 2 = 0;   0 Addition 3 = 1)

Multiplication Modular multiplication of two polynomials over the binary field GF(2), modulox128+x7+x2+x+1 (GF stands for Galois Field)

|| Concatenation
Encryption scheme:
When mounting a TrueCrypt volume (assume there are no cached passwords/keyfiles) or when performing pre-boot authentication, the following steps are performed:
  1. The first 512 bytes of the volume (i.e., the standard volume header) are read into RAM, out of which the first 64 bytes are the salt (see Truecrypt volume format specification). For system encryption (see system encryption), the last 512 bytes of the first logical drive track are read into RAM (the TrueCrypt Boot Loader is stored in the first track of the system drive and/or on the TrueCrypt Rescue Disk).
  2. Bytes 65536–66047 of the volume are read into RAM (see truecrypt volume format specification). For system encryption, bytes 65536–66047 of the first partition located behind the active partition* are read into RAM (see hidden operating system). If there is a hidden volume within this volume (or within the partition behind the active partition), we have read its header at this point; otherwise, we have just read random data (whether or not there is a hidden volume within it has to be determined by attempting to decrypt this data; for more information see the section hidden volume).
  3. Now TrueCrypt attempts to decrypt the standard volume header read in (1). All data used and generated in the course of the process of decryption are kept in RAM (TrueCrypt never saves them to disk). The following parameters are unknown** and have to be determined through the process of trial and error (i.e., by testing all possible combinations of the following):
    1. PRF used by the header key derivation function (as specified in PKCS #5 v2.0; see header key deviration, salt and iteration count), which can be one of the following:

      HMAC-SHA-512, HMAC-RIPEMD-160, HMAC-Whirlpool.

      A password entered by the user (to which one or more keyfiles may have been applied – see keyfiles) and the salt read in are passed to the header key derivation function, which produces a sequence of values (see header key derivation, salt and iteriation count) from which the header encryption key and secondary header key (XTC mode) are formed. (These keys are used to decrypt the volume header.)
    2. Encryption algorithm: AES-256, Serpent, Twofish, AES-Serpent, AES-Twofish-Serpent, etc.
    3. Mode of operation:  XTS, LRW (deprecated/legacy), CBC (deprecated/legacy)
    4. Key size(s)
  4. Decryption is considered successful if the first 4 bytes of the decrypted data contain the ASCII string “TRUE”, and if the CRC-32 checksum of the last 256 bytes of the decrypted data (volume header) matches the value located at byte #8 of the decrypted data (this value is unknown to an adversary because it is encrypted – see the section Header key derivation, salt and iteration count). If these conditions are not met, the process continues from (3) again, but this time, instead of the data read in (1), the data read in (2) are used (i.e., possible hidden volume header). If the conditions are not met again, mounting is terminated (wrong password, corrupted volume, or not a TrueCrypt volume).
  5. Now we know (or assume with very high probability) that we have the correct password, the correct encryption algorithm, mode, key size, and the correct header key derivation algorithm. If we successfully decrypted the data read in (2), we also know that we are mounting a hidden volume and its size is retrieved from data read in (2) decrypted in (3).
  6. The encryption routine is reinitialized with the primary master key*** and the secondary key (XTC mode), which are retrieved from the decrypted volume header (see the section TrueCrypt volume format specification). These keys can be used to decrypt any sector of the volume, except the volume header area (or the key data area, for system encryption), which has been encrypted using the header keys. The volume is mounted.
* If the size of the active partition is less than 256 MB, then the data is read from thesecond partition behind the active one (Windows 7 and later, by default, do not boot from the partition on which they are installed).
** These parameters are kept secret not in order to increase the complexity of an attack, but primarily to make TrueCrypt volumes unidentifiable (indistinguishable from random data), which would be difficult to achieve if these parameters were stored unencrypted within the volume header. Also note that if a non-cascaded encryption algorithm is used for system encryption, the algorithm is known (it can be determined by analyzing the contents of the unencrypted TrueCrypt Boot Loader stored in the first logical drive track or on the TrueCrypt Rescue Disk).
*** The master keys were generated during the volume creation and cannot be changed later. Volume password change is accomplished by re-encrypting the volume header using a new header key (derived from a new password).
The mode of operation used by TrueCrypt for encrypted partitions, drives, and virtual volumes is XTS.

XTS mode is in fact XEX mode [12], which was designed by Phillip Rogaway in 2003, with a minor modification (XEX mode uses a single key for two different purposes, whereas XTS mode uses two independent keys).

In 2010, XTS mode was approved by NIST for protecting the confidentiality of data on storage devices [24]. In 2007, it was also approved by the IEEE for cryptographic protection of data on block-oriented storage devices (IEEE 1619).

Modes of Operation:
The mode of operation used by TrueCrypt for encrypted partitions, drives, and virtual volumes is XTS.
Description of XTS mode:
Ci = EK1(Pi ^ (EK2(nMultiplicationai)) ^ (EK2(nMultiplicationai)
Where:
Multiplication  
denotes multiplication of two polynomials over the binary field GF(2) modulox128+x7+x2+x+1

K1
is the encryption key (256-bit for each supported cipher; i.e, AES, Serpent, and Twofish)

K2
is the secondary key (256-bit for each supported cipher; i.e, AES, Serpent, and Twofish)

i
is the cipher block index within a data unit;   for the first cipher block within a data unit, i = 0

n
is the data unit index within the scope of K1;   for the first data unit, n = 0

a
is a primitive element of Galois Field (2128) that corresponds to polynomial x (i.e., 2)

The size of each data unit is always 512 bytes (regardless of the sector size).

Header key derivation, salt and iteration count:
Header key is used to encrypt and decrypt the encrypted area of the TrueCrypt volume header (for system encryption, of the keydata area), which contains the master key and other data. The method that TrueCrypt uses to generate the header key and the secondary header key (XTS mode) is PBKDF2, specified in PKCS #5 v2.0;
512-bit salt is used, which means there are 2512 keys for each password. This significantly decreases vulnerability to ‘off-line’ dictionary/’rainbow table’ attacks (pre-computing all the keys for a dictionary of passwords is very difficult when a salt is used). The salt consists of random values generated by the TrueCrypt random number generator during the volume creation process. The header key derivation function is based on HMAC-SHA-512, HMAC-RIPEMD-160, or HMAC-Whirlpool  – the user selects which. The length of the derived key does not depend on the size of the output of the underlying hash function. For example, a header key for the AES-256 cipher is always 256 bits long even if HMAC-RIPEMD-160 is used (in XTS mode, an additional 256-bit secondary header key is used; hence, two 256-bit keys are used for AES-256 in total). 1000 iterations (or 2000 iterations when HMAC-RIPEMD-160 is used as the underlying hash function) of the key derivation function have to be performed to derive a header key, which increases the time necessary to perform an exhaustive search for passwords (i.e., brute force attack)
Header keys used by ciphers in a cascade are mutually independent, even though they are derived from a single password (to which keyfiles may have been applied). For example, for the AES-Twofish-Serpent cascade, the header key derivation function is instructed to derive a 768-bit encryption key from a given password (and, for XTS mode, in addition, a 768-bit secondary header key from the given password). The generated 768-bit header key is then split into three 256-bit keys (for XTS mode, the secondary header key is split into three 256-bit keys too, so the cascade actually uses six 256-bit keys in total), out of which the first key is used by Serpent, the second key is used by Twofish, and the third by AES (in addition, for XTS mode, the first secondary key is used by Serpent, the second secondary key is used by Twofish, and the third secondary key by AES). Hence, even when an adversary has one of the keys, he cannot use it to derive the other keys, as there is no feasible method to determine the password from which the key was derived (except for brute force attack mounted on a weak password).

Random number generator:
The random number generator (RNG) is used to generate the master encryption key, the secondary key (XTC,mode), salt, and keyfiles. It creates a pool of random values in RAM (memory). The pool, which is 320 bytes long, is filled with data from the following sources:
  • Mouse movements
  • Keystrokes
  • Mac OS X and Linux: Values generated by the built-in RNG (both/dev/random and /dev/urandom)
  • MS Windows: Windows CryptoAPI (collected regularly at 500-ms interval)
  • MS Windows: Network interface statistics (NETAPI32)
  • MS Windows: Various Win32 handles, time variables, and counters (collected regularly at 500-ms interval)
Before a value obtained from any of the above-mentioned sources is written to the pool, it is divided into individual bytes (e.g., a 32-bit number is divided into four bytes). These bytes are then individually written to the pool with the modulo 28addition operation (not by replacing the old values in the pool) at the position of the pool cursor. After a byte is written, the pool cursor position is advanced by one byte. When the cursor reaches the end of the pool, its position is set to the beginning of the pool. After every 16th byte written to the pool, the pool mixing function is applied to the entire pool.

Pool Mixing Function:
The purpose of this function is to perform diffusion. Diffusion spreads the influence of individual “raw” input bits over as much of the pool state as possible, which also hides statistical relationships. After every 16th byte written to the pool, this function is automatically applied to the entire pool.
Description of the pool mixing function:
  1. Let R be the randomness pool.
  2. Let H be the hash function selected by the user (SHA-512, RIPEMD-160, or Whirlpool).
  3. l = byte size of the output of the hash function H (i.e., if H is RIPEMD-160, then l = 20; if is SHA-512, = 64)
  4. z = byte size of the randomness pool R   (320 bytes)
  5. q = – 1    (e.g., if is Whirlpool, then q = 4)
  6. R is divided into l-byte blocks B0Bq.
    For 0 < i < (i.e., for each block B) the following steps are performed:
    1. M = H (B0 || B1 || … || Bq)    [i.e., the randomness pool is hashed using the hash function H, which produces a hash M]
    2. Bi = Bi ^ M
  7. R = B0 || B1 || … || Bq
For example, if q = 1, the randomness pool would be mixed as follows:
  1. (B0 || B1) = R
  2. B0 = B0 ^ H(B0 || B1)
  3. B1 = B1 ^ H(B0 || B1)
  4. B0 || B1

Generated Values:
The content of the RNG pool is never directly exported (even when TrueCrypt instructs the RNG to generate and export a value). Thus, even if the attacker obtains a value generated by the RNG, it is infeasible for him to determine or predict (using the obtained value) any other values generated by the RNG during the session (it is infeasible to determine the content of the pool from a value generated by the RNG).
The RNG ensures this by performing the following steps whenever TrueCrypt instructs it to generate and export a value:
  1. Data obtained from some of the sources listed above is added to the pool as described above.
  2. The requested number of bytes is copied from the pool to the output buffer (the copying starts from the position of the pool cursor; when the end of the pool is reached, the copying continues from the beginning of the pool; if the requested number of bytes is greater than the size of the pool, no value is generated and an error is returned).
  3. The state of each bit in the pool is inverted (i.e., 0 is changed to 1, and 1 is changed to 0).
  4. Data obtained from some of the sources listed above is added to the pool as described above.
  5. The content of the pool is transformed using the pool mixing function. Note: The function uses a cryptographically secure one-way hash function selected by the user (for more information, see the section Pool Mixing Functionabove).
  6. The transformed content of the pool is XORed into the output buffer as follows:
    1. The output buffer write cursor is set to 0 (the first byte of the buffer).
    2. The byte at the position of the pool cursor is read from the pool and XORed into the byte in the output buffer at the position of the output buffer write cursor.
    3. The pool cursor position is advanced by one byte. If the end of the pool is reached, the cursor position is set to 0 (the first byte of the pool).
    4. The position of the output buffer write cursor is advanced by one byte.
    5. Steps b-d are repeated for each remaining byte of the output buffer (whose length is equal to the requested number of bytes).
  7. The content of the output buffer, which is the final value generated by the RNG, is exported.

Keyfiles:
TrueCrypt keyfile is a file whose content is combined with a password. The user can use any kind of file as a TrueCrypt keyfile. The user can also generate a keyfile using the built-in keyfile generator, which utilizes the TrueCrypt RNG to generate a file with random content.
The maximum size of a keyfile is not limited; however, only its first 1,048,576 bytes (1 MB) are processed (all remaining bytes are ignored due to performance issues connected with processing extremely large files). The user can supply one or more keyfiles (the number of keyfiles is not limited).
Keyfiles can be stored on PKCS-11-compliant, security tokens and smart cards protected by multiple PIN codes (which can be entered either using a hardware PIN pad or via the TrueCrypt GUI).
  1. Let be a TrueCrypt volume password supplied by user (may be empty)
  2. Let KP be the keyfile pool
  3. Let kpl be the size of the keyfile pool KP, in bytes (64, i.e., 512 bits);
    kpl must be a multiple of the output size of a hash function H
  4. Let pl be the length of the password P, in bytes (in the current version: 0 < pl< 64)
  5. if kpl > pl, append (kpl – pl) zero bytes to the password P (thus pl = kpl)
  6. Fill the keyfile pool KP with kpl zero bytes.
  7. For each keyfile perform the following steps:
  1. Set the position of the keyfile pool cursor to the beginning of the pool
  2. Initialize the hash function H
  3. Load all bytes of the keyfile one by one, and for each loaded byte perform the following steps:
  1. Hash the loaded byte using the hash function H without initializing the hash, to obtain an intermediate hash (state) M. Do not finalize the hash (the state is retained for next round).
  2. Divide the state into individual bytes.
    For example, if the hash output size is 4 bytes, (T0 || T1 || T2 || T3) = M
  3. Write these bytes (obtained in step 7.c.ii) individually to the keyfile pool with the modulo 28 addition operation (not by replacing the old values in the pool) at the position of the pool cursor. After a byte is written, the pool cursor position is advanced by one byte. When the cursor reaches the end of the pool, its position is set to the beginning of the pool.
Apply the content of the keyfile pool to the password P using the following method:
  1. Divide the password P into individual bytes B0Bpl-1.
    Note that if the password was shorter than the keyfile pool, then the password was padded with zero bytes to the length of the pool in Step 5 (hence, at this point the length of the password is always greater than or equal to the length of the keyfile pool).
  2. Divide the keyfile pool KP into individual bytes G0Gkpl-1
  3. For 0 < i < kpl perform: Bi = Bi AdditionGi
  4. P = B0 || B1 || … || Bpl-2 || Bpl-1
  1. The password (after the keyfile pool content has been applied to it) is now passed to the header key derivation function PBKDF2 (PKCS #5 v2), which processes it (along with salt and other data) using a cryptographically secure hash algorithm selected by the user (e.g., SHA-512).
The role of the hash function H is merely to perform diffusion. CRC-32 is used as the hash function H. Note that the output of CRC-32 is subsequently processed using a cryptographically secure hash algorithm: The keyfile pool content (in addition to being hashed using CRC-32) is applied to the password, which is then passed to the header key derivation function PBKDF2 (PKCS #5 v2), which processes it (along with salt and other data) using a cryptographically secure hash algorithm selected by the user (e.g., SHA-512). The resultant values are used to form the header key and the secondary header key (XTS mode).

TrueCrypt Volume Specification:
Note that this specification applies to volumes created by TrueCrypt 7.0 or later. The format of file-hosted volumes is identical to the format of partition/device-hosted volumes (however, the “volume header”, or key data, for a system partition/drive is stored in the last 512 bytes of the first logical drive track). TrueCrypt volumes have no “signature” or ID strings. Until decrypted, they appear to consist solely of random data.
Free space on each TrueCrypt volume is filled with random data when the volume is created.* The random data is generated as follows: Right before TrueCrypt volume formatting begins, a temporary encryption key and a temporary secondary key (XTS mode) are generated by the random number generator (see random number generator). The encryption algorithm that the user selected is initialised with the temporary keys. The encryption algorithm is then used to encrypt plaintext blocks consisting of zeroes. The encryption algorithm operates in XTS mode (see the section hidden volume). The resulting ciphertext blocks are used to fill (overwrite) the free space on the volume. The temporary keys are stored in RAM and are erased after formatting finishes.

Hidden Operating System and Volume:
It may happen that you are forced by somebody to decrypt the operating system. There are many situations where you cannot refuse to do so (for example, due to extortion). TrueCrypt allows you to create a hidden operating system whose existence should be impossible to prove (provided that certain guidelines are followed). Thus, you will not have to decrypt or reveal the password for the hidden operating system.
Hidden Volume:
The layout of a standard TrueCrypt volume before and after a hidden volume was created within it.

The principle is that a TrueCrypt volume is created within another TrueCrypt volume (within the free space on the volume). Even when the outer volume is mounted, it should be impossible to prove whether there is a hidden volume within it or not*, because free space on any TrueCrypt volume is always filled with random data when the volume is created** and no part of the (dismounted) hidden volume can be distinguished from random data. Note that TrueCrypt does not modify the file system (information about free space, etc.) within the outer volume in any way.

The password for the hidden volume must be substantially different from the password for the outer volume. To the outer volume, (before creating the hidden volume within it) you should copy some sensitive-looking files that you actually do NOT want to hide. These files will be there for anyone who would force you to hand over the password. You will reveal only the password for the outer volume, not for the hidden one. Files that really are sensitive will be stored on the hidden volume.
A hidden volume can be mounted the same way as a standard TrueCrypt volume: Click Select File or Select Device to select the outer/host volume (important: make sure the volume is not mounted). Then click Mount, and enter the password for the hidden volume. Whether the hidden or the outer volume will be mounted is determined by the entered password (i.e., when you enter the password for the outer volume, then the outer volume will be mounted; when you enter the password for the hidden volume, the hidden volume will be mounted).
TrueCrypt first attempts to decrypt the standard volume header using the entered password. If it fails, it loads the area of the volume where a hidden volume header can be stored (i.e. bytes 65536–131071, which contain solely random data when there is no hidden volume within the volume) to RAM and attempts to decrypt it using the entered password. Note that hidden volume headers cannot be identified, as they appear to consist entirely of random data. If the header is successfully decrypted (for information on how TrueCrypt determines that it was successfully decrypted, see encryption scheme), the information about the size of the hidden volume is retrieved from the decrypted header (which is still stored in RAM), and the hidden volume is mounted (its size also determines its offset).
A hidden volume can be created within any type of TrueCrypt volume, i.e., within a file-hosted volume or partition/device-hosted volume (requires administrator privileges). To create a hidden TrueCrypt volume, click on Create Volume in the main program window and select Create a hidden TrueCrypt volume. The Wizard will provide help and all information necessary to successfully create a hidden TrueCrypt volume.
When creating a hidden volume, it may be very difficult or even impossible for an inexperienced user to set the size of the hidden volume such that the hidden volume does not overwrite data on the outer volume. Therefore, the Volume Creation Wizard automatically scans the cluster bitmap of the outer volume (before the hidden volume is created within it) and determines the maximum possible size of the hidden volume.***
Note that it is also possible to create and boot an operating system residing in a hidden volume (see hidden operating system).
Hidden Operating System:
A hidden operating system is a system (for example, Windows 7 or Windows XP) that is installed in a hidden Truecrypt volume. It should be impossible to prove that a hidden truecrypt volume exists (provided that certain guidelines are followed; for more information, see the section hidden volume) and, therefore, it should be impossible to prove that a hidden operating system exists.
However, in order to boot a system encrypted by TrueCrypt, an unencrypted copy of the truecrypt boot loader has to be stored on the system drive or on a truecrypt rescue disc. Hence, the mere presence of the TrueCrypt Boot Loader can indicate that there is a system encrypted by TrueCrypt on the computer. Therefore, to provide a plausible explanation for the presence of the TrueCrypt Boot Loader, the TrueCrypt helps you create a second encrypted operating system, so-called decoy operating system, during the process of creation of a hidden operating system. A decoy operating system must not contain any sensitive files. Its existence is not secret (it is not installed in a hidden volume). The password for the decoy operating system can be safely revealed to anyone forcing you to disclose your pre-boot authentication password.*
You should use the decoy operating system as frequently as you use your computer. Ideally, you should use it for all activities that do not involve sensitive data. Otherwise, plausible deniability of the hidden operating system might be adversely affected (if you revealed the password for the decoy operating system to an adversary, he could find out that the system is not used very often, which might indicate the existence of a hidden operating system on your computer). Note that you can save data to the decoy system partition anytime without any risk that the hidden volume will get damaged (because the decoy system is not installed in the outer volume — see below).
There will be two pre-boot authentication passwords — one for the hidden system and the other for the decoy system. If you want to start the hidden system, you simply enter the password for the hidden system in the TrueCrypt Boot Loader screen (which appears after you turn on or restart your computer). Likewise, if you want to start the decoy system (for example, when asked to do so by an adversary), you just enter the password for the decoy system in the TrueCrypt Boot Loader screen.
Note: When you enter a pre-boot authentication password, the TrueCrypt Boot Loader first attempts to decrypt (using the entered password) the last 512 bytes of the first logical track of the system drive (where encrypted master key data for non-hidden encrypted system partitions/drives are normally stored). If it fails and if there is a partition behind the active partition, the TrueCrypt Boot Loader (even if there is actually no hidden volume on the drive) automatically tries to decrypt (using the same entered password again) the area of the first partition behind the active partition where the encrypted header of a possible hidden volume might be stored (however, if the size of the active partition is less than 256 MB, then the data is read from the second partition behind the active one, because Windows 7 and later, by default, do not boot from the partition on which they are installed). Note that TrueCrypt never knows if there is a hidden volume in advance (the hidden volume header cannot be identified, as it appears to consist entirely of random data). If the header is successfully decrypted (for information on how TrueCrypt determines that it was successfully decrypted, see the section encryption scheme), the information about the size of the hidden volume is retrieved from the decrypted header (which is still stored in RAM), and the hidden volume is mounted (its size also determines its offset).
When running, the hidden operating system appears to be installed on the same partition as the original operating system (the decoy system). However, in reality, it is installed within the partition behind it (in a hidden volume). All read/write operations are transparently redirected from the system partition to the hidden volume. Neither the operating system nor applications will know that data written to and read from the system partition is actually written to and read from the partition behind it (from/to a hidden volume). Any such data is encrypted and decrypted on the fly as usual (with an encryption key different from the one that is used for the decoy operating system).
Note that there will also be a third password — the one for the outer volume. It is not a pre-boot authentication password, but a regular TrueCrypt volume password. It can be safely disclosed to anyone forcing you to reveal the password for the encrypted partition where the hidden volume (containing the hidden operating system) resides. Thus, the existence of the hidden volume (and of the hidden operating system) will remain secret. If you are not sure you understand how this is possible, or what an outer volume is, please read the section hidden volume. The outer volume should contain some sensitive-looking files that you actually do notwant to hide.
To summarize, there will be three passwords in total. Two of them can be revealed to an attacker (for the decoy system and for the outer volume). The third password, for the hidden system, must remain secret.
Example Layout of System Drive Containing Hidden Operating System
Process of creation of hidden operating system:
To start the process of creation of a hidden operating system, select System >Create Hidden Operating System and then follow the instructions in the wizard.
Initially, the wizard verifies that there is a suitable partition for a hidden operating system on the system drive. Note that before you can create a hidden operating system, you need to create a partition for it on the system drive. It must be the first partition behind the system partition and it must be at least 5% larger than the system partition (the system partition is the one where the currently running operating system is installed). However, if the outer volume (not to be confused with the system partition) is formatted as NTFS, the partition for the hidden operating system must be at least 110% (2.1 times) larger than the system partition (the reason is that the NTFS file system always stores internal data exactly in the middle of the volume and, therefore, the hidden volume, which is to contain a clone of the system partition, can reside only in the second half of the partition).
In the next steps, the wizard will create two TrueCrypt volumes (outer and hidden) within the first partition behind the system partition. The hidden volume will contain the hidden operating system. The size of the hidden volume is always the same as the size of the system partition. The reason is that the hidden volume will need to contain a clone of the content of the system partition (see below). Note that the clone will be encrypted using a different encryption key than the original. Before you start copying some sensitive-looking files to the outer volume, the wizard tells you the maximum recommended size of space that the files should occupy, so that there is enough free space on the outer volume for the hidden volume.
Remark: After you copy some sensitive-looking files to the outer volume, the cluster bitmap of the volume will be scanned in order to determine the size of uninterrupted area of free space whose end is aligned with the end of the outer volume. This area will accommodate the hidden volume, so it limits its maximum possible size. The maximum possible size of the hidden volume will be determined and it will be verified that it is greater than the size of the system partition (which is required, because the entire content of the system partition will need to be copied to the hidden volume — see below). This ensures that no data stored on the outer volume will be overwritten by data written to the area of the hidden volume (e.g. when the system is being copied to it). The size of the hidden volume is always the same as the size of the system partition.
Then, TrueCrypt will create the hidden operating system by copying the content of the system partition to the hidden volume. Data being copied will be encrypted on the fly with an encryption key different from the one that will be used for the decoy operating system. The process of copying the system is performed in the pre-boot environment (before Windows starts) and it may take a long time to complete; several hours or even several days (depending on the size of the system partition and on the performance of the computer). You will be able to interrupt the process, shut down your computer, start the operating system and then resume the process. However, if you interrupt it, the entire process of copying the system will have to start from the beginning (because the content of the system partition must not change during cloning). The hidden operating system will initially be a clone of the operating system under which you started the wizard.
Windows creates (typically, without your knowledge or consent) various log files, temporary files, etc., on the system partition. It also saves the content of RAM to hibernation and paging files located on the system partition. Therefore, if an adversary analyzed files stored on the partition where the original system (of which the hidden system is a clone) resides, he might find out, for example, that you used the TrueCrypt wizard in the hidden-system-creation mode (which might indicate the existence of a hidden operating system on your computer). To prevent such issues, TrueCrypt will securely erase the entire content of the partition where the original system resides after the hidden system has been created. Afterwards, in order to achieve plausible deniability, TrueCrypt will prompt you to install a new system on the partition and encrypt it using TrueCrypt. Thus, you will create the decoy system and the whole process of creation of the hidden operating system will be completed.
Note: TrueCrypt will erase the content of the partition where the original system resides by filling it with random data entirely. If you revealed the password for the decoy system to an adversary and he asked you why the free space of the (decoy) system partition contains random data, you could answer, for example: “The partition previously contained a system encrypted by TrueCrypt, but I forgot the pre-boot authentication password (or the system was damaged and stopped booting), so I had to reinstall Windows and encrypt the partition again.”
Plausible deniability and data leak protection
For security reasons, when a hidden operating system is running, TrueCrypt ensures that all local unencrypted filesystems and non-hidden TrueCrypt volumes are read-only (i.e. no files can be written to such filesystems or TrueCrypt volumes).† Data is allowed to be written to any filesystem that resides within a hidden truecrypt volume (provided that the hidden volume is not located in a container stored on an unencrypted filesystem or on any other read-only filesystem).
There are three main reasons why such countermeasures have been implemented:
  1. It enables the creation of a secure platform for mounting of hidden TrueCrypt volumes. Note that we officially recommend that hidden volumes are mounted only when a hidden operating system is running.
  2. In some cases, it is possible to determine that, at a certain time, a particular filesystem was not mounted under (or that a particular file on the filesystem was not saved or accessed from within) a particular instance of an operating system (e.g. by analyzing and comparing filesystem journals, file timestamps, application logs, error logs, etc). This might indicate that a hidden operating system is installed on the computer. The countermeasures prevent these issues.
  3. It prevents data corruption and allows safe hibernation. When Windows resumes from hibernation, it assumes that all mounted filesystems are in the same state as when the system entered hibernation. TrueCrypt ensures this by write-protecting any filesystem accessible both from within the decoy and hidden systems. Without such protection, the filesystem could become corrupted when mounted by one system while the other system is hibernated.
If you need to securely transfer files from the decoy system to the hidden system, follow these steps:
  1. Start the decoy system.
  2. Save the files to an unencrypted volume or to an outer/normal TrueCrypt volume.
  3. Start the hidden system
  4. If you saved the files to a TrueCrypt volume, mount it (it will be automatically mounted as read-only).
  5. Copy the files to the hidden system partition or to another hidden volume.
Possible explanations for existence of two TrueCrypt partitions on single drive
An adversary might ask why you created two TrueCrypt-encrypted partitions on a single drive (a system partition and a non-system partition) rather than encrypting the entire disk with a single encryption key. There are many possible reasons to do that. However, if you do not know any (other than creating a hidden operating system), you can provide, for example, one of the following explanations:
  • If there are more than two partitions on a system drive and you want to encrypt only two of them (the system partition and the one behind it) and to leave the other partitions unencrypted (for example, to achieve the best possible performance when reading and writing data, which is not sensitive, to such unencrypted partitions), the only way to do that is to encrypt both partitions separately (note that, with a single encryption key, TrueCrypt could encrypt the entire system drive and all partitions on it, but it cannot encrypt only two of them — only one or all of the partitions can be encrypted with a single key). As a result, there will be two adjacent TrueCrypt partitions on the system drive (the first will be a system partition, the second will be a non-system one), each encrypted with a different key (which is also the case when you create a hidden operating system, and therefore it can be explained this way).

    If you do not know any good reason why there should be more than one partition on a system drive at all:

    It is generally recommended to separate non-system files (documents) from system files. One of the easiest and most reliable ways to do that is to create two partitions on the system drive; one for the operating system and the other for documents (non-system files). The reasons why this practice is recommended include:
    • If the filesystem on one of the partitions is damaged, files on the partition may get corrupted or lost, whereas files on the other partition are not affected.
    • It is easier to reinstall the system without losing your documents (reinstallation of an operating system involves formatting the system partition, after which all files stored on it are lost). If the system is damaged, full reinstallation is often the only option.
  • A cascade encryption algorithm (e.g. AES-Twofish-Serpent) can be many times slower than a non-cascade one (e.g. AES). However, a cascade encryption algorithm may be more secure than a non-cascade one (for example, the probability that three distinct encryption algorithms will be broken, e.g. due to advances in cryptanalysis, is significantly lower than the probability that only one of them will be broken). Therefore, if you encrypt the outer volume with a cascade encryption algorithm and the decoy system with a non-cascade encryption algorithm, you can answer that you wanted the best performance (and adequate security) for the system partition, and the highest possible security (but worse performance) for the non-system partition (i.e. the outer volume), where you store the most sensitive data, which you do not need to access very often (unlike the operating system, which you use very often, and therefore you need it to have the best possible performance). On the system partition, you store data that is less sensitive (but which you need to access very often) than data you store on the non-system partition (i.e. on the outer volume).
  • Provided that you encrypt the outer volume with a cascade encryption algorithm (e.g. AES-Twofish-Serpent) and the decoy system with a non-cascade encryption algorithm (e.g. AES), you can also answer that you wanted to prevent the problems about which TrueCrypt warns when the user attempts to choose a cascade encryption algorithm for system encryption (see below for a list of the problems). Therefore, to prevent those problems, you decided to encrypt the system partition with a non-cascade encryption algorithm. However, you still wanted to use a cascade encryption algorithm (because it is more secure than a non-cascade encryption algorithm) for the most sensitive data, so you decided to create a second partition, which those problems do not affect (because it is non-system) and to encrypt it with a cascade encryption algorithm. On the system partition, you store data that is less sensitive than data you store on the non-system partition (i.e. on the outer volume).

    Note: When the user attempts to encrypt the system partition with a cascade encryption algorithm, TrueCrypt warns him or her that it can cause the following problems (and implicitly recommends to choose a non-cascade encryption algorithm instead):
    • For cascade encryption algorithms, the TrueCrypt Boot Loader is larger than normal and, therefore, there is not enough space in the first drive track for a backup of the TrueCrypt Boot Loader. Hence,whenever it gets damaged (which often happens, for example, during inappropriately designed anti-piracy activation procedures of certain programs), the user must use the TrueCrypt Rescue Disk to repair the TrueCrypt Boot Loader or to boot.
    • On some computers, resuming from hibernation takes longer.
  • In contrast to a password for a non-system TrueCrypt volume, a pre-boot authentication password needs to be typed each time the computer is turned on or restarted. Therefore, if the pre-boot authentication password is long (which is required for security purposes), it may be very tiresome to type it so frequently. Hence, you can answer that it was more convenient for you to use a short (and therefore weaker) password for the system partition (i.e. the decoy system) and that it is more convenient for you to store the most sensitive data (which you do not need to access as often) in the non-system TrueCrypt partition (i.e. in the outer volume) for which you chose a very long password.

    As the password for the system partition is not very strong (because it is short), you do not intentionally store sensitive data on the system partition. However, you still prefer the system partition to be encrypted, because potentially sensitive or mildly sensitive data is stored on it as a result of your everyday use of the computer (for example, passwords to online forums you visit, which can be automatically remembered by your browser, browsing history, applications you run, etc.)
  • When an attacker gets hold of your computer when a TrueCrypt volume is mounted (for example, when you use a laptop outside), he can, in most cases, read any data stored on the volume (data is decrypted on the fly as he reads it). Therefore, it may be wise to limit the time the volume is mounted to a minimum. Obviously, this may be impossible or difficult if the sensitive data is stored on an encrypted system partition or on an entirely encrypted system drive (because you would also have to limit the time you work with the computer to a minimum). Hence, you can answer that you created a separate partition (encrypted with a different key than your system partition) for your most sensitive data and that you mount it only when necessary and dismount it as soon as possible (so as to limit the time the volume is mounted to a minimum). On the system partition, you store data that is less sensitive (but which you need to access often) than data you store on the non-system partition (i.e. on the outer volume).
Safety/Security precautions and requirements pertaining to hidden operating systems
As a hidden operating system resides in a hidden TrueCrypt volume, a user of a hidden operating system must follow all of the security requirements and precautions that apply to normal hidden TrueCrypt volumes. These requirements and precautions, as well as additional requirements and precautions pertaining specifically to hidden operating systems, are listed in the subsection Security Requirements and Precautions Pertaining to Hidden Volumes.
WARNING: If you do not protect the hidden volume (for information on how to do so, refer to the section protection of hidden volumes against damage), do not write to the outer volume (note that the decoy operating system is not installed in the outer volume). Otherwise, you may overwrite and damage the hidden volume (and the hidden operating system within it)!
If all the instructions in the wizard have been followed and if the security requirements and precautions listed in the subsection Security Requirements and Precautions Pertaining to Hidden Volumes are followed, it should be impossible to prove that the hidden volume and hidden operating system exist, even when the outer volume is mounted or when the decoy operating system is decrypted or started.
* It is not practical (and therefore is not supported) to install operating systems in two TrueCrypt volumes that are embedded within a single partition, because using the outer operating system would often require data to be written to the area of the hidden operating system (and if such write operations were prevented using the hidden volume protection feature, it would inherently cause system crashes, i.e. ‘Blue Screen’ errors).
Security Requirements and Precautions Pertaining to Hidden Volumes
If you use a hidden TrueCrypt volume, you must follow the security requirements and precautions listed below in this section. Disclaimer: This section is not guaranteed to contain a list of all security issues and attacks that might adversely affect or limit the ability of TrueCrypt to secure data stored in a hidden TrueCrypt volume and the ability to provide plausible deniability.
  • If an adversary has access to a (dismounted) TrueCrypt volume at several points over time, he may be able to determine which sectors of the volume are changing. If you change the contents of a hidden volume (e.g., create/copy new files to the hidden volume or modify/delete/rename/move files stored on the hidden volume, etc.), the contents of sectors (ciphertext) in the hidden volume area will change. After being given the password to the outer volume, the adversary might demand an explanation why these sectors changed. Your failure to provide a plausible explanation might indicate the existence of a hidden volume within the outer volume.

    Note that issues similar to the one described above may also arise, for example, in the following cases:
    • The file system in which you store a file-hosted TrueCrypt container has been defragmented and a copy of the TrueCrypt container (or of its fragment) remains in the free space on the host volume (in the defragmented file system). To prevent this, do one of the following:
      • Use a partition/device-hosted TrueCrypt volume instead of file-hosted.
      • Securely erase free space on the host volume (in the defragmented file system) after defragmenting.
      • Do not defragment file systems in which you store TrueCrypt volumes.
    • A file-hosted TrueCrypt container is stored in a journaling file system (such as NTFS). A copy of the TrueCrypt container (or of its fragment) may remain on the host volume. To prevent this, do one the following:
      • Use a partition/device-hosted TrueCrypt volume instead of file-hosted.
      • Store the container in a non-journaling file system (for example, FAT32).
    • A TrueCrypt volume resides on a device/filesystem that utilizes a wear-leveling mechanism (e.g. a flash-memory SSD or USB flash drive). A copy of (a fragment of) the TrueCrypt volume may remain on the device. Therefore, do not store hidden volumes on such devices/filesystems.
    • A TrueCrypt volume resides on a device/filesystem that saves data (or on a device/filesystem that is controlled or monitored by a system/device that saves data) (e.g. the value of a timer or counter) that can be used to determine that a block had been written earlier than another block and/or to determine how many times a block has been written/read. Therefore, do not store hidden volumes on such devices/filesystems. To find out whether a device/system saves such data, please refer to documentation supplied with the device/system or contact the vendor/manufacturer.
    • A TrueCrypt volume resides on a device that is prone to wear (it is possible to determine that a block has been written/read more times than another block). Therefore, do not store hidden volumes on such devices/filesystems. To find out whether a device is prone to such wear, please refer to documentation supplied with the device or contact the vendor/manufacturer.
    • You back up content of a hidden volume by cloning its host volume or create a new hidden volume by cloning its host volume. Therefore, you must not do so.
  • Make sure that Quick Format is disabled when encrypting a partition/device within which you intend to create a hidden volume.
  • On Windows, make sure you have not deleted any files within a volume within which you intend to create a hidden volume (the cluster bitmap scanner does not detect deleted files).
  • On Linux or Mac OS X, if you intend to create a hidden volume within a file-hosted TrueCrypt volume, make sure that the volume is not sparse-file-hosted (the Windows version of TrueCrypt verifies this and disallows creation of hidden volumes within sparse files).
  • When a hidden volume is mounted, the operating system and third-party applications may write to non-hidden volumes (typically, to the unencrypted system volume) unencrypted information about the data stored in the hidden volume (e.g. filenames and locations of recently accessed files, databases created by file indexing tools, etc.), the data itself in an unencrypted form (temporary files, etc.), unencrypted information about the filesystem residing in the hidden volume (which might be used e.g. to identify the filesystem and to determine whether it is the filesystem residing in the outer volume), the password/key for the hidden volume, or other types of sensitive data. Therefore, the following security requirements and precautions must be followed:
    • Windows: Create a hidden operating system (for information on how to do so, see the section Hidden Operating System) and mount hidden volumes only when the hidden operating system is running. Note: When a hidden operating system is running, TrueCrypt ensures that all local unencrypted filesystems and non-hidden TrueCrypt volumes are read-only (i.e. no files can be written to such filesystems or TrueCrypt volumes).* Data is allowed to be written to filesystems within hidden TrueCrypt volumes. Alternatively, if a hidden operating system cannot be used, use a “live-CD” Windows PE system (entirely stored on and booted from a CD/DVD) that ensures that any data written to the system volume is written to a RAM disk. Mount hidden volumes only when such a “live-CD” system is running (if a hidden operating system cannot be used). In addition, during such a “live-CD” session, only filesystems that reside in hidden TrueCrypt volumes may be mounted in read-write mode (outer or unencrypted volumes/filesystems must be mounted as read-only or must not be mounted/accessible at all); otherwise, you must ensure that applications and the operating system do not write any sensitive data (see above) to non-hidden volumes/filesystems during the “live-CD” session.
    • Linux: Download or create a “live-CD” version of your operating system (i.e. a “live” Linux system entirely stored on and booted from a CD/DVD) that ensures that any data written to the system volume is written to a RAM disk. Mount hidden volumes only when such a “live-CD” system is running. During the session, only filesystems that reside in hidden TrueCrypt volumes may be mounted in read-write mode (outer or unencrypted volumes/filesystems must be mounted as read-only or must not be mounted/accessible at all). If you cannot comply with this requirement and you are not able to ensure that applications and the operating system do not write any sensitive data (see above) to non-hidden volumes/filesystems, you must not mount or create hidden TrueCrypt volumes under Linux.
    • Mac OS X: If you are not able to ensure that applications and the operating system do not write any sensitive data (see above) to non-hidden volumes/filesystems, you must not mount or create hidden TrueCrypt volumes under Mac OS X.
  • When an outer volume is mounted with hidden volume protection enabled, you must follow the same security requirements and precautions that you are required to follow when a hidden volume is mounted (see above). The reason is that the operating system might leak the password/key for the hidden volume to a non-hidden or unencrypted volume.
  • If you use an operating system residing within a hidden volume (see the section Hidden Operating System), then, in addition to the above, you must follow these security requirements and precautions:
    • You should use the decoy operating system as frequently as you use your computer. Ideally, you should use it for all activities that do not involve sensitive data. Otherwise, plausible deniability of the hidden operating system might be adversely affected (if you revealed the password for the decoy operating system to an adversary, he could find out that the system is not used very often, which might indicate the existence of a hidden operating system on your computer). Note that you can save data to the decoy system partition anytime without any risk that the hidden volume will get damaged (because the decoy system is not installed in the outer volume).
    • If the operating system requires activation, it must be activated before it is cloned (cloning is part of the process of creation of a hidden operating system — see the section Hidden Operating System) and the hidden operating system (i.e. the clone) must never be reactivated. The reason is that the hidden operating system is created by copying the content of the system partition to a hidden volume (so if the operating system is not activated, the hidden operating system will not be activated either). If you activated or reactivated a hidden operating system, the date and time of the activation (and other data) might be logged on a Microsoft server (and on the hidden operating system) but not on the decoy operating system. Therefore, if an adversary had access to the data stored on the server or intercepted your request to the server (and if you revealed the password for the decoy operating system to him), he might find out that the decoy operating system was activated (or reactivated) at a different time, which might indicate the existence of a hidden operating system on your computer.

      For similar reasons, any software that requires activation must be installed and activated before you start creating the hidden operating system.
    • When you need to shut down the hidden system and start the decoy system, do not restart the computer. Instead, shut it down or hibernate it and then leave it powered off for at least several minutes (the longer, the better) before turning the computer on and booting the decoy system. This is required to clear the memory, which may contain sensitive data.
    • The computer may be connected to a network (including the internet) only when the decoy operating system is running. When the hidden operating system is running, the computer should not be connected to any network, including the internet (one of the most reliable ways to ensure it is to unplug the network cable, if there is one). Note that if data is downloaded from or uploaded to a remote server, the date and time of the connection, and other data, are typically logged on the server. Various kinds of data are also logged on the operating system (e.g. Windows auto-update data, application logs, error logs, etc.) Therefore, if an adversary had access to the data stored on the server or intercepted your request to the server (and if you revealed the password for the decoy operating system to him), he might find out that the connection was not made from within the decoy operating system, which might indicate the existence of a hidden operating system on your computer.

      Also note that similar issues would affect you if there were any filesystem shared over a network under the hidden operating system (regardless of whether the filesystem is remote or local). Therefore, when the hidden operating system is running, there must be no filesystem shared over a network (in any direction).
    • Any actions that can be detected by an adversary (or any actions that modify any data outside mounted hidden volumes) must be performed only when the decoy operating system is running (unless you have an alternative plausible explanation, such as using a “live-CD” system to perform such actions). For example, the option ‘Auto-adjust for daylight saving time’ option may be enabled only on the decoy system.
    If the BIOS, EFI, or any other component logs power-down events or any other events that could indicate a hidden volume/system is used (e.g. by comparing such events with the events in the Windows event log), you must either disable such logging or ensure that the log is securely erased after each session (or otherwise avoid such an issue in an appropriate way).
For detailed information on Security Requirements and Precautions,
How to remove encryption:
Please note that TrueCrypt can in-place decrypt only system partitions and system drives (select System > Permanently Decrypt System Partition/Drive). If you need to remove encryption (e.g., if you no longer need encryption) from a non-system volume, please follow these steps:
  1. Mount your TrueCrypt volume.
  2. Move all files from the TrueCrypt volume to any location outside the TrueCrypt volume (note that the files will be decrypted on the fly).
  3. Dismount the TrueCrypt volume.
  4. If the TrueCrypt volume is file-hosted, delete it (the container) just like you delete any other file.

    If the volume is partition-hosted (applies also to USB flash drives)
    , in addition to the steps 1-3, do the following:
    1. Right-click the ‘Computer’ (or ‘My Computer’) icon on your desktop, or in the Start Menu, and select Manage. The ‘Computer Management’ window should appear.
    2. In the Computer Management window, from the list on the left, select ‘Disk Management’ (within the Storage sub-tree).
    3. Right-click the partition you want to decrypt and select ‘Change Drive Letter and Paths’.
    4. The ‘Change Drive Letter and Paths’ window should appear. If no drive letter is displayed in the window, click Add. Otherwise, click Cancel.
      If you clicked Add, then in the ‘Add Drive Letter or Path’ (which should have appeared), select a drive letter you want to assign to the partition and click OK.
    5. In the Computer Management window, right-click the partition you want to decrypt again and select Format. The Format window should appear.
    6. In the Format window, click OK. After the partition is formatted, it will no longer be required to mount it with TrueCrypt to be able to save or load files to/from the partition.
    If the volume is device-hosted(i.e., there are no partitions on the device, and the device is entirely encrypted), in addition to the steps 1-3, do the following:
    1. Right-click the ‘Computer’ (or ‘My Computer’) icon on your desktop, or in the Start Menu, and select Manage. The ‘Computer Management’ window should appear.
    2. In the Computer Management window, from the list on the left, select ‘Disk Management’ (within the Storage sub-tree).
    3. The ‘Initialize Disk’ window should appear. Use it to initialize the disk.
    4. In the ‘Computer Management’ window, right-click the area representing the storage space of the encrypted device and select ‘New Partition’ or ‘New Simple Volume’.
    5. WARNING: Before you continue, make sure you have selected the correct device, as all files stored on it will be lost. The ‘New Partition Wizard’ or ‘New Simple Volume Wizard’ window should appear now; follow its instructions to create a new partition on the device. After the partition is created, it will no longer be required to mount the device with TrueCrypt to be able to save or load files to/from the device.
Uninstalling TrueCrypt:
To uninstall TrueCrypt on Windows XP, select Start menu > Settings > Control Panel > Add or Remove Programs > TrueCrypt > Change/Remove.
To uninstall TrueCrypt on Windows Vista or later, select Start menu > Computer >Uninstall or change a program > TrueCrypt > Uninstall.
http://www.truecrypt.org/
https://truecrypt.sourceforge.net/ 
--------------------------
 
磁盘加密工具 FreeOTFE,
FreeOTFE 可以对整个磁盘加密也可以加密一个文件并虚拟出一个磁盘,使用时与正常磁盘完全相同.
(OTFE意思实时加密)许多方面与TureCrypt相似——提供了许多同样特性.不同于TureCrypt,.FreeOTFE 完全开源.
官网下载 :  http://sourceforge.net/projects/freeotfe.mirror/