cryptsetup.8 37.8 KB
Newer Older
Arno Wagner's avatar
Arno Wagner committed
1
.TH CRYPTSETUP "8" "May 2012" "cryptsetup" "Maintenance Commands"
2
.SH NAME
Arno Wagner's avatar
Arno Wagner committed
3
cryptsetup - manage plain dm-crypt and LUKS encrypted volumes
4 5 6 7
.SH SYNOPSIS
.B cryptsetup <options> <action> <action args>
.SH DESCRIPTION
.PP
8 9
cryptsetup is used to conveniently setup dm-crypt managed
device-mapper mappings. These include plain dm-crypt volumes and
Arno Wagner's avatar
Arno Wagner committed
10
LUKS volumes. The difference is that LUKS uses a metadata header
11
and can hence offer more features than plain dm-crypt. On the other
Arno Wagner's avatar
Arno Wagner committed
12
hand, the header is visible and vulnerable to damage.
13 14 15 16 17 18
.SH PLAIN DM-CRYPT OR LUKS?
.PP
Unless you understand the cryptographic background well, use LUKS.
With plain dm-crypt there are a number of possible user errors
that massively decrease security. While LUKS cannot fix them
all, it can lessen the impact for many of them.
Arno Wagner's avatar
Arno Wagner committed
19
.SH WARNINGS
20
.PP
Arno Wagner's avatar
Arno Wagner committed
21 22 23
A lot of good information on the risks of using encrypted storage,
on handling problems and on security aspects can be found in the
\fICryptsetup FAQ\fR. Read it. Nonetheless, some risks deserve
24
to be mentioned here.
Arno Wagner's avatar
Arno Wagner committed
25 26 27 28 29 30

\fBBackup:\fR Storage media die. Encryption has no influence on that.
Backup is mandatory for encrypted data as well, if the data has any
worth. See the Cryptsetup FAQ for advice on how to do backup of an
encrypted volume.

31 32
\fBCharacter encoding:\fR If you enter a
passphrase with special symbols, the passphrase can change
Arno Wagner's avatar
Arno Wagner committed
33 34 35 36 37 38
depending character encoding. Keyboard settings can also change,
which can make blind input hard or impossible. For
example, switching from some ASCII 8-bit variant to UTF-8
can lead to a different binary encoding and hence different
passphrase seen by cryptsetup, even if what you see on
the terminal is exactly the same. It is therefore highly
39
recommended to select passphrase characters only from 7-bit
Arno Wagner's avatar
Arno Wagner committed
40 41 42 43 44 45 46
ASCII, as the encoding for 7-bit ASCII stays the same for
all ASCII variants and UTF-8.

\fBLUKS header:\fR If the header of a LUKS volume gets damaged,
all data is permanently lost unless you have a header-backup.
If a key-slot is damaged, it can only be restored from a header-backup
or if another active key-slot with known passphrase is undamaged.
47 48 49 50
Damaging the LUKS header is something people manage to do with
surprising frequency. This risk is the result of a trade-off
between security and safety, as LUKS is designed for fast and
secure wiping by just overwriting header and key-slot area.
51 52 53 54 55 56 57 58 59 60 61

\fBPreviously used partitions:\fR If a partition was previously used,
it is a very good idea to wipe filesystem signatures, data, etc. before
creating a LUKS or plain dm-crypt container on it. 
For a quick removal of filesystem signatures, use "wipefs". Take care 
though that this may not remove everything. In particular md (RAID) 
signatures at the end of a device may survive. It also does not 
remove data. For a full wipe, overwrite the whole partition before 
container creation. If you do not know how to to that, the
cryptsetup FAQ describes several options.

62 63
.SH BASIC COMMANDS
The following are valid actions for all supported device types.
Arno Wagner's avatar
Arno Wagner committed
64

65 66 67
\fIopen\fR <name> <device> \-\-type <device_type>
.IP
Opens (creates a mapping) with <name> backed by device <device>.
Arno Wagner's avatar
Arno Wagner committed
68

69 70
Device type can be \fIplain\fR, \fIluks\fR (default), \fIloopaes\fR
or \fItcrypt\fR.
71

72
For backward compatibility there are \fBopen\fR command aliases:
73

74 75 76 77 78 79 80 81 82
\fBcreate\fR: open \-\-type plain <device> <name>\fR switched arguments)
.br
\fBplainOpen\fR: open \-\-type plain
.br
\fBluksOpen\fR: open \-\-type luks
.br
\fBloopaesOpen\fR: open \-\-type loopaes
.br
\fBtcryptOpen\fR: open \-\-type tcrypt
Arno Wagner's avatar
Arno Wagner committed
83

84 85
\fB<options>\fR are type specific and are described below
for individual device types.
86
.PP
87
\fIclose\fR <name>
88
.IP
Arno Wagner's avatar
Arno Wagner committed
89
Removes the existing mapping <name> and wipes the key from kernel memory.
90 91 92 93 94

For backward compatibility there are \fBclose\fR command aliases:
\fBremove\fR, \fBplainClose\fR, \fBluksClose\fR, \fBloopaesClose\fR,
\fBtcryptClose\fR (all behaves exactly the same, device type is
determined automatically from active device).
95 96 97
.PP
\fIstatus\fR <name>
.IP
Arno Wagner's avatar
Arno Wagner committed
98
Reports the status for the mapping <name>.
99 100 101
.PP
\fIresize\fR <name>
.IP
Arno Wagner's avatar
Arno Wagner committed
102
Resizes an active mapping <name>.
103

104
If \-\-size (in sectors) is not specified, the size of the
Arno Wagner's avatar
Arno Wagner committed
105 106 107
underlying block device is used. Note that this does not
change the raw device geometry, it just changes how many
sectors of the raw device are represented in the mapped device.
108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131
.SH PLAIN MODE
Plain dm-crypt encrypts the device sector-by-sector with a
single, non-salted hash of the passphrase. No checks
are performed, no metadata is used. There is no formatting operation.
When the raw device is mapped (created), the usual device operations
can be used on the mapped device, including filesystem creation.
Mapped devices usually reside in /dev/mapper/<name>.

The following are valid plain device type actions:

\fIopen\fR \-\-type plain <device> <name>
.br
\fIcreate\fR <name> <device> (\fBOBSOLETE syntax\fR)
.IP
Creates a mapping with <name> backed by device <device>.

\fB<options>\fR can be [\-\-hash, \-\-cipher, \-\-verify-passphrase,
\-\-key-file, \-\-keyfile-offset, \-\-key-size, \-\-offset, \-\-skip, \-\-size,
\-\-readonly, \-\-shared, \-\-allow-discards]

Example: 'cryptsetup open --type plain /dev/sda10 e1' maps the raw
encrypted device /dev/sda10 to the mapped (decrypted) device
/dev/mapper/e1, which can then be mounted, fsck-ed or have a
filesystem created on it.
132
.SH LUKS EXTENSION
Arno Wagner's avatar
Arno Wagner committed
133
LUKS, the Linux Unified Key Setup, is a standard for disk encryption.
134
It adds a standardized header at the start of the device,
Arno Wagner's avatar
Arno Wagner committed
135 136 137 138 139 140 141 142
a key-slot area directly behind the header and the bulk
data area behind that. The whole set is called a 'LUKS container'.
The device that a LUKS container resides on is called a 'LUKS device'.
For most purposes both terms can be used interchangeably. But
note that when the LUKS header is at a nonzero offset
in a device, then the device is not a LUKS device anymore, but
has a LUKS container stored in it at an offset.

143 144
LUKS can manage multiple passphrases that can be individually revoked
or changed and that can be securely scrubbed from persistent
Arno Wagner's avatar
Arno Wagner committed
145 146 147 148 149 150
media due to the use of anti-forensic stripes. Passphrases
are protected against brute-force and dictionary
attacks by PBKDF2, which implements hash iteration and salting
in one function.

Each passphrase, also called a
151
.B key
Arno Wagner's avatar
Arno Wagner committed
152
in this document, is associated with one of 8 key-slots.
153
Key operations that do not specify a slot affect the first slot
Arno Wagner's avatar
Arno Wagner committed
154 155
that matches the supplied passphrase or the first empty slot if
a new passphrase is added.
156

Arno Wagner's avatar
Arno Wagner committed
157
The following are valid LUKS actions:
158 159 160

\fIluksFormat\fR <device> [<key file>]
.IP
Arno Wagner's avatar
Arno Wagner committed
161 162
Initializes a LUKS partition and sets the initial passphrase
(for key-slot 0), 
163 164
either via prompting or via <key file>. Note that
if the second argument is present, then the passphrase
Arno Wagner's avatar
Arno Wagner committed
165 166
is taken from the file given there, without the need
to use the \-\-key-file option. Also note that for both forms
167
of reading the passphrase from file you can
Arno Wagner's avatar
Arno Wagner committed
168 169 170 171
give '-' as file name, which results in the passphrase being read
from stdin and the safety-question being skipped.

You can only call luksFormat on a LUKS device that is not mapped.
172

173 174
\fB<options>\fR can be [\-\-cipher, \-\-verify-passphrase, \-\-key-size,
\-\-key-slot, \-\-key-file (takes precedence over optional second argument),
175 176
\-\-keyfile-offset, \-\-keyfile-size, \-\-use-random | \-\-use-urandom,
\-\-uuid, \-\-master-key-file].
Arno Wagner's avatar
Arno Wagner committed
177 178 179 180

\fBWARNING:\fR Doing a luksFormat on an existing LUKS container will
make all data the old container permanently irretrievable, unless
you have a header backup.
181
.PP
182 183 184
\fIopen\fR \-\-type luks <device> <name>
.br
\fIluksOpen\fR <device> <name> (\fBold syntax\fR)
185
.IP
Arno Wagner's avatar
Arno Wagner committed
186
Opens the LUKS device <device> and sets up a mapping <name> after
187
successful verification of the supplied passphrase.
Arno Wagner's avatar
Arno Wagner committed
188 189
If the passphrase is not supplied via \-\-key-file, the command
prompts for it interactively.
190

191
The <device> parameter can be also specified by LUKS UUID in the
Arno Wagner's avatar
Arno Wagner committed
192
format UUID=<uuid>, which uses the symlinks in /dev/disk/by-uuid.
193

194
\fB<options>\fR can be [\-\-key-file, \-\-keyfile-offset,
195
\-\-keyfile-size, \-\-readonly, \-\-test-passphrase,
196
\-\-allow-discards, \-\-header, \-\-key-slot, \-\-master-key-file].
197
.PP
198 199
\fIluksSuspend\fR <name>
.IP
Arno Wagner's avatar
Arno Wagner committed
200 201 202 203
Suspends an active device (all IO operations will blocked
and accesses to the device will wait indefinitely)
and wipes the encryption
key from kernel memory. Needs kernel 2.6.19 or later.
204

Arno Wagner's avatar
Arno Wagner committed
205
After this operation you have to use \fIluksResume\fR to reinstate
206
the encryption key and unblock the device or \fIclose\fR to remove
Arno Wagner's avatar
Arno Wagner committed
207
the mapped device.
208

Arno Wagner's avatar
Arno Wagner committed
209
\fBWARNING:\fR never suspend the device on which the cryptsetup binary resides.
210 211

\fB<options>\fR can be [\-\-header].
212 213 214
.PP
\fIluksResume\fR <name>
.IP
215
Resumes a suspended device and reinstates the encryption key.
Arno Wagner's avatar
Arno Wagner committed
216
Prompts interactively for a passphrase if \-\-key-file is not given.
217

218
\fB<options>\fR can be [\-\-key-file, \-\-keyfile-size, \-\-header]
219
.PP
Arno Wagner's avatar
Arno Wagner committed
220
\fIluksAddKey\fR <device> [<key file with new key>]
221
.IP
222
adds a new passphrase. An existing passphrase must be supplied
Arno Wagner's avatar
Arno Wagner committed
223 224 225
interactively or via \-\-key-file.
The new passphrase to be added can be specified interactively
or read from the file given as positional argument.
226

227
\fB<options>\fR can be [\-\-key-file, \-\-keyfile-offset,
Arno Wagner's avatar
Arno Wagner committed
228
\-\-keyfile-size, \-\-new-keyfile-offset,
229
\-\-new-keyfile-size, \-\-key-slot, \-\-master-key-file].
230
.PP
231
\fIluksRemoveKey\fR <device> [<key file with passphrase to be removed>]
232
.IP
Arno Wagner's avatar
Arno Wagner committed
233 234 235 236
Removes the supplied passphrase from the LUKS device. The
passphrase to be removed can be specified interactively,
as positional argument or via \-\-key-file.

237
\fB<options>\fR can be [\-\-key-file, \-\-keyfile-offset,
Arno Wagner's avatar
Arno Wagner committed
238 239
\-\-keyfile-size]

240 241 242
\fBWARNING:\fR If you read the passphrase from stdin
(without further argument or with '-' as argument 
to \-\-key-file), batch-mode (-q) will be implicitely
243
switched on and no warning will be given when you remove the
Arno Wagner's avatar
Arno Wagner committed
244
last remaining passphrase from a LUKS container. Removing
245
the last passphrase makes the LUKS container permanently
Arno Wagner's avatar
Arno Wagner committed
246
inaccessible.
247
.PP
Milan Broz's avatar
Milan Broz committed
248 249
\fIluksChangeKey\fR <device> [<new key file>]
.IP
Arno Wagner's avatar
Arno Wagner committed
250 251
Changes an existing passphrase. The passphrase
to be changed must be supplied interactively or via \-\-key-file.
252
The new passphrase can be supplied interactively or in
Arno Wagner's avatar
Arno Wagner committed
253 254 255 256 257 258
a file given as positional argument.

If a key-slot is specified (via \-\-key-slot), the passphrase
for that key-slot must be given and the new passphrase
will overwrite the specified key-slot. If no key-slot
is specified and there is still a free key-slot, then
259
the new passphrase will be put into a free key-slot before the
Arno Wagner's avatar
Arno Wagner committed
260 261 262 263 264 265 266
key-slot containing the old passphrase is purged. If there is
no free key-slot, then the key-slot with the old passphrase is
overwritten directly.

\fBWARNING:\fR If a key-slot is overwritten, a media failure
during this operation can cause the overwrite to fail after
the old passphrase has been wiped and make the LUKS container
267
inaccessible.
Arno Wagner's avatar
Arno Wagner committed
268

269
\fB<options>\fR can be [\-\-key-file, \-\-keyfile-offset,
Arno Wagner's avatar
Arno Wagner committed
270
\-\-keyfile-size, \-\-new-keyfile-offset,
271
\-\-new-keyfile-size, \-\-key-slot].
Milan Broz's avatar
Milan Broz committed
272
.PP
273 274
\fIluksKillSlot\fR <device> <key slot number>
.IP
275
Wipe the key-slot number <key slot> from the LUKS device. A remaining
Arno Wagner's avatar
Arno Wagner committed
276 277 278 279
passphrase must be supplied, either interactively or via \-\-key-file.
This command can remove the last remaining key-slot, but requires
an interactive confirmation when doing so. Removing the last
passphrase makes a LUKS container permanently inaccessible.
280

281
\fB<options>\fR can be [\-\-key-file, \-\-keyfile-offset, \-\-keyfile-size].
Arno Wagner's avatar
Arno Wagner committed
282

283
\fBWARNING:\fR If you read the passphrase from stdin
284
(without further argument or with '-' as argument
285
to \-\-key-file), batch-mode (-q) will be implicitely
286
switched on and no warning will be given when you remove the
287
last remaining passphrase from a LUKS container. Removing
288
the last passphrase makes the LUKS container permanently
289
inaccessible.
290 291 292
.PP
\fIluksUUID\fR <device>
.IP
Arno Wagner's avatar
Arno Wagner committed
293 294 295
Print the UUID of a LUKS device.
.br
Set new UUID if \fI\-\-uuid\fR option is specified.
296 297 298
.PP
\fIisLuks\fR <device>
.IP
Arno Wagner's avatar
Arno Wagner committed
299 300
Returns true, if <device> is a LUKS device, false otherwise.
Use option \-v to get human-readable feedback. 'Command successful.'
301
means the device is a LUKS device.
302 303 304
.PP
\fIluksDump\fR <device>
.IP
Arno Wagner's avatar
Arno Wagner committed
305
Dump the header information of a LUKS device.
306

307
If the \-\-dump-master-key option is used, the LUKS device master key is
Arno Wagner's avatar
Arno Wagner committed
308 309 310
dumped instead of the keyslot info. Beware that the master key cannot be
changed and can be used to decrypt the data stored in the LUKS container
without a passphrase and even without the LUKS header. This means
311 312
that if the master key is compromised, the whole device has to be
erased to prevent further access. Use this option carefully.
313

Arno Wagner's avatar
Arno Wagner committed
314 315
In order to dump the master key, a passphrase has to be supplied,
either interactively or via \-\-key-file. 
316

317
\fB<options>\fR can be [\-\-dump-master-key, \-\-key-file,
Arno Wagner's avatar
Arno Wagner committed
318
\-\-keyfile-offset, \-\-keyfile-size].
319

Arno Wagner's avatar
Arno Wagner committed
320
\fBWARNING:\fR If \-\-dump-master-key is used with \-\-key-file
321
and the argument to \-\-key-file is '-', no validation question
Arno Wagner's avatar
Arno Wagner committed
322
will be asked and no warning given.
323
.PP
324
\fIluksHeaderBackup\fR <device> \-\-header-backup-file <file>
325
.IP
Arno Wagner's avatar
Arno Wagner committed
326 327
Stores a binary backup of the LUKS header and keyslot area.
.br
328
Note: Using '-' as filename writes the header backup to a file named '-'.
Arno Wagner's avatar
Arno Wagner committed
329 330

\fBWARNING:\fR This backup file and a passphrase valid
331 332
at the time of backup allows decryption of the
LUKS data area, even if the passphrase was later changed or
Arno Wagner's avatar
Arno Wagner committed
333 334
removed from the LUKS device. Also note that with a header
backup you lose the ability to securely wipe the LUKS
335 336
device by just overwriting the header and key-slots. You
either need to securely erase all header backups in
Arno Wagner's avatar
Arno Wagner committed
337 338
addition or overwrite the encrypted data area as well.
The second option is less secure, as some sectors
339
can survive, e.g. due to defect management.
340
.PP
341
\fIluksHeaderRestore\fR <device> \-\-header-backup-file <file>
342
.IP
343
Restores a binary backup of the LUKS header and keyslot area
Arno Wagner's avatar
Arno Wagner committed
344 345 346
from the specified file.
.br
Note: Using '-' as filename reads the header backup from a file named '-'.
347

Arno Wagner's avatar
Arno Wagner committed
348 349
\fBWARNING:\fR Header and keyslots will be replaced, only
the passphrases from the backup will work afterwards.
350

351 352
This command requires that the master key size and data offset
of the LUKS header already on the device and of the header backup
Arno Wagner's avatar
Arno Wagner committed
353 354
match. Alternatively, if there is no LUKS header on the device,
the backup will also be written to it.
Milan Broz's avatar
Milan Broz committed
355
.SH loop-AES EXTENSION
Arno Wagner's avatar
Arno Wagner committed
356 357
cryptsetup supports mapping loop-AES encrypted partition using
a compatibility mode.
358
.PP
359 360 361
\fIopen\fR \-\-type loopaes <device> <name> \-\-key-file <keyfile>
.br
\fIloopaesOpen\fR <device> <name> \-\-key-file <keyfile>  (\fBold syntax\fR)
362
.IP
Arno Wagner's avatar
Arno Wagner committed
363
Opens the loop-AES <device> and sets up a mapping <name>.
364

Arno Wagner's avatar
Arno Wagner committed
365 366 367
If the key file is encrypted with GnuPG, then you have to use
\-\-key-file=- and decrypt it before use, e.g. like this:
.br
368
gpg \-\-decrypt <keyfile> | cryptsetup loopaesOpen \-\-key-file=- <device> <name>
369

370
Use \fB\-\-keyfile-size\fR to specify the proper key length if needed.
371

372
Use \fB\-\-offset\fR to specify device offset. Note that the units
Arno Wagner's avatar
Arno Wagner committed
373
need to be specified in number of 512 byte sectors.
Milan Broz's avatar
Milan Broz committed
374

375 376 377
Use \fB\-\-skip\fR to specify the IV offset. If the original device
used an offset and but did not use it in IV sector calculations,
you have to explicitly use \fB\-\-skip 0\fR in addition to the offset
Arno Wagner's avatar
Arno Wagner committed
378
parameter.
379

380 381
Use \fB\-\-hash\fR to override the default hash function for
passphrase hashing (otherwise it is detected according to key
Arno Wagner's avatar
Arno Wagner committed
382
size).
383

384 385
\fB<options>\fR can be [\-\-key-file, \-\-key-size, \-\-offset, \-\-skip,
\-\-hash, \-\-readonly, \-\-allow-discards].
386
.PP
Arno Wagner's avatar
Arno Wagner committed
387 388
See also section 7 of the FAQ and \fBhttp://loop-aes.sourceforge.net\fR
for more information regarding loop-AES.
Milan Broz's avatar
Milan Broz committed
389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410
.SH TCRYPT (TrueCrypt-compatible) EXTENSION
cryptsetup supports mapping of TrueCrypt or tcplay encrypted partition
using a native Linux kernel API.
Header formatting and TCRYPT header change is not supported, cryptsetup
never changes TCRYPT header on-device.

TCRYPT extension requires kernel userspace crypto API to be available
(kernel af_alg and algif_skcipher modules, introduced in Linux kernel 2.6.38).

Because TCRYPT header is encrypted, you have to always provide valid
passphrase and keyfiles.

Cryptsetup should recognize all header variants, except legacy cipher chains
using LRW encryption mode with 64 bits encryption block (namely Blowfish
in LRW mode is not recognized, this is limitation of kernel crypto API).

\fBNOTE:\fR Activation with \fBtcryptOpen\fR is supported only for cipher chains
using LRW or XTS encryption modes.

The \fBtcryptDump\fR command should work for all recognized TCRYPT devices
and doesn't require superuser privilege.

411 412 413 414
To map system device (device with boot loader where the whole encrypted
system resides) use \fB\-\-tcrypt-system\fR option. Use the whole
device not the system partition as the device parameter.

Milan Broz's avatar
Milan Broz committed
415
To use hidden header (and map hidden device, if available),
416
use \fB\-\-tcrypt-hidden\fR option.
Milan Broz's avatar
Milan Broz committed
417
.PP
418 419 420
\fIopen\fR \-\-type tcrypt <device> <name>
.br
\fItcryptOpen\fR <device> <name>  (\fBold syntax\fR)
Milan Broz's avatar
Milan Broz committed
421 422 423
.IP
Opens the TCRYPT (a TrueCrypt-compatible) <device> and sets up a mapping <name>.

424 425
\fB<options>\fR can be [\-\-key-file, \-\-tcrypt-hidden, \-\-tcrypt-system,
\-\-readonly, \-\-test-passphrase].
Milan Broz's avatar
Milan Broz committed
426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442

The keyfile parameter allows combination of file content with the
passphrase and can be repeated. Note that using keyfiles is compatible
with TCRYPT and is different from LUKS keyfile logic.
.PP
\fItcryptDump\fR <device>
.IP
Dump the header information of a TCRYPT device.

If the \-\-dump-master-key option is used, the TCRYPT device master key is
dumped instead of TCRYPT header info. Beware that the master key
(or concatenated master keys if cipher chain is used)
can be used to decrypt the data stored in the TCRYPT container without
a passphrase.
This means that if the master key is compromised, the whole device has
to be erased to prevent further access. Use this option carefully.

443 444
\fB<options>\fR can be [\-\-dump-master-key, \-\-key-file, \-\-tcrypt-hidden,
\-\-tcrypt-system].
Milan Broz's avatar
Milan Broz committed
445 446 447 448 449 450 451 452 453

The keyfile parameter allows combination of file content with the
passphrase and can be repeated.
.PP
See also \fBhttp://www.truecrypt.org\fR for more information regarding
TrueCrypt.

Please note that cryptsetup does not use TrueCrypt code, please report
all problems related to this compatibility extension to cryptsetup project.
Milan Broz's avatar
Milan Broz committed
454 455
.SH MISCELLANEOUS
.PP
456 457 458 459 460 461 462 463 464 465 466 467 468
\fIrepair\fR <device>
.IP
Tries to repair the device metadata if possible. Currently supported only
for LUKS device type.

This command is useful to fix some known benign LUKS metadata
header corruptions. Only basic corruptions of unused keyslot
are fixable. This command will only change the LUKS header, not
any key-slot data.

\fBWARNING:\fR Always create a binary backup of the original
header before calling this command.
.PP
Milan Broz's avatar
Milan Broz committed
469 470
\fIbenchmark\fR <options>
.IP
471 472
Benchmarks ciphers and KDF (key derivation function).
Without parameters it tries to measure few common configurations.
Milan Broz's avatar
Milan Broz committed
473 474

To benchmark other ciphers or modes, you need to specify \fB\-\-cipher\fR
475
and \fB\-\-key-size\fR options or \fB\-\-hash\fR for KDF test.
Milan Broz's avatar
Milan Broz committed
476 477 478 479

\fBNOTE:\fR This benchmark is using memory only and is only informative.
You cannot directly predict real storage encryption speed from it.

480 481 482
For testing block ciphers, this benchmark requires kernel userspace
crypto API to be available (kernel af_alg and algif_skcipher modules,
introduced in Linux kernel 2.6.38).
Milan Broz's avatar
Milan Broz committed
483

484
\fB<options>\fR can be [\-\-cipher, \-\-key-size, \-\-hash].
485 486
.SH OPTIONS
.TP
487
.B "\-\-verbose, \-v"
Arno Wagner's avatar
Arno Wagner committed
488
Print more information on command execution.
489 490
.TP
.B "\-\-debug"
Arno Wagner's avatar
Arno Wagner committed
491 492
Run in debug mode with full diagnostic logs. Debug output
lines are always prefixed by '#'.
493
.TP
Arno Wagner's avatar
Arno Wagner committed
494
.B "\-\-hash, \-h \fI<hash-spec>\fR"
495
Specifies the passphrase hash for \fIopen\fR (for plain and loopaes device types).
496

497
Specifies the hash used in the LUKS key setup scheme and volume key digest
Arno Wagner's avatar
Arno Wagner committed
498
for \fIluksFormat\fR.
499

500 501
The specified hash name is passed to the compiled-in crypto backend.
Different backends may support different hashes.
Arno Wagner's avatar
Arno Wagner committed
502
For \fIluksFormat\fR, the hash 
503
algorithm must provide at least 160 bits of output, which
Arno Wagner's avatar
Arno Wagner committed
504 505
excludes, e.g., MD5. Do not use a non-crypto hash like
\fB"crc32"\fR as this breaks security.
506

507
Values compatible with old version of cryptsetup are
508
\fB"ripemd160"\fR for \fIopen \-\-type plain\fR and
Arno Wagner's avatar
Arno Wagner committed
509
\fB"sha1"\fR for \fIluksFormat\fR.
510

Arno Wagner's avatar
Arno Wagner committed
511
Use \fIcryptsetup \-\-help\fR to show the defaults.
512
.TP
Arno Wagner's avatar
Arno Wagner committed
513 514 515 516 517 518 519 520 521 522 523
.B "\-\-cipher, \-c \fI<cipher-spec>\fR"
Set the cipher specification string.

\fIcryptsetup \-\-help\fR shows the compiled-in defaults.
The current default in the distributed sources is
"aes-cbc-essiv:sha256" for both plain dm-crypt and LUKS.

For XTS mode (a possible future default), use "aes-xts-plain"
or better "aes-xts-plain64"
as cipher specification and optionally set a key size of
512 bits with the \-s option. Key size for XTS
524 525
mode is twice that for other modes for the same
security level.
Arno Wagner's avatar
Arno Wagner committed
526

527
XTS mode requires kernel 2.6.24 or later and plain64 requires
Arno Wagner's avatar
Arno Wagner committed
528
kernel 2.6.33 or later. More information can be found in the FAQ.
529 530
.TP
.B "\-\-verify-passphrase, \-y"
Arno Wagner's avatar
Arno Wagner committed
531
When interactively asking for a passphrase, ask for it twice
532 533
and complain if both inputs do not match. Advised when creating
a regular mapping for the first time, or when running
Arno Wagner's avatar
Arno Wagner committed
534
\fIluksFormat\fR. Ignores on input from file or stdin.
535
.TP
Arno Wagner's avatar
Arno Wagner committed
536 537
.B "\-\-key-file, \-d \fIname\fR"
Read the passphrase from file.
538

539
If the name given is "-", then the passphrase will be read from stdin.
Arno Wagner's avatar
Arno Wagner committed
540
In this case, reading will not stop at newline characters.
541

542 543 544
With LUKS, passphrases supplied via \-\-key-file are always
the existing passphrases requested by a command, except in
the case of \fIluksFormat\fR where \-\-key-file is equivalent
Arno Wagner's avatar
Arno Wagner committed
545
to the positional key file argument.
546

547
If you want to set a new passphrase via key file, you have to
Arno Wagner's avatar
Arno Wagner committed
548
use a positional argument to \fIluksAddKey\fR.
549

Arno Wagner's avatar
Arno Wagner committed
550
See section \fBNOTES ON PASSPHRASE PROCESSING\fR for more information.
551
.TP
552
.B "\-\-keyfile-offset \fIvalue\fR"
Arno Wagner's avatar
Arno Wagner committed
553 554
Skip \fIvalue\fR bytes at the beginning of the key file.
Works with all commands that accepts key files.
555
.TP
556
.B "\-\-keyfile-size, \-l \fIvalue\fR"
Arno Wagner's avatar
Arno Wagner committed
557 558
Read a maximum of \fIvalue\fR bytes from the key file.
Default is to read the whole file up to the compiled-in
559
maximum that can be queried with \-\-help. Supplying more
Arno Wagner's avatar
Arno Wagner committed
560 561 562
data than the compiled-in maximum aborts the operation.

This option is useful
563
to cut trailing newlines, for example. If \-\-keyfile-offset
Arno Wagner's avatar
Arno Wagner committed
564 565
is also given, the size count starts after the offset.
Works with all commands that accepts key files.
566
.TP
567
.B "\-\-new-keyfile-offset \fIvalue\fR"
Arno Wagner's avatar
Arno Wagner committed
568
Skip \fIvalue\fR bytes at the start when
569 570
adding a new passphrase from key file with
\fIluksAddKey\fR.
571
.TP
572
.B "\-\-new-keyfile-size  \fIvalue\fR"
Arno Wagner's avatar
Arno Wagner committed
573
Read a maximum of \fIvalue\fR bytes when adding
574 575
a new passphrase from key file with \fIluksAddKey\fR.
Default is to read the whole file up to the compiled-in
Arno Wagner's avatar
Arno Wagner committed
576 577 578 579 580
maximum length that can be queried with \-\-help.
Supplying more than the compiled in maximum aborts the
operation.
When \-\-new-keyfile-offset is also given, reading starts
after the offset.
581
.TP
582
.B "\-\-master-key-file"
583
Use a master key stored in a file.
584

Arno Wagner's avatar
Arno Wagner committed
585 586 587 588 589 590
For \fIluksFormat\fR this
allows creating a LUKS header with this specific
master key. If the master key was taken from an existing
LUKS header and all other parameters are the same,
then the new header decrypts the data encrypted with the
header the master key was taken from.
591

592
For \fIluksAddKey\fR this allows adding a new passphrase
Arno Wagner's avatar
Arno Wagner committed
593
without having to know an exiting one.
594

595
For \fIopen\fR this allows to open the LUKS device
Arno Wagner's avatar
Arno Wagner committed
596
without giving a passphrase.
597
.TP
598
.B "\-\-dump-master-key"
Arno Wagner's avatar
Arno Wagner committed
599 600
For \fIluksDump\fR this option includes the master key in the displayed
information. Use with care, as the master key can be used to
601
bypass the passphrases, see also option \-\-master-key-file.
602
.TP
603 604 605
.B "\-\-use-random"
.TP
.B "\-\-use-urandom"
606
For \fIluksFormat\fR these options define which kernel random number
Arno Wagner's avatar
Arno Wagner committed
607 608 609
generator will be used to create the master key (which is a
long-term key).

610
See \fBNOTES ON RANDOM NUMBER GENERATORS\fR for more
Arno Wagner's avatar
Arno Wagner committed
611 612 613
information. Use \fIcryptsetup \-\-help\fR
to show the compiled-in default random number generator.

614
\fBWARNING:\fR In a low-entropy situation (e.g. in an
Arno Wagner's avatar
Arno Wagner committed
615 616
embedded system), both selections are problematic.
Using /dev/urandom can lead to weak keys.
617 618
Using /dev/random can block a long time, potentially
forever, if not enough entropy can be harvested by
Arno Wagner's avatar
Arno Wagner committed
619
the kernel.
620
.TP
Arno Wagner's avatar
Arno Wagner committed
621
.B "\-\-key-slot, \-S <0-7>"
622 623
For LUKS operations that add key material, this options allows you
to specify which key slot is selected for the new key.
624
This option can be used for \fIluksFormat\fR,
Arno Wagner's avatar
Arno Wagner committed
625 626
and \fIluksAddKey\fR.
.br
627
In addition, for \fIopen\fR, this option selects a
Arno Wagner's avatar
Arno Wagner committed
628 629
specific key-slot to compare the passphrase against.
If the given passphrase would only match a different key-slot,
630
the operation fails.
631
.TP
Arno Wagner's avatar
Arno Wagner committed
632
.B "\-\-key-size, \-s <bits>"
633
Sets key size in bits. The argument has to be a multiple of
Arno Wagner's avatar
Arno Wagner committed
634
8. The possible key-sizes are limited by the cipher and
635
mode used.
636

637
See /proc/crypto for more information. Note that key-size
Arno Wagner's avatar
Arno Wagner committed
638
in /proc/crypto is stated in bytes.
639

640 641
This option can be used for \fIopen \-\-type plain\fR or \fIluksFormat\fR.
All other LUKS actions will use the key-size specified in the LUKS header.
Arno Wagner's avatar
Arno Wagner committed
642
Use \fIcryptsetup \-\-help\fR to show the compiled-in defaults.
643
.TP
Arno Wagner's avatar
Arno Wagner committed
644 645
.B "\-\-size, \-b <number of 512 byte sectors>"
Force the size of the underlying device in sectors of 512 bytes.
646
This option is only relevant for the \fIopen\fR and \fIresize\fR
647
actions.
648
.TP
Arno Wagner's avatar
Arno Wagner committed
649 650
.B "\-\-offset, \-o <number of 512 byte sectors>"
Start offset in the backend device in 512-byte sectors.
651 652
This option is only relevant for the \fIopen\fR action with plain
or loopaes device types.
653
.TP
Arno Wagner's avatar
Arno Wagner committed
654 655
.B "\-\-skip, \-p <number of 512 byte sectors>"
How many sectors of the encrypted data to skip at the beginning.
656 657
This option is only relevant for the \fIopen\fR action with plain
or loopaes device types.
Arno Wagner's avatar
Arno Wagner committed
658

659
This is different from the \-\-offset options with respect to
Arno Wagner's avatar
Arno Wagner committed
660 661 662 663 664 665
the sector numbers used in IV calculation.
Using \-\-offset will shift the IV calculation by the same negative amount.
Hence, if \-\-offset \fIn\fR, sector \fIn\fR will get a sector
number of \fI0\fR for the IV calculation.
Using \-\-skip causes sector \fIn\fR to also be the first sector
of the mapped device, but with its number for IV generation is \fIn\fR.
666
.TP
667
.B "\-\-readonly, \-r"
668 669
set up a read-only mapping.
.TP
670
.B "\-\-shared"
671
Creates an additional mapping for one common
Arno Wagner's avatar
Arno Wagner committed
672 673
ciphertext device. Arbitrary mappings are supported.
This option is only relevant for the 
674
\fIopen \-\-type plain\fR action. Use \-\-offset, \-\-size and \-\-skip to
Arno Wagner's avatar
Arno Wagner committed
675
specify the mapped area.
676
.TP
Arno Wagner's avatar
Arno Wagner committed
677 678 679 680 681
.B "\-\-iter-time, \-i <number of milliseconds>"
The number of milliseconds to spend with PBKDF2 passphrase processing.
This option is only relevant for LUKS operations that set or change
passphrases, such as \fIluksFormat\fR or \fIluksAddKey\fR.
Specifying 0 as parameter selects the compiled-in default.
682 683
.TP
.B "\-\-batch-mode, \-q"
684
Suppresses all confirmation questions. Use with care!
685

Arno Wagner's avatar
Arno Wagner committed
686 687
If the \-y option is not specified, this option also switches off
the passphrase verification for \fIluksFormat\fR.
688
.TP
Arno Wagner's avatar
Arno Wagner committed
689 690
.B "\-\-timeout, \-t <number of seconds>"
The number of seconds to wait before timeout on passphrase input
691
via terminal. It is relevant every time a passphrase is asked,
692 693
for example for \fIopen\fR, \fIluksFormat\fR or \fIluksAddKey\fR.
It has no effect if used in conjunction with \-\-key-file.
Arno Wagner's avatar
Arno Wagner committed
694 695
.br
This option is useful when the system 
696
should not stall if the user does not input a passphrase,
Arno Wagner's avatar
Arno Wagner committed
697
e.g. during boot. The default is a value of 0 seconds,
698
which means to wait forever.
699 700
.TP
.B "\-\-tries, \-T"
701
How often the input of the passphrase shall be retried.
Arno Wagner's avatar
Arno Wagner committed
702
This option is relevant
703
every time a passphrase is asked, for example for
704 705
\fIopen\fR, \fIluksFormat\fR or \fIluksAddKey\fR.
The default is 3 tries.
706
.TP
707
.B "\-\-align-payload <number of 512 byte sectors>"
708 709 710
Align payload at a boundary of \fIvalue\fR 512-byte sectors.
This option is relevant for \fIluksFormat\fR.

711
If not specified, cryptsetup tries to use the topology info
Arno Wagner's avatar
Arno Wagner committed
712
provided by kernel for the underlying device to get optimal alignment.
713
If not available (or the calculated value is a multiple of the default)
Arno Wagner's avatar
Arno Wagner committed
714
data is by default aligned to a 1MiB boundary (i.e. 2048 512-byte sectors).
715

Arno Wagner's avatar
Arno Wagner committed
716 717
For a detached LUKS header this option specifies the offset on the
data device. See also the \-\-header option.
718
.TP
Milan Broz's avatar
Milan Broz committed
719
.B "\-\-uuid=\fIUUID\fR"
720 721
Use the provided \fIUUID\fR for the \fIluksFormat\fR command
instead of generating new one. Changes the existing UUID when
Arno Wagner's avatar
Arno Wagner committed
722
used with the \fIluksUUID\fR command.
Milan Broz's avatar
Milan Broz committed
723

Arno Wagner's avatar
Arno Wagner committed
724 725
The UUID must be provided in the standard UUID format,
e.g. 12345678-1234-1234-1234-123456789abc.
Milan Broz's avatar
Milan Broz committed
726
.TP
727
.B "\-\-allow-discards\fR"
Arno Wagner's avatar
Arno Wagner committed
728
Allow the use of discard (TRIM) requests for device.
729
This option is only relevant for \fIopen\fR action.
Arno Wagner's avatar
Arno Wagner committed
730 731 732 733 734 735 736 737 738 739

\fBWARNING:\fR This command can have a negative security impact
because it can make filesystem-level operations visible on
the physical device. For example, information leaking
filesystem type, used space, etc. may be extractable from
the physical device if the discarded blocks can be located
later. If in doubt, do no use it.

A kernel version of 3.1 or later is needed. For earlier kernels
this option is ignored.
740
.TP
741
.B "\-\-test-passphrase\fR"
742
Do not activate device, just verify passphrase.
743 744
This option is only relevant for \fIopen\fR action (the device
mapping name is not mandatory if this option is used).
745
.TP
Arno Wagner's avatar
Arno Wagner committed
746
.B "\-\-header\fR <device or file storing the LUKS header>"
747
Use a detached (separated) metadata device or file where the
Arno Wagner's avatar
Arno Wagner committed
748 749
LUKS header is stored. This options allows to store ciphertext
and LUKS header on different devices.
750

Arno Wagner's avatar
Arno Wagner committed
751
This option is only relevant for LUKS devices and can be 
752
used with the \fIluksFormat\fR, \fIopen\fR, \fIluksSuspend\fR,
Arno Wagner's avatar
Arno Wagner committed
753
\fIluksResume\fR, \fIstatus\fR and \fIresize\fR commands.
754

Arno Wagner's avatar
Arno Wagner committed
755 756 757
For \fIluksFormat\fR with a file name as argument to \-\-header,
it has to exist and be large enough to contain the LUKS header.
See the cryptsetup FAQ for header size calculation.
758

Arno Wagner's avatar
Arno Wagner committed
759
For other commands that change the LUKS header (e.g. \fIluksAddKey\fR),
760
specify the device or file with the LUKS header directly as the
Arno Wagner's avatar
Arno Wagner committed
761
LUKS device.
762

Arno Wagner's avatar
Arno Wagner committed
763 764
If used with \fIluksFormat\fR, the \-\-align-payload option is taken
as absolute sector alignment on ciphertext device and can be zero.
765

Arno Wagner's avatar
Arno Wagner committed
766 767
\fBWARNING:\fR There is no check whether the ciphertext device specified
actually belongs to the header given. In fact you can specify an
768
arbitrary device as the ciphertext device for \fIopen\fR
Arno Wagner's avatar
Arno Wagner committed
769
with the \-\-header option. Use with care.
770
.TP
771 772 773 774 775 776 777 778 779 780
.B "\-\-force-password\fR"
Do not use password quality checking for new LUKS passwords.

This option applies only to \fIluksFormat\fR, \fIluksAddKey\fR and
\fIluksChangeKey\fR and is ignored if cryptsetup is built without
password quality checking support.

For more info about password quality check, see manual page
for \fBpwquality.conf(5)\fR.
.TP
781
.B "\-\-version"
Arno Wagner's avatar
Arno Wagner committed
782
Show the program version.
783 784 785 786 787 788
.TP
.B "\-\-usage"
Show short option help.
.TP
.B "\-\-help, \-?"
Show help text and default parameters.
Milan Broz's avatar
Milan Broz committed
789
.SH RETURN CODES
Arno Wagner's avatar
Arno Wagner committed
790
Cryptsetup returns 0 on success and a non-zero value on error.
Milan Broz's avatar
Milan Broz committed
791 792 793 794

Error codes are: 1 wrong parameters, 2 no permission (bad passphrase),
3 out of memory, 4 wrong device specified, 5 device already exists
or device is busy.
Arno Wagner's avatar
Arno Wagner committed
795 796 797 798 799 800 801 802 803 804 805 806 807
.SH NOTES ON PASSPHRASE PROCESSING FOR PLAIN MODE
Note that no iterated hashing or salting is done in plain mode.
If hashing is done, it is a single direct hash. This means that
low-entropy passphrases are easy to attack in plain mode.

\fBFrom a terminal\fR: The passphrase is read until the
first newline, i.e. '\\n'.
The input without the newline character is processed with
the default hash or the hash specified with \-\-hash.
The has result will be truncated to the key size 
of the used cipher, or the size specified with \-s.

\fBFrom stdin\fR: Reading will continue until a newline (or until
808 809 810
the maximum input size is reached), with the trailing newline
stripped. The maximum input size is defined by the same
compiled-in default as for the maximum key file size and  can
Arno Wagner's avatar
Arno Wagner committed
811 812 813 814 815 816 817
be overwritten using \-\-keyfile-size option.

The data read will be hashed with the default hash
or the hash specified with \-\-hash.
The has result will be truncated to the key size
of the used cipher, or the size specified with \-s.

818 819
Note that if \-\-key-file=- is used for reading the key
from stdin, trailing newlines are not stripped from the input.
Arno Wagner's avatar
Arno Wagner committed
820 821

If "plain" is used as argument to \-\-hash, the input
822 823
data will not be hashed. Instead, it will be zero padded (if
shorter than the key size) or truncated (if longer than the
Arno Wagner's avatar
Arno Wagner committed
824 825
key size) and used directly as the binary key. This is useful for
directly specifying a binary key.
826
No warning will be given if the amount of data read from stdin is
Arno Wagner's avatar
Arno Wagner committed
827
less than the key size.
828

Arno Wagner's avatar
Arno Wagner committed
829 830
\fBFrom a key file\fR: It will be truncated to the 
key size of the used cipher or the size given by \-s
831
and directly used as binary key.
Arno Wagner's avatar
Arno Wagner committed
832
if the key file is shorter than the key, cryptsetup
833 834
will quit with an error.

Arno Wagner's avatar
Arno Wagner committed
835
.SH NOTES ON PASSPHRASE PROCESSING FOR LUKS
836
LUKS uses PBKDF2 to protect against dictionary attacks
Arno Wagner's avatar
Arno Wagner committed
837 838 839 840
and to give some protection to low-entropy passphrases
(see RFC 2898 and the cryptsetup FAQ).

\fBFrom a terminal\fR: The passphrase is read until the
841
first newline and then processed by PBKDF2 without
Arno Wagner's avatar
Arno Wagner committed
842 843 844
the newline character.

\fBFrom stdin\fR:
845
LUKS will read passphrases from stdin up to the
Arno Wagner's avatar
Arno Wagner committed
846
first newline character or the compiled-in
847 848
maximum key file length. If \-\-keyfile-size is
given, it is ignored.
Arno Wagner's avatar
Arno Wagner committed
849 850 851 852 853 854 855 856 857 858

\fBFrom key file\fR:
The complete keyfile is read up to the compiled-in
maximum size. Newline characters do not terminate the
input. The \-\-keyfile-size option can be used to limit
what is read.

\fBPassphrase processing\fR:
Whenever a passphrase is added to a LUKS header (luksAddKey, luksFormat),
the user may specify how much the time the passphrase processing
859
should consume. The time is used to determine the iteration count
Arno Wagner's avatar
Arno Wagner committed
860
for PBKDF2 and higher times will offer better protection for
861
low-entropy passphrases, but open will take longer to
Arno Wagner's avatar
Arno Wagner committed
862 863 864 865 866 867 868 869 870 871 872
complete. For passphrases that have entropy higher than the
used key length, higher iteration times will not increase security.

The default setting of one second is sufficient for most
practical cases. The only exception is a low-entropy
passphrase used on a slow device.
.SH INCOHERENT BEHAVIOR FOR INVALID PASSPHRASES/KEYS
LUKS checks for a valid passphrase when an encrypted partition
is unlocked. The behavior of plain dm-crypt is different.
It will always decrypt with the passphrase given. If the
given passphrase is wrong, the device mapped by plain
873
dm-crypt will essentially still contain encrypted data and
Arno Wagner's avatar
Arno Wagner committed
874
will be unreadable.
875
.SH NOTES ON SUPPORTED CIPHERS, MODES, HASHES AND KEY SIZES
876 877 878 879
The available combinations of ciphers, modes, hashes and key sizes
depend on kernel support. See /proc/crypto for a list of available
options. You might need to load additional kernel crypto modules
in order to get more options.
880

881
For the \-\-hash option, if the crypto backend is libgcrypt,
Arno Wagner's avatar
Arno Wagner committed
882 883 884 885
then all algorithms supported by the gcrypt library are available.
For other crypto backends some algorithms may be missing.
.SH NOTES ON PASSPHRASES
Mathematics can't be bribed. Make sure you keep your passphrases safe.
886
There are a few nice tricks for constructing a fallback, when suddenly
Arno Wagner's avatar
Arno Wagner committed
887 888 889
out of the blue, your brain refuses to cooperate.
These fallbacks need LUKS, as it's only possible with LUKS
to have multiple passphrases. Still, if your attacker model does
890
not prevent it, storing your passphrase in a sealed envelope somewhere
Arno Wagner's avatar
Arno Wagner committed
891 892
may be a good idea as well.
.SH NOTES ON RANDOM NUMBER GENERATORS
893 894
Random Number Generators (RNG) used in cryptsetup are always the
kernel RNGs without any modifications or additions to data stream
Arno Wagner's avatar
Arno Wagner committed
895 896
produced.

897 898
There are two types of randomness cryptsetup/LUKS needs. One type
(which always uses /dev/urandom) is used for salts, the AF splitter
Arno Wagner's avatar
Arno Wagner committed
899 900
and for wiping deleted keyslots.

901 902
The second type is used for the volume (master) key. You can switch
between using /dev/random and /dev/urandom  here, see
Arno Wagner's avatar
Arno Wagner committed
903 904
\fP\-\-use-random\fR and \fP\-\-use-urandom\fR
options. Using /dev/random on a system without enough entropy sources
905
can cause \fPluksFormat\fR to block until the requested amount of
Arno Wagner's avatar
Arno Wagner committed
906 907 908 909 910
random data is gathered. In a low-entropy situation (embedded system),
this can take a very long time and potentially forever. At the same
time, using /dev/urandom in a low-entropy situation will 
produce low-quality keys. This is a serious problem, but solving
it is out of scope for a mere man-page.
911
See \fPurandom(4)\fR for more information.
Milan Broz's avatar
Milan Broz committed
912
.SH NOTES ON LOOPBACK DEVICE USE
913 914
Cryptsetup is usually used directly on a block device (disk
partition or LVM volume). However, if the device argument is a
Arno Wagner's avatar
Arno Wagner committed
915
file, cryptsetup tries to allocate a loopback device
916 917
and map it into this file. This mode requires Linux kernel 2.6.25
or more recent which supports the loop autoclear flag (loop device is
Arno Wagner's avatar
Arno Wagner committed
918
cleared on last close automatically). Of course, you can
919
always map a file to a loop-device manually. See the
Arno Wagner's avatar
Arno Wagner committed
920 921
cryptsetup FAQ for an example.

922
When device mapping is active, you can see the loop backing file in
Arno Wagner's avatar
Arno Wagner committed
923
the status command output. Also see losetup(8).
924 925
.SH DEPRECATED ACTIONS
.PP
926 927 928
The \fIreload\fR action is no longer supported.
Please use \fIdmsetup(8)\fR if you need to
directly manipulate with the device mapping table.
929
.PP
930
The \fIluksDelKey\fR was replaced with \fIluksKillSlot\fR.
931
.PP
932
.SH REPORTING BUGS
Arno Wagner's avatar
Arno Wagner committed
933
Report bugs, including ones in the documentation, on
934
the cryptsetup mailing list at <dm-crypt@saout.de>
Arno Wagner's avatar
Arno Wagner committed
935
or in the 'Issues' section on LUKS website.
936
Please attach the output of the failed command with the
Arno Wagner's avatar
Arno Wagner committed
937 938 939 940
\-\-debug option added.
.SH AUTHORS
cryptsetup originally written by Christophe Saout <christophe@saout.de>
.br
941
The LUKS extensions and original man page were written by
Arno Wagner's avatar
Arno Wagner committed
942 943 944 945
Clemens Fruhwirth <clemens@endorphin.org>.
.br
Man page extensions by Milan Broz <gmazyland@gmail.com>.
.br
946
Man page rewrite and extension by Arno Wagner <arno@wagner.name>.
947 948 949 950
.SH COPYRIGHT
Copyright \(co 2004 Christophe Saout
.br
Copyright \(co 2004-2006 Clemens Fruhwirth
951
.br
952
Copyright \(co 2009-2012 Red Hat, Inc.
Arno Wagner's avatar
Arno Wagner committed
953
.br
Milan Broz's avatar
Milan Broz committed
954 955
Copyright \(co 2009-2012 Milan Broz
.br
Arno Wagner's avatar
Arno Wagner committed
956
Copyright \(co 2012 Arno Wagner
957 958 959

This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
960
.SH SEE ALSO
Arno Wagner's avatar
Arno Wagner committed
961 962 963
The LUKS website at \fBhttp://code.google.com/p/cryptsetup/\fR

The cryptsetup FAQ, contained in the distribution package and
964
online at
Arno Wagner's avatar
Arno Wagner committed
965 966 967 968 969 970
\fBhttp://code.google.com/p/cryptsetup/wiki/FrequentlyAskedQuestions\fR

The cryptsetup mailing list and list archive, see FAQ entry 1.6.

The LUKS on-disk format specification available at
\fBhttp://code.google.com/p/cryptsetup/wiki/Specification\fR