3 .\" The DragonFly Project. All rights reserved.
5 .\" Redistribution and use in source and binary forms, with or without
6 .\" modification, are permitted provided that the following conditions
9 .\" 1. Redistributions of source code must retain the above copyright
10 .\" notice, this list of conditions and the following disclaimer.
11 .\" 2. Redistributions in binary form must reproduce the above copyright
12 .\" notice, this list of conditions and the following disclaimer in
13 .\" the documentation and/or other materials provided with the
15 .\" 3. Neither the name of The DragonFly Project nor the names of its
16 .\" contributors may be used to endorse or promote products derived
17 .\" from this software without specific, prior written permission.
19 .\" THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
20 .\" ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
21 .\" LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
22 .\" FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
23 .\" COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
24 .\" INCIDENTAL, SPECIAL, EXEMPLARY OR CONSEQUENTIAL DAMAGES (INCLUDING,
25 .\" BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
26 .\" LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
27 .\" AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
28 .\" OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
29 .\" OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
37 .Nd tool to manage TrueCrypt volumes
45 .Op Fl a Ar pbkdf_hash
47 .Op Fl f Ar keyfile_hidden
49 .Op Fl x Ar pbkdf_hash
55 .Op Fl f Ar keyfile_hidden
57 .Op Fl s Ar system_device
60 .Op Fl -use-hdr-file Ar hdr_file
61 .Op Fl -use-hidden-hdr-file Ar hdr_file
68 .Op Fl f Ar keyfile_hidden
70 .Op Fl s Ar system_device
74 .Op Fl -use-hdr-file Ar hdr_file
75 .Op Fl -use-hidden-hdr-file Ar hdr_file
80 .Op Fl -new-keyfile Ar new_keyfile
81 .Op Fl -new-pbkdf-prf Ar pbkdf_hash
82 .Op Fl s Ar system_device
85 .Op Fl -use-hdr-file Ar hdr_file
86 .Op Fl -use-hidden-hdr-file Ar hdr_file
87 .Op Fl -save-hdr-backup Ar hdr_file
93 .Fl -restore-from-backup-hdr
102 utility provides full support for creating and opening/mapping
103 TrueCrypt-compatible volumes.
104 It supports the following commands, each with a set of options
105 detailed further below:
106 .Bl -tag -width indent
107 .It Fl c , Fl -create
108 Create a new encrypted TrueCrypt volume on the device
112 Print help message and exit.
114 Print out information about the encrypted device specified by
116 .It Fl j Ar mapping , Fl -info-mapped Ns = Ns Ar mapping
117 Print out information about the mapped tcplay volume specified
120 Information such as key CRC and the PBKDF2 PRF is not available
123 Modify the volume header.
124 This mode allows changing passphrase, keyfiles, PBKDF2 PRF as
125 well as restoring from a backup header.
126 .It Fl m Ar mapping , Fl -map Ns = Ns Ar mapping
127 Map the encrypted TrueCrypt volume on the device specified by
135 argument should not contain any spaces or special characters.
136 .It Fl u Ar mapping , Fl -unmap Ns = Ns Ar mapping
141 as well as any related cascade mappings.
142 If you mapped a volume using full disk encryption and created
143 mapping for individual partitions using
145 you must remove these prior to unmapping the volume.
146 .It Fl v, Fl -version
147 Print version message and exit.
150 Options common to all commands are:
151 .Bl -tag -width indent
152 .It Fl d Ar device , Fl -device Ns = Ns Ar device
155 on which the TrueCrypt volume resides/will reside.
156 This option is mandatory for all commands.
157 .It Fl f Ar keyfile_hidden , Fl -keyfile-hidden Ns = Ns Ar keyfile_hidden
159 to use in addition to the passphrase when either creating a
160 hidden volume or when protecting a hidden volume while mapping
161 or querying the outer volume.
162 If you only intend to map a hidden volume, the
164 option has to be used.
165 This option can appear multiple times; if so, multiple
166 keyfiles will be used.
167 This option is not valid in the
170 .It Fl k Ar keyfile , Fl -keyfile Ns = Ns Ar keyfile
173 to use in addition to the passphrase.
174 This option can appear multiple times; if so, multiple
175 keyfiles will be used.
178 Additional options for the
181 .Bl -tag -width indent
182 .It Fl a Ar pbkdf_hash , Fl -pbkdf-prf Ns = Ns Ar pbkdf_hash
183 Specifies which hash algorithm to use for the PBKDF2 password
185 To see which algorithms are supported, specify
186 .Fl -pbkdf-prf Ns = Ns Cm help .
187 .It Fl b Ar cipher , Fl -cipher Ns = Ns Ar cipher
188 Specifies which cipher algorithm or cascade of ciphers to use
189 to encrypt the new volume.
190 To see which algorithms are supported, specify
191 .Fl -cipher Ns = Ns Cm help .
193 Specifies that the newly created volume will contain a hidden
195 The keyfiles applied to the passphrase for the hidden
196 volume are those specified by
197 .Fl -keyfile-hidden .
198 The user will be prompted for the size of the hidden volume
200 .It Fl w, Fl -weak-keys
203 for key material instead of a strong entropy source.
204 This is in general a really bad idea and should only be used
206 .It Fl x Ar pbkdf_hash , Fl -pbkdf-prf-hidden Ns = Ns Ar pbkdf_hash
207 Specifies which hash algorithm to use for the PBKDF2 password
208 derivation for the hidden volume.
209 Only valid in conjunction with
211 If no algorithm is specified, the same as for the outer volume
213 To see which algorithms are supported, specify
214 .Fl -pbkdf-prf-hidden Ns = Ns Cm help .
215 .It Fl y Ar cipher , Fl -cipher-hidden Ns = Ns Ar cipher
216 Specifies which cipher algorithm or cascade of ciphers to use
217 to encrypt the hidden volume on the new TrueCrypt volume.
218 Only valid in conjunction with
220 If no cipher is specified, the same as for the outer volume
222 To see which algorithms are supported, specify
223 .Fl -cipher-hidden Ns = Ns Cm help .
224 .It Fl z, Fl -insecure-erase
225 Skips the secure erase of the disk.
226 Use this option carefully as it is a security risk!
229 Additional options for the
235 .Bl -tag -width indent
236 .It Fl e, Fl -protect-hidden
237 Specifies that an outer volume will be queried or mapped, but
238 its reported size will be adjusted accordingly to the size of
239 the hidden volume contained in it.
240 Both the hidden volume and outer volume passphrase and keyfiles
242 This option only applies to the
247 .It Fl s Ar system_device , Fl -system-encryption Ns = Ns Ar system_device
248 This option is required if you are attempting to access a device
249 that uses system encryption, for example an encrypted
252 It does not apply to disks using full disk encryption.
255 option will point at the actual encrypted partition, while the
257 argument will point to the parent device (i.e.\& underlying physical disk)
258 of the encrypted partition.
260 This option is intended to be used with disks using full disk encryption (FDE).
261 When a disk has been encrypted using TrueCrypt's FDE, the complete disk
262 is encrypted except for the first 63 sectors.
265 option should point to the whole disk device, not to any particular
267 The resultant mapping will cover the whole disk, and will not appear as
269 To access individual partitions after mapping,
273 This option is intended to be used when the primary headers of a volume
275 This option will force
277 to use the backup headers, which are located at the end of the device,
278 to access the volume.
281 Additional options only for the
284 .Bl -tag -width indent
285 .It Fl t , Fl -allow-trim
286 This option enables TRIM (discard) support on the mapped volume.
289 Additional options only for the
292 .Bl -tag -width indent
293 .It Fl -new-pbkdf-prf Ns = Ns Ar pbkdf_hash
294 Specifies which hash algorithm to use for the PBKDF2 password
295 derivation on reencrypting the volume header.
296 If this option is not specified, the reencrypted header will
298 To see which algorithms are supported, specify
299 .Fl -pbkdf-prf Ns = Ns Cm help .
300 .It Fl -new-keyfile Ns = Ns Ar keyfile
303 to use in addition to the new passphrase on reencrypting the
305 This option can appear multiple times; if so, multiple
306 keyfiles will be used.
307 .It Fl -restore-from-backup-hdr
308 If this option is specified, neither
315 Use this option to restore the volume headers from the backup
325 process makes it print progress on slower tasks
326 such as gathering entropy or wiping the volume.
328 TrueCrypt limits passphrases to 64 characters (including the terminating
330 To be compatible with it,
333 All passphrases (excluding keyfiles) are trimmed to 64 characters.
334 Similarly, keyfiles are limited to a size of 1 MB, but up to
335 256 keyfiles can be used.
336 .Sh PLAUSIBLE DENIABILITY
338 offers plausible deniability. Hidden volumes are created within an outer
340 Which volume is accessed solely depends on the passphrase and keyfile(s)
342 If the passphrase and keyfiles for the outer volume are specified,
343 no information about the existence of the hidden volume is exposed.
344 Without knowledge of the passphrase and keyfile(s) of the hidden volume
345 its existence remains unexposed.
346 The hidden volume can be protected when mapping the outer volume by
349 option and specifying the passphrase and keyfiles for both the outer
352 Create a new TrueCrypt volume on
354 using the cipher cascade
355 of AES and Twofish and the Whirlpool hash algorithm for
356 PBKDF2 password derivation and two keyfiles,
360 .Bd -ragged -offset indent
362 .Fl -device Ns = Ns Cm /dev/vn0
363 .Fl -cipher Ns = Ns Cm AES-256-XTS,TWOFISH-256-XTS
364 .Fl -pbkdf-prf Ns = Ns Cm whirlpool
365 .Fl -keyfile Ns = Ns Cm one.key
366 .Fl -keyfile Ns = Ns Cm two.key
369 Map the outer volume on the TrueCrypt volume on
373 but protect the hidden volume, using the keyfile
375 from being overwritten:
376 .Bd -ragged -offset indent
377 .Nm Fl -map Ns = Ns Cm truecrypt1
378 .Fl -device Ns = Ns Cm /dev/vn0
380 .Fl -keyfile-hidden Ns = Ns Cm hidden.key
383 Map the hidden volume on the TrueCrypt volume on
389 .Bd -ragged -offset indent
390 .Nm Fl -map Ns = Ns Cm truecrypt2
391 .Fl -device Ns = Ns Cm /dev/vn0
392 .Fl -keyfile Ns = Ns Cm hidden.key
395 Map and mount the volume in the file
398 .Bd -ragged -offset indent
399 .Sy losetup Cm /dev/loop1 Cm secvol
401 .Bd -ragged -offset indent
402 .Nm Fl -map Ns = Ns Cm secv
403 .Fl -device Ns = Ns Cm /dev/loop1
405 .Bd -ragged -offset indent
406 .Sy mount Cm /dev/mapper/secv Cm /mnt
411 .Bd -ragged -offset indent
412 .Sy vnconfig Cm vn1 Cm secvol
414 .Bd -ragged -offset indent
415 .Nm Fl -map Ns = Ns Cm secv
416 .Fl -device Ns = Ns Cm /dev/vn1
418 .Bd -ragged -offset indent
419 .Sy mount Cm /dev/mapper/secv Cm /mnt
427 .Bd -ragged -offset indent
428 .Sy dmsetup Cm remove Cm truecrypt2
432 .Bd -ragged -offset indent
433 .Nm Fl -unmap Ns = Ns Cm truecrypt2
436 A hidden volume whose existence can be plausibly denied and its outer volume
437 can for example be created with
438 .Bd -ragged -offset indent
441 .Fl -device Ns = Ns Cm /dev/loop0
442 .Fl -cipher Ns = Ns Cm AES-256-XTS,TWOFISH-256-XTS
443 .Fl -pbkdf-prf Ns = Ns Cm whirlpool
444 .Fl -keyfile Ns = Ns Cm one.key
445 .Fl -cipher-hidden Ns = Ns Cm AES-256-XTS
446 .Fl -pbkdf-prf-hidden Ns = Ns Cm whirlpool
447 .Fl -keyfile-hidden Ns = Ns Cm hidden.key
451 will prompt the user for the passphrase for both the outer and hidden volume
452 as well as the size of the hidden volume inside the outer volume.
453 The hidden volume will be created inside the area spanned by the outer volume.
454 The hidden volume can optionally use a different cipher and prf function
458 .Fl -pbkdf-prf-hidden
460 Which volume is later accessed depends only on which passphrase and keyfile(s)
462 so that the existence of the hidden volume remains unknown without knowledge
463 of the passphrase and keyfile it is protected by since it is located within
465 To map the outer volume without potentially damaging the hidden volume,
466 the passphrase and keyfile(s) of the hidden volume must be known and provided
471 A disk encrypted using full disk encryption can be mapped using
472 .Bd -ragged -offset indent
473 .Nm Fl -map Ns = Ns Cm tcplay_sdb
474 .Fl -device Ns = Ns Cm /dev/sdb
478 To access individual partitions on the now mapped disk,
479 the following command will generate mappings for each
480 individual partition on the encrypted disk:
481 .Bd -ragged -offset indent
482 .Sy kpartx Fl -av Cm /dev/mapper/tcplay_sdb
485 To restore the main volume header from the backup header, the following
487 .Bd -ragged -offset indent
489 .Fl -device Ns = Ns Cm /dev/sdb
490 .Fl -restore-from-backup-hdr
493 As with most other commands, which header is saved (used as source) depends
494 on the passphrase and keyfiles used.
496 To save a backup copy of a header, the following command can be used:
497 .Bd -ragged -offset indent
499 .Fl -device Ns = Ns Cm /dev/sdb
500 .Fl -save-hdr-backup Ns = Ns Cm /tmp/sdb_backup_header.hdr
503 As with most other commands, which header is saved (used as source) depends
504 on the passphrase and keyfiles used.
506 To restore a header from a backup header file, the following command can be
508 .Bd -ragged -offset indent
510 .Nm -use-hdr-file Ns = Ns Cm /tmp/sdb_backup_header.hdr
513 Similarly, to restore a hidden header from a backup header file:
514 .Bd -ragged -offset indent
516 .Nm -use-hidden-hdr-file Ns = Ns Cm /tmp/sdb_backup_hidden_header.hdr
519 Which header is used as the source of the operation will still depend on the
520 passphrase and keyfiles used.
522 .Fl -use-hidden-hdr-file
523 option, if you specify the passphrase and keyfiles for the main header, the
524 main header will be used instead.