4 Device-Mapper's "crypt" target provides transparent encryption of block devices
5 using the kernel crypto API.
7 For a more detailed description of supported parameters see:
8 http://code.google.com/p/cryptsetup/wiki/DMCrypt
10 Parameters: <cipher> <key> <iv_offset> <device path> \
11 <offset> [<#opt_params> <opt_params>]
14 Encryption cipher and an optional IV generation mode.
15 (In format cipher[:keycount]-chainmode-ivmode[:ivopts]).
21 /proc/crypto contains supported crypto modes
24 Key used for encryption. It is encoded as a hexadecimal number.
25 You can only use key sizes that are valid for the selected cipher
26 in combination with the selected iv mode.
27 Note that for some iv modes the key string can contain additional
28 keys (for example IV seed) so the key contains more parts concatenated
32 Multi-key compatibility mode. You can define <keycount> keys and
33 then sectors are encrypted according to their offsets (sector 0 uses key0;
34 sector 1 uses key1 etc.). <keycount> must be a power of two.
37 The IV offset is a sector count that is added to the sector number
38 before creating the IV.
41 This is the device that is going to be used as backend and contains the
42 encrypted data. You can specify it as a path like /dev/xxx or a device
43 number <major>:<minor>.
46 Starting sector within the device where the encrypted data begins.
49 Number of optional parameters. If there are no optional parameters,
50 the optional paramaters section can be skipped or #opt_params can be zero.
51 Otherwise #opt_params is the number of following arguments.
53 Example of optional parameters section:
57 Block discard requests (a.k.a. TRIM) are passed through the crypt device.
58 The default is to ignore discard requests.
60 WARNING: Assess the specific security risks carefully before enabling this
61 option. For example, allowing discards on encrypted devices may lead to
62 the leak of information about the ciphertext device (filesystem type,
63 used space etc.) if the discarded blocks can be located easily on the
68 LUKS (Linux Unified Key Setup) is now the preferred way to set up disk
69 encryption with dm-crypt using the 'cryptsetup' utility, see
70 http://code.google.com/p/cryptsetup/
74 # Create a crypt device using dmsetup
75 dmsetup create crypt1 --table "0 `blockdev --getsize $1` crypt aes-cbc-essiv:sha256 babebabebabebabebabebabebabebabe 0 $1 0"
80 # Create a crypt device using cryptsetup and LUKS header with default cipher
81 cryptsetup luksFormat $1
82 cryptsetup luksOpen $1 crypt1