a98ccf47e22183c5787bbc7f97c51ecfb23c6ea2
[dragonfly.git] / sbin / tcplay / tcplay.8
1 .\"
2 .\" Copyright (c) 2011
3 .\"     The DragonFly Project.  All rights reserved.
4 .\"
5 .\" Redistribution and use in source and binary forms, with or without
6 .\" modification, are permitted provided that the following conditions
7 .\" are met:
8 .\"
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
14 .\"    distribution.
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.
18 .\"
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
30 .\" SUCH DAMAGE.
31 .\"
32 .Dd July 5, 2011
33 .Dt TCPLAY 8
34 .Os
35 .Sh NAME
36 .Nm tcplay
37 .Nd tool to manage TrueCrypt volumes
38 .Sh SYNOPSIS
39 .Nm
40 .Fl c
41 .Fl d Ar device
42 .Op Fl g
43 .Op Fl a Ar pbkdf_hash
44 .Op Fl b Ar cipher
45 .Op Fl k Ar keyfile
46 .Op Fl f Ar keyfile_hidden
47 .Nm
48 .Fl i
49 .Fl d Ar device
50 .Op Fl e
51 .Op Fl s Ar system_device
52 .Nm
53 .Fl m Ar mapping
54 .Fl d Ar device
55 .Op Fl e
56 .Op Fl s Ar system_device
57 .Sh DESCRIPTION
58 The
59 .Nm
60 utility provides full support for creating and opening/mapping
61 TrueCrypt-compatible volumes.
62 It supports the following commands, each with a set of options
63 detailed further below:
64 .Bl -tag -width indent
65 .It Fl c , Fl -create
66 Create a new encrypted TrueCrypt volume on the device
67 specified by
68 .Fl -device .
69 .It Fl i , Fl -info
70 Print out information about the encrypted device specified by
71 .Fl -device .
72 .It Fl m Ar mapping , Fl -map Ns = Ns Ar mapping
73 Map the encrypted TrueCrypt volume on the device specified by
74 .Fl -device
75 as a
76 .Xr dm 4
77 mapping called
78 .Ar mapping .
79 .El
80 .Pp
81 Options common to all commands are:
82 .Bl -tag -width indent
83 .It Fl d Ar device , Fl -device Ns = Ns Ar device
84 Specifies the disk
85 .Ar device
86 on which the TrueCrypt volume resides/will reside.
87 This option is mandatory for all commands.
88 .It Fl k Ar keyfile , Fl -keyfile Ns = Ns Ar keyfile
89 Specifies a
90 .Ar keyfile
91 to use in addition to the passphrase.
92 This option can appear multiple times; if so, multiple
93 keyfiles will be used.
94 .It Fl f Ar keyfile , Fl -keyfile-hidden Ns = Ns Ar keyfile
95 Specifies a
96 .Ar keyfile
97 to use in addition to the passphrase when either creating a
98 hidden volume or when protecting a hidden volume while mapping
99 or querying the outer volume.
100 If you only intend to map a hidden volume, the
101 .Fl -keyfile
102 option has to be used.
103 This option can appear multiple times; if so, multiple
104 keyfiles will be used.
105 .El
106 .Pp
107 Additional options for the
108 .Fl -create
109 command are:
110 .Bl -tag -width indent
111 .It Fl a Ar pbkdf_hash , Fl -pbkdf-prf Ns = Ns Ar pbkdf_hash
112 Specifies with hash algorithm to use for the PBKDF2 password
113 derivation.
114 To see which algorithms are supported, specify
115 .Fl -pbkdf-prf Ns = Ns Ar help .
116 .It Fl b Ar cipher , Fl -cipher Ns = Ns Ar cipher
117 Specifies with cipher algorithm or cascade of ciphers to use
118 to encrypt the new volume.
119 To see which algorithms are supported, specify
120 .Fl -cipher Ns = Ns Ar help .
121 .It Fl x Ar pbkdf_hash , Fl -pbkdf-prf-hidden Ns = Ns Ar pbkdf_hash
122 Specifies with hash algorithm to use for the PBKDF2 password
123 derivation for the hidden volume.
124 Only valid in conjunction with
125 .Fl -hidden .
126 If no algorithm is specified, the same as for the outer volume
127 will be used.
128 To see which algorithms are supported, specify
129 .Fl -pbkdf-prf-hidden Ns = Ns Ar help .
130 .It Fl y Ar cipher , Fl -cipher-hidden Ns = Ns Ar cipher
131 Specifies with cipher algorithm or cascade of ciphers to use
132 to encrypt the hidden volume on the new TrueCrypt volume.
133 Only valid in conjunction with
134 .Fl -hidden .
135 If no cipher is specified, the same as for the outer volume
136 will be used.
137 To see which algorithms are supported, specify
138 .Fl -cipher-hidden Ns = Ns Ar help .
139 .It Fl g, Fl -hidden
140 Specifies that the newly created volume will contain a hidden
141 volume.
142 The keyfiles applied to the passphrase for the hidden
143 volume are those specified by
144 .Fl -keyfile-hidden .
145 The user will be prompted for the size of the hidden volume
146 interactively.
147 .El
148 .Pp
149 Additional options for the
150 .Fl -info
151 and
152 .Fl -map
153 commands are:
154 .Bl -tag -width indent
155 .It Fl e, Fl -protect-hidden
156 Specifies that an outer volume will be queried or mapped, but
157 its reported size will be adjusted accordingly to the size of
158 the hidden volume contained in it.
159 Both the hidden volume and outer volume passphrase and keyfiles
160 will be required.
161 .It Fl s Ar system_device , Fl -system-encryption Ns = Ns Ar system_device
162 This option is required if you are attempting to access a device
163 that uses system encryption, for example an encrypted
164 .Tn Windows
165 system partition.
166 The
167 .Fl -device
168 option will point at the actual encrypted partition, while the
169 .Ar system_device
170 argument will point to the parent device (i.e.\& underlying physical disk)
171 of the encrypted partition.
172 .El
173 .Sh EXAMPLES
174 Create a new TrueCrypt volume on
175 .Pa /dev/vn0
176 using the cipher cascade
177 of AES and Twofish and the Whirlpool hash algorithm for
178 PBKDF2 password derivation and two keyfiles,
179 .Pa one.key
180 and
181 .Pa two.key :
182 .Bd -ragged -offset indent
183 .Nm Fl -create
184 .Fl -device Ns = Ns Ar /dev/vn0
185 .Fl -cipher Ns = Ns Ar AES-256-XTS,TWOFISH-256-XTS
186 .Fl -pbkdf-prf Ns = Ns Ar whirlpool
187 .Fl -keyfile Ns = Ns Ar one.key
188 .Fl -keyfile Ns = Ns Ar two.key
189 .Ed
190 .Pp
191 Map the outer volume on the TrueCrypt volume on
192 .Pa /dev/vn0
193 as
194 .Sy truecrypt1 ,
195 but protect the hidden volume, using the keyfile
196 .Pa hidden.key ,
197 from being overwritten:
198 .Bd -ragged -offset indent
199 .Nm Fl -map Ns = Ns Ar truecrypt1
200 .Fl -device Ns = Ns Ar /dev/vn0
201 .Fl -protect-hidden
202 .Fl -keyfile-hidden Ns = Ns Ar hidden.key
203 .Ed
204 .Pp
205 Map the hidden volume on the TrueCrypt volume on
206 .Pa /dev/vn0
207 as
208 .Sy truecrypt2 ,
209 using the keyfile
210 .Pa hidden.key :
211 .Bd -ragged -offset indent
212 .Nm Fl -map Ns = Ns Ar truecrypt2
213 .Fl -device Ns = Ns Ar /dev/vn0
214 .Fl -keyfile Ns = Ns Ar hidden.key
215 .Ed
216 .Sh SEE ALSO
217 .Xr crypttab 5 ,
218 .Xr cryptsetup 8
219 .Sh HISTORY
220 The
221 .Nm
222 utility appeared in
223 .Dx 2.11 .
224 .Sh AUTHORS
225 .An Alex Hornung