Free open source on-the-fly encryption software
Offset (bytes) |
Size (bytes) |
Encryption Status^ |
Description |
0 64 68 70 72 76 92 100 108 116 124 128 132 252 256 512 65536 131072 S–131072† S–65536 |
64 4 2 2 4 16 8 8 8 8 4 4 120 4 Var. 65024 65536 Var. 65536 65536 |
Unencrypted‡ Encrypted Encrypted Encrypted Encrypted Encrypted Encrypted Encrypted Encrypted Encrypted Encrypted Encrypted Encrypted Encrypted Encrypted Encrypted Encrypted / Unencrypted‡ Encrypted Encrypted / Unencrypted‡ Encrypted / Unencrypted‡ |
Salt ASCII string “TRUE” Volume header format version (5) Minimum program version required to open the volume CRC-32 checksum of the (decrypted) bytes 256–511 Reserved (must contain zeroes) Size of hidden volume (set to zero in non-hidden volumes) Size of volume Byte offset of the start of the master key scope Size of the encrypted area within the master key scope Flag bits (bit 0 set: system encryption; bit 1 set: non-system in-place-encrypted volume; bits 2-31 are reserved) Sector size (in bytes) Reserved (must contain zeroes) CRC-32 checksum of the (decrypted) bytes 64–251 Concatenated primary and secondary master keys§ Reserved (for system encryption, this item is omitted††) Area for hidden volume header (if there is no hidden volume within the volume, this area contains random data**). For system encryption, this item is omitted.†† See bytes 0–65535. Data area (master key scope). For system encryption, offset may be different (depending on offset of system partition). Backup header (encrypted with a different header key derived using a different salt). For system encryption, this item is omitted. †† See bytes 0–65535. Backup header for hidden volume (encrypted with a different header key derived using a different salt). If there is no hidden volume within the volume, this area contains random data.** For system encryption, this item is omitted. †† See bytes 0–65535. |
The fields located at byte #0 (salt) and #256 (master keys) contain random values generated by the random number generator (see the section Random Number Generator) during the volume creation process. If a TrueCrypt volume hosts a hidden volume (within its free space), the header of the hidden volume is located at byte #65536 of the host volume (the header of the host/outer volume is located at byte #0 of the host volume – see the section Hidden Volume). If there is no hidden volume within a TrueCrypt volume, bytes 65536–131071 of the volume (i.e., the area where the header of a hidden volume can reside) contain random data (see above for information on the method used to fill free volume space with random data when the volume is created). The layout of the header of a hidden volume is the same as the one of a standard volume (bytes 0–65535).
The maximum possible TrueCrypt volume size is 263 bytes (8,589,934,592 GB). However, due to security reasons (with respect to the 128-bit block size used by the encryption algorithms), the maximum allowed volume size is 1 PB (1,048,576 GB).
Each TrueCrypt volume created by TrueCrypt 6.0 or later contains an embedded backup header, located at the end of the volume (see above). The header backup is not a copy of the volume header because it is encrypted with a different header key derived using a different salt (see the section Header Key Derivation, Salt, and Iteration Count).
When the volume password and/or keyfiles are changed, or when the header is restored from the embedded (or an external) header backup, both the volume header and the backup header (embedded in the volume) are re-encrypted with different header keys (derived using newly generated salts – the salt for the volume header is different from the salt for the backup header). Each salt is generated by the TrueCrypt random number generator (see the section Random Number Generator).
For more information about header backups, see the subsection Tools -> Restore Volume Header in the chapter Main Program Window.
* Provided that the options Quick Format and Dynamic are disabled and provided that the volume does not contain a filesystem that has been encrypted in place (note that TrueCrypt does not allow the user to create a hidden volume within such a volume).
^ The encrypted areas of the volume header are encrypted in XTS mode using the primary and secondary header keys. For more information, see the section Encryption Scheme and the section Header Key Derivation, Salt, and Iteration Count.
† S denotes the size of the volume host (in bytes).
‡ Note that the salt does not need to be encrypted, as it does not have to be kept secret [7] (salt is a sequence of random values).
§ Multiple concatenated master keys are stored here when the volume is encrypted using a cascade of ciphers (secondary master keys are used for XTS mode).
** See above in this section for information on the method used to fill free volume space with random data when the volume is created.
†† Here, the meaning of “system encryption” does not include a hidden volume containing a hidden operating system. 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 the section Random Number Generator). The encryption algorithm that the user selected is initialized 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 Modes of Operation). 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.
Introduction
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).
Files can be copied to and from a mounted TrueCrypt volume just like they are copied to/from any normal disk (for example, by simple drag-and-drop operations). Files are automatically being decrypted on the fly (in memory/RAM) while they are being read or copied from an encrypted TrueCrypt volume. Similarly, files that are being written or copied to the TrueCrypt volume are automatically being encrypted on the fly (right before they are written to the disk) in RAM. Note that this does not mean that the whole file that is to be encrypted/decrypted must be stored in RAM before it can be encrypted/decrypted. There are no extra memory (RAM) requirements for TrueCrypt. For an illustration of how this is accomplished, see the following paragraph.
Let’s suppose that there is an .avi video file stored on a TrueCrypt volume (therefore, the video file is entirely encrypted). The user provides the correct password (and/or keyfile) and mounts (opens) the TrueCrypt volume. When the user double clicks the icon of the video file, the operating system launches the application associated with the file type – typically a media player. The media player then begins loading a small initial portion of the video file from the TrueCrypt-encrypted volume to RAM (memory) in order to play it. While the portion is being loaded, TrueCrypt is automatically decrypting it (in RAM). The decrypted portion of the video (stored in RAM) is then played by the media player. While this portion is being played, the media player begins loading another small portion of the video file from the TrueCrypt-encrypted volume to RAM (memory) and the process repeats. This process is called on-the-fly encryption/decryption and it works for all file types (not only for video files).
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 files stored in it will be inaccessible (and encrypted). Even when power supply is suddenly interrupted (without proper system shut down), files stored in the volume are inaccessible (and encrypted). To make them accessible again, you have to mount the volume (and provide the correct password and/or keyfile).
For a quick start guide, please see the chapter Beginner’s Tutorial.
TrueCrypt is open-source and free software. The complete source code of TrueCrypt (written in C, C++, and assembly) is freely available for peer review at:
The last known secure version of TrueCrypt (v7.1a) was released on February 7, 2012.
On May 28, 2014, the TrueCrypt website and pre v7.2 versions were removed, and a mysterious “TrueCrypt is not secure” message was published on their SourceForge website, along with the release of v7.2 which is incapable of creating encrypted volumes.
It is not recommended to use v7.2.
This website was created for TrueCrypt distribution – see Section II of the TrueCrypt license.
This site offers:
It is very important that you choose a good password. You must avoid choosing one that contains only a single word that can be found in a dictionary (or a combination of such words). It must not contain any names, dates of birth, account numbers, or any other items that could be easy to guess. A good password is a random combination of upper and lower case letters, numbers, and special characters, such as @ ^ = $ * + etc. We strongly recommend choosing a password consisting of more than 20 characters (the longer, the better). Short passwords are easy to crack using brute-force techniques.
To make brute-force attacks on a keyfile infeasible, the size of the keyfile must be at least 30 bytes. If a volume uses multiple keyfiles, then at least one of the keyfiles must be 30 bytes in size or larger. Note that the 30-byte limit assumes a large amount of entropy in the keyfile. If the first 1024 kilobytes of a file contain only a small amount of entropy, it must not be used as a keyfile (regardless of the file size). If you are not sure what entropy means, we recommend that you let TrueCrypt generate a file with random content and that you use it as a keyfile (select Tools -> Keyfile Generator).
When creating a volume, encrypting a system partition/drive, or changing passwords/keyfiles, you must not allow any third party to choose or modify the password/keyfile(s) before/while the volume is created or the password/keyfiles(s) changed. For example, you must not use any password generators (whether website applications or locally run programs) where you are not sure that they are high-quality and uncontrolled by an attacker, and keyfiles must not be files that you download from the internet or that are accessible to other users of the computer (whether they are administrators or not).
This chapter contains step-by-step instructions on how to create, mount, and use a TrueCrypt volume. We strongly recommend that you also read the other sections of this manual, as they contain important information.
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.
The main TrueCrypt window should appear. Click Create Volume (marked with a red rectangle for clarity).
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.
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.
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).
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.
IMPORTANT: Note 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 be lost, not 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).
In the Volume Creation Wizard window, click Next.
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 click Next (for more information, see chapters Encryption Algorithms and Hash Algorithms).
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.
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 clickNext.
Note: The button Next will be disabled until passwords in both input fields are the same.
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.
We have just successfully created a TrueCrypt volume (file container). In the TrueCrypt Volume Creation Wizard window, clickExit.
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.)
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.
Click Select File.
The standard file selector window should appear.
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.
In the main TrueCrypt window, click Mount. Password prompt dialog window should appear.
Type the password (which you specified in Step 10) in the password input field (marked with a red rectangle).
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.
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.
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. For information pertaining to encrypted systempartition/drives, see the chapter System Encryption.
Important: We strongly recommend that you also read the other chapters of this manual, as they contain important information that has been omitted in this tutorial for simplicity.
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.
In addition to the above, you must follow the security requirements and precautions listed in the following chapters:
* This does not apply to filesystems on CD/DVD-like media and on custom, untypical, or non-standard devices/media.
Keyfile is a file whose content is combined with a password (for information on the method used to combine a keyfile with password, see the chapter Technical Details, section Keyfiles). Until the correct keyfile is provided, no volume that uses the keyfile can be mounted.
You do not have to use keyfiles. However, using keyfiles has some advantages:
Any kind of file (for example, .txt, .exe, mp3*, .avi) can be used as a TrueCrypt keyfile (however, we recommend that you prefer compressed files, such as .mp3, .jpg, .zip, etc). Note that TrueCrypt never modifies the keyfile contents.
You can select more than one keyfile; the order does not matter. You can also let TrueCrypt generate a file with random content and use it as a keyfile. To do so, select Tools -> Keyfile Generator.
Note: Keyfiles are currently not supported for system encryption.
WARNING: If you lose a keyfile or if any bit of its first 1024 kilobytes changes, it will be impossible to mount volumes that use the keyfile!
WARNING: If password caching is enabled, the password cache also contains the processed contents of keyfiles used to successfully mount a volume. Then it is possible to remount the volume even if the keyfile is not available/accessible. To prevent this, click ‘Wipe Cache’ or disable password caching (for more information, please see the section Settings -> Preferences, subsection Cache passwords in driver memory).
See also the section Choosing Passwords and Keyfiles in the chapter Security Requirements and Precautions.
If you want to use keyfiles (i.e. “apply” them) when creating or mounting volumes, or changing passwords, look for the ‘Use keyfiles’ option and the Keyfiles button below a password input field.
These control elements appear in various dialog windows and always have the same functions. Check the Use keyfiles option and click Keyfiles. The keyfile dialog window should appear where you can specify keyfiles (to do so, click Add Files or Add Token Files) or keyfile search paths (click Add Path).
TrueCrypt can directly use keyfiles stored on a security token or smart card that complies with the PKCS #11 (2.0 or later) standard [23] and that allows the user to store a file (data object) on the token/card. To use such files as TrueCrypt keyfiles, click Add Token Files (in the keyfile dialog window).
Access to a keyfile stored on a security token or smart card is typically protected by PIN codes, which can be entered either using a hardware PIN pad or via the TrueCrypt GUI. It can also be protected by other means, such as fingerprint readers.
In order to allow TrueCrypt to access a security token or smart card, you need to install a PKCS #11 (2.0 or later) software library for the token or smart card first. Such a library may be supplied with the device or it may be available for download from the website of the vendor or other third parties.
If your security token or smart card does not contain any file (data object) that you could use as a TrueCrypt keyfile, you can use TrueCrypt to import any file to the token or smart card (if it is supported by the device). To do so, follow these steps:
Note that you can import for example 512-bit keyfiles with random content generated by TrueCrypt (see Tools -> Keyfile Generator below).
To close all opened security token sessions, either select Tools > Close All Security Token Sessions or define and use a hotkey combination (Settings > Hot Keys > Close All Security Token Sessions).
By adding a folder in the keyfile dialog window (click Add Path), you specify a keyfile search path. All files found in the keyfile search path** will be used as keyfiles.
Keyfile search paths are especially useful if you, for example, store keyfiles on a USB memory stick that you carry with you. You can set the drive letter of the USB memory stick as a default keyfile search path. To do so, select Settings -> Default Keyfiles. Then click Add Path, browse to the drive letter assigned to the USB memory stick, and click OK. Now each time you mount a volume (and if the option Use keyfiles is checked in the password dialog window), TrueCrypt will scan the path and use all files that it finds on the USB memory stick as keyfiles.
When a keyfile is used, the password may be empty, so the keyfile may become the only item necessary to mount the volume (which we do not recommend). If default keyfiles are set and enabled when mounting a volume, then before prompting for a password, TrueCrypt first automatically attempts to mount using an empty password plus default keyfiles (however, this does not apply to the ‘Auto-Mount Devices’ function). If you need to set Mount Options (e.g., mount as read-only, protect hidden volume etc.) for a volume being mounted this way, hold down the Control (Ctrl) key while clicking Mount (or select Mount with Options from the Volumes menu). This will open the Mount Options dialog.
Keyfiles and keyfile search paths can be quickly selected in the following ways:
This function allows you to re-encrypt a volume header with a header encryption key derived from any number of keyfiles (with or without a password), or no keyfiles at all. Thus, a volume which is possible to mount using only a password can be converted to a volume that require keyfiles (in addition to the password) in order to be possible to mount. Note that the volume header contains the master encryption key with which the volume is encrypted. Therefore, the data stored on the volume will not be lost after you use this function.
This function can also be used to change/set volume keyfiles (i.e., to remove some or all keyfiles, and to apply new ones).
Remark: This function is internally equal to the Password Change function.
When TrueCrypt re-encrypts a volume header, the original volume header is first overwritten 256 times with random data to prevent adversaries from using techniques such as magnetic force microscopy or magnetic force scanning tunneling microscopy [17] to recover the overwritten header (however, see also the chapter Security Requirements and Precautions).
This function allows you to re-encrypt a volume header with a header encryption key derived from a password and no keyfiles (so that it can be mounted using only a password, without any keyfiles). Note that the volume header contains the master encryption key with which the volume is encrypted. Therefore, the data stored on the volume will not be lost after you use this function.
Remark: This function is internally equal to the Password Change function.
When TrueCrypt re-encrypts a volume header, the original volume header is first overwritten 256 times with random data to prevent adversaries from using techniques such as magnetic force microscopy or magnetic force scanning tunneling microscopy [17] to recover the overwritten header (however, see also the chapter Security Requirements and Precautions).
You can use this function to generate a file with random content, which you can use as a keyfile (recommended). This function uses the TrueCrypt Random Number Generator. Note that the resulting file size is always 64 bytes (i.e., 512 bits), which is also the maximum possible TrueCrypt password length.
Use this function to set default keyfiles and/or default keyfile search paths. This function is particularly useful if you, for example, store keyfiles on a USB memory stick that you carry with you. You can add its drive letter to the default keyfile configuration. To do so, click Add Path, browse to the drive letter assigned to the USB memory stick, and click OK. Now each time you mount a volume (and if Use keyfiles is checked in the password dialog), TrueCrypt will scan the path and use all files that it finds there as keyfiles.
IMPORTANT: Note that when you set default keyfiles and/or default keyfile search paths, the filenames and paths are saved unencrypted in the file Default Keyfiles.xml. For more information, please see the chapter TrueCrypt System Files & Application Data.
* However, if you use an MP3 file as a keyfile, you must ensure that no program modifies the ID3 tags (e.g. song title, name of artist, etc.) within the MP3 file. Otherwise, it will be impossible to mount volumes that use the keyfile.
** Found at the time when you are mounting the volume, changing its password, or performing any other operation that involves re-encryption of the volume header.