ƒsphinx.addnodesdocument)}( rawsourcechildren]( translations LanguagesNode)}(hhh](h pending_xref)}(hhh]docutils.nodesTextChinese (Simplified)}parenthsba attributes}(ids]classes]names]dupnames]backrefs] refdomainstdreftypedoc reftarget6/translations/zh_CN/admin-guide/device-mapper/dm-cryptmodnameN classnameN refexplicitutagnamehhh ubh)}(hhh]hChinese (Traditional)}hh2sbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget6/translations/zh_TW/admin-guide/device-mapper/dm-cryptmodnameN classnameN refexplicituh1hhh ubh)}(hhh]hItalian}hhFsbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget6/translations/it_IT/admin-guide/device-mapper/dm-cryptmodnameN classnameN refexplicituh1hhh ubh)}(hhh]hJapanese}hhZsbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget6/translations/ja_JP/admin-guide/device-mapper/dm-cryptmodnameN classnameN refexplicituh1hhh ubh)}(hhh]hKorean}hhnsbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget6/translations/ko_KR/admin-guide/device-mapper/dm-cryptmodnameN classnameN refexplicituh1hhh ubh)}(hhh]hSpanish}hhsbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget6/translations/sp_SP/admin-guide/device-mapper/dm-cryptmodnameN classnameN refexplicituh1hhh ubeh}(h]h ]h"]h$]h&]current_languageEnglishuh1h hh _documenthsourceNlineNubhsection)}(hhh](htitle)}(hdm-crypth]hdm-crypt}(hhhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhhhP/var/lib/git/docbuild/linux/Documentation/admin-guide/device-mapper/dm-crypt.rsthKubh paragraph)}(hlDevice-Mapper's "crypt" target provides transparent encryption of block devices using the kernel crypto API.h]hrDevice-Mapper’s “crypt” target provides transparent encryption of block devices using the kernel crypto API.}(hhhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhhhhubh)}(hsFor a more detailed description of supported parameters see: https://gitlab.com/cryptsetup/cryptsetup/wikis/DMCrypth](h=For a more detailed description of supported parameters see: }(hhhhhNhNubh reference)}(h6https://gitlab.com/cryptsetup/cryptsetup/wikis/DMCrypth]h6https://gitlab.com/cryptsetup/cryptsetup/wikis/DMCrypt}(hhhhhNhNubah}(h]h ]h"]h$]h&]refurihuh1hhhubeh}(h]h ]h"]h$]h&]uh1hhhhKhhhhubh)}(h Parameters::h]h Parameters:}(hhhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK hhhhubh literal_block)}(hP \ [<#opt_params> ]h]hP \ [<#opt_params> ]}hhsbah}(h]h ]h"]h$]h&] xml:spacepreserveuh1hhhhK hhhhubhdefinition_list)}(hhh](hdefinition_list_item)}(hXa Encryption cipher, encryption mode and Initial Vector (IV) generator. The cipher specifications format is:: cipher[:keycount]-chainmode-ivmode[:ivopts] Examples:: aes-cbc-essiv:sha256 aes-xts-plain64 serpent-xts-plain64 Cipher format also supports direct specification with kernel crypt API format (selected by capi: prefix). The IV specification is the same as for the first format type. This format is mainly used for specification of authenticated modes. The crypto API cipher specifications format is:: capi:cipher_api_spec-ivmode[:ivopts] Examples:: capi:cbc(aes)-essiv:sha256 capi:xts(aes)-plain64 Examples of authenticated modes:: capi:gcm(aes)-random capi:authenc(hmac(sha256),xts(aes))-random capi:rfc7539(chacha20,poly1305)-random The /proc/crypto contains a list of currently loaded crypto modes. h](hterm)}(hh]h}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhhK1hj ubh definition)}(hhh](h)}(hEEncryption cipher, encryption mode and Initial Vector (IV) generator.h]hEEncryption cipher, encryption mode and Initial Vector (IV) generator.}(hj&hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhj#ubh)}(h%The cipher specifications format is::h]h$The cipher specifications format is:}(hj4hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhj#ubh)}(h+cipher[:keycount]-chainmode-ivmode[:ivopts]h]h+cipher[:keycount]-chainmode-ivmode[:ivopts]}hjBsbah}(h]h ]h"]h$]h&]jjuh1hhhhKhj#ubh)}(h Examples::h]h Examples:}(hjPhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhj#ubh)}(h8aes-cbc-essiv:sha256 aes-xts-plain64 serpent-xts-plain64h]h8aes-cbc-essiv:sha256 aes-xts-plain64 serpent-xts-plain64}hj^sbah}(h]h ]h"]h$]h&]jjuh1hhhhKhj#ubh)}(hCipher format also supports direct specification with kernel crypt API format (selected by capi: prefix). The IV specification is the same as for the first format type. This format is mainly used for specification of authenticated modes.h]hCipher format also supports direct specification with kernel crypt API format (selected by capi: prefix). The IV specification is the same as for the first format type. This format is mainly used for specification of authenticated modes.}(hjlhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhj#ubh)}(h0The crypto API cipher specifications format is::h]h/The crypto API cipher specifications format is:}(hjzhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK"hj#ubh)}(h$capi:cipher_api_spec-ivmode[:ivopts]h]h$capi:cipher_api_spec-ivmode[:ivopts]}hjsbah}(h]h ]h"]h$]h&]jjuh1hhhhK$hj#ubh)}(h Examples::h]h Examples:}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK&hj#ubh)}(h0capi:cbc(aes)-essiv:sha256 capi:xts(aes)-plain64h]h0capi:cbc(aes)-essiv:sha256 capi:xts(aes)-plain64}hjsbah}(h]h ]h"]h$]h&]jjuh1hhhhK(hj#ubh)}(h!Examples of authenticated modes::h]h Examples of authenticated modes:}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK+hj#ubh)}(hfcapi:gcm(aes)-random capi:authenc(hmac(sha256),xts(aes))-random capi:rfc7539(chacha20,poly1305)-randomh]hfcapi:gcm(aes)-random capi:authenc(hmac(sha256),xts(aes))-random capi:rfc7539(chacha20,poly1305)-random}hjsbah}(h]h ]h"]h$]h&]jjuh1hhhhK-hj#ubh)}(hBThe /proc/crypto contains a list of currently loaded crypto modes.h]hBThe /proc/crypto contains a list of currently loaded crypto modes.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK1hj#ubeh}(h]h ]h"]h$]h&]uh1j!hj ubeh}(h]h ]h"]h$]h&]uh1j hhhK1hjubj )}(hX Key used for encryption. It is encoded either as a hexadecimal number or it can be passed as prefixed with single colon character (':') for keys residing in kernel keyring service. You can only use key sizes that are valid for the selected cipher in combination with the selected iv mode. Note that for some iv modes the key string can contain additional keys (for example IV seed) so the key contains more parts concatenated into a single string. h](j)}(hh]h}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhhK;hjubj")}(hhh]h)}(hXKey used for encryption. It is encoded either as a hexadecimal number or it can be passed as prefixed with single colon character (':') for keys residing in kernel keyring service. You can only use key sizes that are valid for the selected cipher in combination with the selected iv mode. Note that for some iv modes the key string can contain additional keys (for example IV seed) so the key contains more parts concatenated into a single string.h]hXKey used for encryption. It is encoded either as a hexadecimal number or it can be passed as prefixed with single colon character (‘:’) for keys residing in kernel keyring service. You can only use key sizes that are valid for the selected cipher in combination with the selected iv mode. Note that for some iv modes the key string can contain additional keys (for example IV seed) so the key contains more parts concatenated into a single string.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK4hjubah}(h]h ]h"]h$]h&]uh1j!hjubeh}(h]h ]h"]h$]h&]uh1j hhhK;hjhhubj )}(hz The kernel keyring key is identified by string in following format: ::. h](j)}(h h]h }(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhhK?hjubj")}(hhh]h)}(hlThe kernel keyring key is identified by string in following format: ::.h]hlThe kernel keyring key is identified by string in following format: ::.}(hj,hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK>hj)ubah}(h]h ]h"]h$]h&]uh1j!hjubeh}(h]h ]h"]h$]h&]uh1j hhhK?hjhhubj )}(ht The encryption key size in bytes. The kernel key payload size must match the value passed in . h](j)}(h h]h }(hjJhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhhKChjFubj")}(hhh]h)}(hhThe encryption key size in bytes. The kernel key payload size must match the value passed in .h]hhThe encryption key size in bytes. The kernel key payload size must match the value passed in .}(hj[hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKBhjXubah}(h]h ]h"]h$]h&]uh1j!hjFubeh}(h]h ]h"]h$]h&]uh1j hhhKChjhhubj )}(hM Either 'logon', 'user', 'encrypted' or 'trusted' kernel key type. h](j)}(h h]h }(hjyhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhhKFhjuubj")}(hhh]h)}(hAEither 'logon', 'user', 'encrypted' or 'trusted' kernel key type.h]hQEither ‘logon’, ‘user’, ‘encrypted’ or ‘trusted’ kernel key type.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKFhjubah}(h]h ]h"]h$]h&]uh1j!hjuubeh}(h]h ]h"]h$]h&]uh1j hhhKFhjhhubj )}(hr The kernel keyring key description crypt target should look for when loading key of . h](j)}(hh]h}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhhKJhjubj")}(hhh]h)}(h_The kernel keyring key description crypt target should look for when loading key of .h]h_The kernel keyring key description crypt target should look for when loading key of .}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKIhjubah}(h]h ]h"]h$]h&]uh1j!hjubeh}(h]h ]h"]h$]h&]uh1j hhhKJhjhhubj )}(h Multi-key compatibility mode. You can define keys and then sectors are encrypted according to their offsets (sector 0 uses key0; sector 1 uses key1 etc.). must be a power of two. h](j)}(h h]h }(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhhKOhjubj")}(hhh]h)}(hMulti-key compatibility mode. You can define keys and then sectors are encrypted according to their offsets (sector 0 uses key0; sector 1 uses key1 etc.). must be a power of two.h]hMulti-key compatibility mode. You can define keys and then sectors are encrypted according to their offsets (sector 0 uses key0; sector 1 uses key1 etc.). must be a power of two.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKMhjubah}(h]h ]h"]h$]h&]uh1j!hjubeh}(h]h ]h"]h$]h&]uh1j hhhKOhjhhubj )}(hg The IV offset is a sector count that is added to the sector number before creating the IV. h](j)}(h h]h }(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhhKShjubj")}(hhh]h)}(hZThe IV offset is a sector count that is added to the sector number before creating the IV.h]hZThe IV offset is a sector count that is added to the sector number before creating the IV.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKRhjubah}(h]h ]h"]h$]h&]uh1j!hjubeh}(h]h ]h"]h$]h&]uh1j hhhKShjhhubj )}(h This is the device that is going to be used as backend and contains the encrypted data. You can specify it as a path like /dev/xxx or a device number :. h](j)}(h h]h }(hj5hhhNhNubah}(h]h ]h"]h$]h&]uh1jhhhKXhj1ubj")}(hhh]h)}(hThis is the device that is going to be used as backend and contains the encrypted data. You can specify it as a path like /dev/xxx or a device number :.h]hThis is the device that is going to be used as backend and contains the encrypted data. You can specify it as a path like /dev/xxx or a device number :.}(hjFhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKVhjCubah}(h]h ]h"]h$]h&]uh1j!hj1ubeh}(h]h ]h"]h$]h&]uh1j hhhKXhjhhubj )}(hL Starting sector within the device where the encrypted data begins. h](j)}(hh]h}(hjdhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhhK[hj`ubj")}(hhh]h)}(hBStarting sector within the device where the encrypted data begins.h]hBStarting sector within the device where the encrypted data begins.}(hjuhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK[hjrubah}(h]h ]h"]h$]h&]uh1j!hj`ubeh}(h]h ]h"]h$]h&]uh1j hhhK[hjhhubj )}(hX=<#opt_params> Number of optional parameters. If there are no optional parameters, the optional parameters section can be skipped or #opt_params can be zero. Otherwise #opt_params is the number of following arguments. Example of optional parameters section: 3 allow_discards same_cpu_crypt submit_from_crypt_cpus h](j)}(h <#opt_params>h]h <#opt_params>}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhhKchjubj")}(hhh](h)}(hNumber of optional parameters. If there are no optional parameters, the optional parameters section can be skipped or #opt_params can be zero. Otherwise #opt_params is the number of following arguments.h]hNumber of optional parameters. If there are no optional parameters, the optional parameters section can be skipped or #opt_params can be zero. Otherwise #opt_params is the number of following arguments.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK^hjubj)}(hhh]j )}(h_Example of optional parameters section: 3 allow_discards same_cpu_crypt submit_from_crypt_cpus h](j)}(h'Example of optional parameters section:h]h'Example of optional parameters section:}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhhKchjubj")}(hhh]h)}(h63 allow_discards same_cpu_crypt submit_from_crypt_cpush]h63 allow_discards same_cpu_crypt submit_from_crypt_cpus}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKchjubah}(h]h ]h"]h$]h&]uh1j!hjubeh}(h]h ]h"]h$]h&]uh1j hhhKchjubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1j!hjubeh}(h]h ]h"]h$]h&]uh1j hhhKchjhhubj )}(hXallow_discards Block discard requests (a.k.a. TRIM) are passed through the crypt device. The default is to ignore discard requests. WARNING: Assess the specific security risks carefully before enabling this option. For example, allowing discards on encrypted devices may lead to the leak of information about the ciphertext device (filesystem type, used space etc.) if the discarded blocks can be located easily on the device later. h](j)}(hallow_discardsh]hallow_discards}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhhKmhjubj")}(hhh](h)}(htBlock discard requests (a.k.a. TRIM) are passed through the crypt device. The default is to ignore discard requests.h]htBlock discard requests (a.k.a. TRIM) are passed through the crypt device. The default is to ignore discard requests.}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKfhjubh)}(hX-WARNING: Assess the specific security risks carefully before enabling this option. For example, allowing discards on encrypted devices may lead to the leak of information about the ciphertext device (filesystem type, used space etc.) if the discarded blocks can be located easily on the device later.h]hX-WARNING: Assess the specific security risks carefully before enabling this option. For example, allowing discards on encrypted devices may lead to the leak of information about the ciphertext device (filesystem type, used space etc.) if the discarded blocks can be located easily on the device later.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKihjubeh}(h]h ]h"]h$]h&]uh1j!hjubeh}(h]h ]h"]h$]h&]uh1j hhhKmhjhhubj )}(hsame_cpu_crypt Perform encryption using the same cpu that IO was submitted on. The default is to use an unbound workqueue so that encryption work is automatically balanced between available CPUs. h](j)}(hsame_cpu_crypth]hsame_cpu_crypt}(hj7hhhNhNubah}(h]h ]h"]h$]h&]uh1jhhhKrhj3ubj")}(hhh]h)}(hPerform encryption using the same cpu that IO was submitted on. The default is to use an unbound workqueue so that encryption work is automatically balanced between available CPUs.h]hPerform encryption using the same cpu that IO was submitted on. The default is to use an unbound workqueue so that encryption work is automatically balanced between available CPUs.}(hjHhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKphjEubah}(h]h ]h"]h$]h&]uh1j!hj3ubeh}(h]h ]h"]h$]h&]uh1j hhhKrhjhhubj )}(hhigh_priority Set dm-crypt workqueues and the writer thread to high priority. This improves throughput and latency of dm-crypt while degrading general responsiveness of the system. h](j)}(h high_priorityh]h high_priority}(hjfhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhhKwhjbubj")}(hhh]h)}(hSet dm-crypt workqueues and the writer thread to high priority. This improves throughput and latency of dm-crypt while degrading general responsiveness of the system.h]hSet dm-crypt workqueues and the writer thread to high priority. This improves throughput and latency of dm-crypt while degrading general responsiveness of the system.}(hjwhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKuhjtubah}(h]h ]h"]h$]h&]uh1j!hjbubeh}(h]h ]h"]h$]h&]uh1j hhhKwhjhhubj )}(hXcsubmit_from_crypt_cpus Disable offloading writes to a separate thread after encryption. There are some situations where offloading write bios from the encryption threads to a single thread degrades performance significantly. The default is to offload write bios to the same thread because it benefits CFQ to have writes submitted using the same context. h](j)}(hsubmit_from_crypt_cpush]hsubmit_from_crypt_cpus}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhhKhjubj")}(hhh]h)}(hXKDisable offloading writes to a separate thread after encryption. There are some situations where offloading write bios from the encryption threads to a single thread degrades performance significantly. The default is to offload write bios to the same thread because it benefits CFQ to have writes submitted using the same context.h]hXKDisable offloading writes to a separate thread after encryption. There are some situations where offloading write bios from the encryption threads to a single thread degrades performance significantly. The default is to offload write bios to the same thread because it benefits CFQ to have writes submitted using the same context.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKzhjubah}(h]h ]h"]h$]h&]uh1j!hjubeh}(h]h ]h"]h$]h&]uh1j hhhKhjhhubj )}(h^no_read_workqueue Bypass dm-crypt internal workqueue and process read requests synchronously. h](j)}(hno_read_workqueueh]hno_read_workqueue}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhhKhjubj")}(hhh]h)}(hKBypass dm-crypt internal workqueue and process read requests synchronously.h]hKBypass dm-crypt internal workqueue and process read requests synchronously.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjubah}(h]h ]h"]h$]h&]uh1j!hjubeh}(h]h ]h"]h$]h&]uh1j hhhKhjhhubj )}(hno_write_workqueue Bypass dm-crypt internal workqueue and process write requests synchronously. This option is automatically enabled for host-managed zoned block devices (e.g. host-managed SMR hard-disks). h](j)}(hno_write_workqueueh]hno_write_workqueue}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhhKhjubj")}(hhh]h)}(hBypass dm-crypt internal workqueue and process write requests synchronously. This option is automatically enabled for host-managed zoned block devices (e.g. host-managed SMR hard-disks).h]hBypass dm-crypt internal workqueue and process write requests synchronously. This option is automatically enabled for host-managed zoned block devices (e.g. host-managed SMR hard-disks).}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjubah}(h]h ]h"]h$]h&]uh1j!hjubeh}(h]h ]h"]h$]h&]uh1j hhhKhjhhubj )}(hX integrity:: The device requires additional metadata per-sector stored in per-bio integrity structure. This metadata must by provided by underlying dm-integrity target. The can be "none" if metadata is used only for persistent IV. For Authenticated Encryption with Additional Data (AEAD) the is "aead". An AEAD mode additionally calculates and verifies integrity for the encrypted device. The additional space is then used for storing authentication tag (and persistent IV if needed). h](j)}(hintegrity::h]hintegrity::}(hj"hhhNhNubah}(h]h ]h"]h$]h&]uh1jhhhKhjubj")}(hhh](h)}(hThe device requires additional metadata per-sector stored in per-bio integrity structure. This metadata must by provided by underlying dm-integrity target.h]hThe device requires additional metadata per-sector stored in per-bio integrity structure. This metadata must by provided by underlying dm-integrity target.}(hj3hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhj0ubh)}(hDThe can be "none" if metadata is used only for persistent IV.h]hHThe can be “none” if metadata is used only for persistent IV.}(hjAhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhj0ubh)}(hXFor Authenticated Encryption with Additional Data (AEAD) the is "aead". An AEAD mode additionally calculates and verifies integrity for the encrypted device. The additional space is then used for storing authentication tag (and persistent IV if needed).h]hXFor Authenticated Encryption with Additional Data (AEAD) the is “aead”. An AEAD mode additionally calculates and verifies integrity for the encrypted device. The additional space is then used for storing authentication tag (and persistent IV if needed).}(hjOhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhj0ubeh}(h]h ]h"]h$]h&]uh1j!hjubeh}(h]h ]h"]h$]h&]uh1j hhhKhjhhubj )}(hintegrity_key_size: Optionally set the integrity key size if it differs from the digest size. It allows the use of wrapped key algorithms where the key size is independent of the cryptographic key size. h](j)}(hintegrity_key_size:h]hintegrity_key_size:}(hjmhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhhKhjiubj")}(hhh]h)}(hOptionally set the integrity key size if it differs from the digest size. It allows the use of wrapped key algorithms where the key size is independent of the cryptographic key size.h]hOptionally set the integrity key size if it differs from the digest size. It allows the use of wrapped key algorithms where the key size is independent of the cryptographic key size.}(hj~hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhj{ubah}(h]h ]h"]h$]h&]uh1j!hjiubeh}(h]h ]h"]h$]h&]uh1j hhhKhjhhubj )}(hsector_size: Use as the encryption unit instead of 512 bytes sectors. This option can be in range 512 - 4096 bytes and must be power of two. Virtual device will announce this size as a minimal IO and logical sector. h](j)}(hsector_size:h]hsector_size:}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhhKhjubj")}(hhh]h)}(hUse as the encryption unit instead of 512 bytes sectors. This option can be in range 512 - 4096 bytes and must be power of two. Virtual device will announce this size as a minimal IO and logical sector.h]hUse as the encryption unit instead of 512 bytes sectors. This option can be in range 512 - 4096 bytes and must be power of two. Virtual device will announce this size as a minimal IO and logical sector.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjubah}(h]h ]h"]h$]h&]uh1j!hjubeh}(h]h ]h"]h$]h&]uh1j hhhKhjhhubj )}(hXkiv_large_sectors IV generators will use sector number counted in units instead of default 512 bytes sectors. For example, if is 4096 bytes, plain64 IV for the second sector will be 8 (without flag) and 1 if iv_large_sectors is present. The must be multiple of (in 512 bytes units) if this flag is specified. h](j)}(hiv_large_sectorsh]hiv_large_sectors}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhhKhjubj")}(hhh](h)}(hiIV generators will use sector number counted in units instead of default 512 bytes sectors.h]hiIV generators will use sector number counted in units instead of default 512 bytes sectors.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjubh)}(hFor example, if is 4096 bytes, plain64 IV for the second sector will be 8 (without flag) and 1 if iv_large_sectors is present. The must be multiple of (in 512 bytes units) if this flag is specified.h]hFor example, if is 4096 bytes, plain64 IV for the second sector will be 8 (without flag) and 1 if iv_large_sectors is present. The must be multiple of (in 512 bytes units) if this flag is specified.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjubeh}(h]h ]h"]h$]h&]uh1j!hjubeh}(h]h ]h"]h$]h&]uh1j hhhKhjhhubj )}(hintegrity_key_size: Use an integrity key of size instead of using an integrity key size of the digest size of the used HMAC algorithm. h](j)}(hintegrity_key_size:h]hintegrity_key_size:}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhhKhjubj")}(hhh]h)}(hzUse an integrity key of size instead of using an integrity key size of the digest size of the used HMAC algorithm.h]hzUse an integrity key of size instead of using an integrity key size of the digest size of the used HMAC algorithm.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjubah}(h]h ]h"]h$]h&]uh1j!hjubeh}(h]h ]h"]h$]h&]uh1j hhhKhjhhubj )}(hXModule parameters:: max_read_size Maximum size of read requests. When a request larger than this size is received, dm-crypt will split the request. The splitting improves concurrency (the split requests could be encrypted in parallel by multiple cores), but it also causes overhead. The user should tune this parameters to fit the actual workload. max_write_size Maximum size of write requests. When a request larger than this size is received, dm-crypt will split the request. The splitting improves concurrency (the split requests could be encrypted in parallel by multiple cores), but it also causes overhead. The user should tune this parameters to fit the actual workload. h](j)}(hModule parameters::h]hModule parameters::}(hj7hhhNhNubah}(h]h ]h"]h$]h&]uh1jhhhKhj3ubj")}(hhh]j)}(hhh](j )}(hXHmax_read_size Maximum size of read requests. When a request larger than this size is received, dm-crypt will split the request. The splitting improves concurrency (the split requests could be encrypted in parallel by multiple cores), but it also causes overhead. The user should tune this parameters to fit the actual workload. h](j)}(h max_read_sizeh]h max_read_size}(hjOhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhhKhjKubj")}(hhh]h)}(hX9Maximum size of read requests. When a request larger than this size is received, dm-crypt will split the request. The splitting improves concurrency (the split requests could be encrypted in parallel by multiple cores), but it also causes overhead. The user should tune this parameters to fit the actual workload.h]hX9Maximum size of read requests. When a request larger than this size is received, dm-crypt will split the request. The splitting improves concurrency (the split requests could be encrypted in parallel by multiple cores), but it also causes overhead. The user should tune this parameters to fit the actual workload.}(hj`hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhj]ubah}(h]h ]h"]h$]h&]uh1j!hjKubeh}(h]h ]h"]h$]h&]uh1j hhhKhjHubj )}(hXKmax_write_size Maximum size of write requests. When a request larger than this size is received, dm-crypt will split the request. The splitting improves concurrency (the split requests could be encrypted in parallel by multiple cores), but it also causes overhead. The user should tune this parameters to fit the actual workload. h](j)}(hmax_write_sizeh]hmax_write_size}(hj~hhhNhNubah}(h]h ]h"]h$]h&]uh1jhhhKhjzubj")}(hhh]h)}(hX:Maximum size of write requests. When a request larger than this size is received, dm-crypt will split the request. The splitting improves concurrency (the split requests could be encrypted in parallel by multiple cores), but it also causes overhead. The user should tune this parameters to fit the actual workload.h]hX:Maximum size of write requests. When a request larger than this size is received, dm-crypt will split the request. The splitting improves concurrency (the split requests could be encrypted in parallel by multiple cores), but it also causes overhead. The user should tune this parameters to fit the actual workload.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjubah}(h]h ]h"]h$]h&]uh1j!hjzubeh}(h]h ]h"]h$]h&]uh1j hhhKhjHubeh}(h]h ]h"]h$]h&]uh1jhjEubah}(h]h ]h"]h$]h&]uh1j!hj3ubeh}(h]h ]h"]h$]h&]uh1j hhhKhjhhubeh}(h]h ]h"]h$]h&]uh1jhhhhhhhNubh)}(hhh](h)}(hExample scriptsh]hExample scripts}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhhhhhKubh)}(hLUKS (Linux Unified Key Setup) is now the preferred way to set up disk encryption with dm-crypt using the 'cryptsetup' utility, see https://gitlab.com/cryptsetup/cryptsetuph](hLUKS (Linux Unified Key Setup) is now the preferred way to set up disk encryption with dm-crypt using the ‘cryptsetup’ utility, see }(hjhhhNhNubh)}(h(https://gitlab.com/cryptsetup/cryptsetuph]h(https://gitlab.com/cryptsetup/cryptsetup}(hjhhhNhNubah}(h]h ]h"]h$]h&]refurijuh1hhjubeh}(h]h ]h"]h$]h&]uh1hhhhKhjhhubh)}(h#!/bin/sh # Create a crypt device using dmsetup dmsetup create crypt1 --table "0 `blockdev --getsz $1` crypt aes-cbc-essiv:sha256 babebabebabebabebabebabebabebabe 0 $1 0"h]h#!/bin/sh # Create a crypt device using dmsetup dmsetup create crypt1 --table "0 `blockdev --getsz $1` crypt aes-cbc-essiv:sha256 babebabebabebabebabebabebabebabe 0 $1 0"}hjsbah}(h]h ]h"]h$]h&]jjuh1hhhhKhjhhubh)}(h#!/bin/sh # Create a crypt device using dmsetup when encryption key is stored in keyring service dmsetup create crypt2 --table "0 `blockdev --getsize $1` crypt aes-cbc-essiv:sha256 :32:logon:my_prefix:my_key 0 $1 0"h]h#!/bin/sh # Create a crypt device using dmsetup when encryption key is stored in keyring service dmsetup create crypt2 --table "0 `blockdev --getsize $1` crypt aes-cbc-essiv:sha256 :32:logon:my_prefix:my_key 0 $1 0"}hjsbah}(h]h ]h"]h$]h&]jjuh1hhhhKhjhhubh)}(h#!/bin/sh # Create a crypt device using cryptsetup and LUKS header with default cipher cryptsetup luksFormat $1 cryptsetup luksOpen $1 crypt1h]h#!/bin/sh # Create a crypt device using cryptsetup and LUKS header with default cipher cryptsetup luksFormat $1 cryptsetup luksOpen $1 crypt1}hj sbah}(h]h ]h"]h$]h&]jjuh1hhhhKhjhhubeh}(h]example-scriptsah ]h"]example scriptsah$]h&]uh1hhhhhhhhKubeh}(h]dm-cryptah ]h"]dm-cryptah$]h&]uh1hhhhhhhhKubeh}(h]h ]h"]h$]h&]sourcehuh1hcurrent_sourceN current_lineNsettingsdocutils.frontendValues)}(hN generatorN datestampN source_linkN source_urlN toc_backlinksentryfootnote_backlinksK sectnum_xformKstrip_commentsNstrip_elements_with_classesN strip_classesN report_levelK halt_levelKexit_status_levelKdebugNwarning_streamN tracebackinput_encoding utf-8-siginput_encoding_error_handlerstrictoutput_encodingutf-8output_encoding_error_handlerjLerror_encodingutf-8error_encoding_error_handlerbackslashreplace language_codeenrecord_dependenciesNconfigN id_prefixhauto_id_prefixid dump_settingsNdump_internalsNdump_transformsNdump_pseudo_xmlNexpose_internalsNstrict_visitorN_disable_configN_sourceh _destinationN _config_files]7/var/lib/git/docbuild/linux/Documentation/docutils.confafile_insertion_enabled raw_enabledKline_length_limitM'pep_referencesN pep_base_urlhttps://peps.python.org/pep_file_url_templatepep-%04drfc_referencesN rfc_base_url&https://datatracker.ietf.org/doc/html/ tab_widthKtrim_footnote_reference_spacesyntax_highlightlong smart_quotessmartquotes_locales]character_level_inline_markupdoctitle_xform docinfo_xformKsectsubtitle_xform image_loadinglinkembed_stylesheetcloak_email_addressessection_self_linkenvNubreporterNindirect_targets]substitution_defs}substitution_names}refnames}refids}nameids}(j&j#jju nametypes}(j&juh}(j#hjju footnote_refs} citation_refs} autofootnotes]autofootnote_refs]symbol_footnotes]symbol_footnote_refs] footnotes] citations]autofootnote_startKsymbol_footnote_startK id_counter collectionsCounter}Rparse_messages]hsystem_message)}(hhh]h)}(h`Blank line missing before literal block (after the "::")? Interpreted as a definition list item.h]hdBlank line missing before literal block (after the “::”)? Interpreted as a definition list item.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjubah}(h]h ]h"]h$]h&]levelKtypeINFOlineKsourcehuh1jhjEubatransform_messages] transformerN include_log] decorationNhhub.