diff --git a/man/common_footer.adoc b/man/common_footer.adoc index 8538a3d4..ef4a2a6e 100644 --- a/man/common_footer.adoc +++ b/man/common_footer.adoc @@ -1,7 +1,6 @@ == REPORTING BUGS -Report bugs at mailto:cryptsetup@lists.linux.dev[cryptsetup mailing list] -or in https://gitlab.com/cryptsetup/cryptsetup/-/issues/new[Issues project section]. +Report bugs at mailto:cryptsetup@lists.linux.dev[cryptsetup mailing list] or in https://gitlab.com/cryptsetup/cryptsetup/-/issues/new[Issues project section]. Please attach output of the failed command with --debug option added. diff --git a/man/common_options.adoc b/man/common_options.adoc index 716ecfea..b433e63c 100644 --- a/man/common_options.adoc +++ b/man/common_options.adoc @@ -4,41 +4,35 @@ ifdef::ACTION_LUKSFORMAT,ACTION_REENCRYPT[] *--align-payload* __:: Align payload at a boundary of _value_ 512-byte sectors. + -If not specified, cryptsetup tries to use the topology info provided by -the kernel for the underlying device to get the optimal alignment. If -not available (or the calculated value is a multiple of the default) -data is by default aligned to a 1MiB boundary (i.e. 2048 512-byte -sectors). +If not specified, cryptsetup tries to use the topology info provided by the kernel for the underlying device to get the optimal alignment. +If not available (or the calculated value is a multiple of the default) data is by default aligned to a 1MiB boundary (i.e. 2048 512-byte sectors). + -For a detached LUKS header, this option specifies the offset on the data -device. See also the --header option. +For a detached LUKS header, this option specifies the offset on the data device. +See also the --header option. + -*WARNING:* This option is DEPRECATED and has often unexpected impact to -the data offset and keyslot area size (for LUKS2) due to the complex -rounding. For fixed data device offset use --offset option instead. +*WARNING:* This option is DEPRECATED and has often unexpected impact to the data offset and keyslot area size (for LUKS2) due to the complex rounding. +For fixed data device offset use --offset option instead. endif::[] ifdef::ACTION_OPEN,ACTION_REFRESH[] *--allow-discards*:: -Allow the use of discard (TRIM) requests for the device. This is also not -supported for LUKS2 devices with data integrity protection. +Allow the use of discard (TRIM) requests for the device. +This is also not supported for LUKS2 devices with data integrity protection. + -*WARNING:* 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 not use it. +*WARNING:* 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 not use it. + -A kernel version of 3.1 or later is needed. For earlier kernels, this -option is ignored. +A kernel version of 3.1 or later is needed. +For earlier kernels, this option is ignored. endif::[] ifdef::COMMON_OPTIONS[] *--batch-mode*, *-q*:: -Suppresses all confirmation questions. Use with care! +Suppresses all confirmation questions. +Use with care! + -If the --verify-passphrase option is not specified, this option also -switches off the passphrase verification. +If the --verify-passphrase option is not specified, this option also switches off the passphrase verification. endif::[] ifdef::ACTION_REENCRYPT[] @@ -50,8 +44,7 @@ endif::[] ifdef::ACTION_CLOSE[] *--cancel-deferred*:: -Removes a previously configured deferred device removal in _close_ -command. +Removes a previously configured deferred device removal in _close_ command. endif::[] ifdef::ACTION_OPEN,ACTION_LUKSFORMAT,ACTION_REENCRYPT,ACTION_TCRYPTDUMP,ACTION_BENCHMARK[] @@ -72,28 +65,26 @@ Set the cipher specification string for data segment only. Set the cipher specification string for data segment and keyslots. + *NOTE*: In encrypt mode, if cipher specification is omitted the default cipher is applied. -In reencrypt mode, if no new cipher specification is requested, the existing cipher will remain -in use. Unless the existing cipher was "cipher_null". In that case default cipher would -be applied as in encrypt mode. +In reencrypt mode, if no new cipher specification is requested, the existing cipher will remain in use. +Unless the existing cipher was "cipher_null". +In that case default cipher would be applied as in encrypt mode. endif::[] ifdef::ACTION_OPEN,ACTION_LUKSFORMAT,ACTION_REENCRYPT[] + _cryptsetup --help_ shows the compiled-in defaults. + -If a hash is part of the cipher specification, then it is used as part -of the IV generation. For example, ESSIV needs a hash function, while -"plain64" does not and hence none is specified. +If a hash is part of the cipher specification, then it is used as part of the IV generation. +For example, ESSIV needs a hash function, while "plain64" does not and hence none is specified. + -For XTS mode you can optionally set a key size of 512 bits with the -s -option. Key size for XTS mode is twice that for other modes for the same -security level. +For XTS mode you can optionally set a key size of 512 bits with the -s option. +Key size for XTS mode is twice that for other modes for the same security level. endif::[] endif::[] ifdef::COMMON_OPTIONS[] *--debug* or *--debug-json*:: -Run in debug mode with full diagnostic logs. Debug output lines are -always prefixed by *#*. +Run in debug mode with full diagnostic logs. +Debug output lines are always prefixed by *#*. + If --debug-json is used, additional LUKS2 JSON data structures are printed. endif::[] @@ -105,8 +96,7 @@ endif::[] ifdef::ACTION_CLOSE[] *--deferred*:: -Defers device removal in _close_ command until the last user closes -it. +Defers device removal in _close_ command until the last user closes it. endif::[] ifdef::ACTION_OPEN,ACTION_REENCRYPT,ACTION_RESIZE[] @@ -115,30 +105,28 @@ ifndef::ACTION_RESIZE[] Instead of real device size, use specified value. endif::[] ifdef::ACTION_RESIZE[] -Sets new size of the device. If unset real device size is used. +Sets new size of the device. +If unset real device size is used. endif::[] ifdef::ACTION_OPEN[] Usable only with _plain_ device type. endif::[] ifdef::ACTION_REENCRYPT[] -It means that only specified area (from the start of the device -to the specified size) will be reencrypted. +It means that only specified area (from the start of the device to the specified size) will be reencrypted. + *LUKS2*: -When used together with --reduce-device-size, only the initial _size_ value -(--device-size parameter) of data is shifted backwards while being encrypted. +When used together with --reduce-device-size, only the initial _size_ value (--device-size parameter) of data is shifted backwards while being encrypted. + *NOTE*: The sum of --device-size and --reduce-device-size values must not exceed real device size. + -*WARNING:* This is destructive operation. Data beyond --device-size limit may -be lost after operation gets finished. +*WARNING:* This is destructive operation. +Data beyond --device-size limit may be lost after operation gets finished. endif::[] + If no unit suffix is specified, the size is in bytes. + -Unit suffix can be S for 512 byte sectors, K/M/G/T (or KiB,MiB,GiB,TiB) -for units with 1024 base or KB/MB/GB/TB for 1000 base (SI scale). +Unit suffix can be S for 512 byte sectors, K/M/G/T (or KiB,MiB,GiB,TiB) for units with 1024 base or KB/MB/GB/TB for 1000 base (SI scale). endif::[] ifdef::ACTION_LUKSFORMAT,ACTION_REENCRYPT[] @@ -153,45 +141,38 @@ endif::[] ifdef::ACTION_OPEN,ACTION_RESIZE,ACTION_REFRESH,ACTION_LUKSFORMAT,ACTION_LUKSRESUME,ACTION_TOKEN,ACTION_REENCRYPT[] *--disable-keyring*:: -Do not load volume key in kernel keyring and store it directly in the -dm-crypt target instead. This option is supported only for the LUKS2 type. +Do not load volume key in kernel keyring and store it directly in the dm-crypt target instead. +This option is supported only for the LUKS2 type. endif::[] ifndef::ACTION_BENCHMARK,ACTION_BITLKDUMP,ACTION_TCRYPTDUMP[] *--disable-locks*:: -Disable lock protection for metadata on disk. This option is valid -only for LUKS2 and ignored for other formats. +Disable lock protection for metadata on disk. +This option is valid only for LUKS2 and ignored for other formats. + ifdef::ACTION_REENCRYPT[] -*NOTE:* With locking disabled LUKS2 images in files can be fully (re)encrypted -offline without need for super user privileges provided used block ciphers are -available in crypto backend. +*NOTE:* With locking disabled LUKS2 images in files can be fully (re)encrypted offline without need for super user privileges provided used block ciphers are available in crypto backend. + endif::[] -*WARNING:* Do not use this option unless you run cryptsetup in a -restricted environment where locking is impossible to perform (where -/run directory cannot be used). +*WARNING:* Do not use this option unless you run cryptsetup in a restricted environment where locking is impossible to perform (where /run directory cannot be used). endif::[] ifdef::ACTION_OPEN,ACTION_TCRYPTDUMP[] *--disable-veracrypt*:: -This option can be used to disable VeraCrypt compatible mode (only -TrueCrypt devices are recognized). Only for TCRYPT extension. See -_TCRYPT_ section in *cryptsetup*(8) for more info. +This option can be used to disable VeraCrypt compatible mode (only TrueCrypt devices are recognized). +See _TCRYPT_ section in *cryptsetup*(8) for more info. endif::[] ifdef::ACTION_LUKSDUMP[] *--dump-json-metadata*:: -For _luksDump_ (LUKS2 only) this option prints content of LUKS2 header -JSON metadata area. +For _luksDump_ (LUKS2 only) this option prints content of LUKS2 header JSON metadata area. endif::[] ifdef::ACTION_LUKSDUMP,ACTION_TCRYPTDUMP,ACTION_BITLKDUMP[] *--dump-volume-key*:: --dump-master-key (OBSOLETE alias):: -Print the volume key in the displayed information. Use with care, -as the volume key can be used to bypass -the passphrases, see also option --volume-key-file. +Print the volume key in the displayed information. +Use with care, as the volume key can be used to bypass the passphrases, see also option --volume-key-file. endif::[] ifdef::ACTION_REENCRYPT[] @@ -201,59 +182,52 @@ endif::[] ifdef::ACTION_RESIZE,ACTION_OPEN,ACTION_LUKSADDKEY,ACTION_LUKSDUMP,ACTION_LUKSRESUME,ACTION_TOKEN[] *--external-tokens-path* __:: -Override system directory path where cryptsetup searches for external token -handlers (or token plugins). It must be absolute path (starting with '/' character). +Override system directory path where cryptsetup searches for external token handlers (or token plugins). +It must be absolute path (starting with '/' character). endif::[] ifdef::ACTION_REENCRYPT[] *--force-no-keyslots* (LUKS2 only):: -Enforce initialization of reencryption operation with additional --volume-key-file, ---new-volume-key-file, --volume-key-keyring or --new-volume-key-keyring parameters -that would result in deletion of all remaining LUKS2 keyslots containing volume key. +Enforce initialization of reencryption operation with additional --volume-key-file, --new-volume-key-file, --volume-key-keyring or --new-volume-key-keyring parameters. +It would result in deletion of all remaining LUKS2 keyslots containing volume key. + -*NOTE:* LUKS2 keyslot with new volume key may be added after the reencryption -operation is finished. See *cryptsetup-luksAddKey*(8) command. +*NOTE:* LUKS2 keyslot with new volume key may be added after the reencryption operation is finished. +See *cryptsetup-luksAddKey*(8) command. + -*WARNING:* Use with extreme caution! If you loose volume key stored in a file or -in a kernel keyring before adding LUKS2 keyslot containing new volume key -the device will become unusable and all data will be lost. +*WARNING:* Use with extreme caution! +If you loose volume key stored in a file or in a kernel keyring before adding LUKS2 keyslot containing new volume key the device will become unusable and all data will be lost. endif::[] ifdef::ACTION_REENCRYPT[] *--force-offline-reencrypt* (LUKS2 only):: Bypass active device auto-detection and enforce offline reencryption. + -This option is useful especially for reencryption of LUKS2 images put in -files (auto-detection is not reliable in this scenario). +This option is useful especially for reencryption of LUKS2 images put in files (auto-detection is not reliable in this scenario). + -It may also help in case active device auto-detection on particular -data device does not work or report errors. +It may also help in case active device auto-detection on particular data device does not work or report errors. + -*WARNING:* Use with extreme caution! This may destroy data if the device -is activated and/or actively used. +*WARNING:* Use with extreme caution! This may destroy data if the device is activated and/or actively used. endif::[] ifdef::ACTION_LUKSFORMAT,ACTION_LUKSADDKEY,ACTION_LUKSCHANGEKEY,ACTION_LUKSCONVERTKEY,ACTION_REENCRYPT[] *--force-password*:: Do not use password quality checking for new LUKS passwords. + -This option is ignored if cryptsetup is built without password -quality checking support. +This option is ignored if cryptsetup is built without password quality checking support. + -For more info about password quality check, see the manual page for -*pwquality.conf(5)* and *passwdqc.conf(5)*. +For more info about password quality check, see the manual page for *pwquality.conf(5)* and *passwdqc.conf(5)*. endif::[] ifdef::ACTION_OPEN,ACTION_LUKSFORMAT,ACTION_LUKSADDKEY,ACTION_LUKSCHANGEKEY,ACTION_LUKSCONVERTKEY,ACTION_TCRYPTDUMP,ACTION_BENCHMARK,ACTION_REENCRYPT[] *--hash*, *-h* __:: ifdef::ACTION_OPEN,ACTION_TCRYPTDUMP[] -Specifies the passphrase hash. Applies to _plain_ and _loopaes_ device types only. +Specifies the passphrase hash. +Applies to _plain_ and _loopaes_ device types only. + For _tcrypt_ device type, it restricts checked PBKDF2 variants when looking for header. endif::[] ifdef::ACTION_LUKSFORMAT[] -Specifies the hash used in the LUKS key setup scheme and volume key -digest. +Specifies the hash used in the LUKS key setup scheme and volume key digest. endif::[] ifndef::ACTION_REENCRYPT,ACTION_OPEN,ACTION_TCRYPTDUMP[] The specified hash is used for PBKDF2 and AF splitter. @@ -262,8 +236,7 @@ ifdef::ACTION_REENCRYPT[] *LUKS1:* Specifies the hash used in the LUKS1 key setup scheme and volume key digest. + -*NOTE*: if this parameter is not specified, default hash algorithm is always used -for new LUKS1 device header. +*NOTE*: if this parameter is not specified, default hash algorithm is always used for new LUKS1 device header. + *LUKS2:* Ignored unless new keyslot pbkdf algorithm is set to PBKDF2 (see --pbkdf). endif::[] @@ -278,32 +251,26 @@ endif::[] ifndef::ACTION_BENCHMARK,ACTION_BITLKDUMP[] *--header* __:: ifndef::ACTION_OPEN,ACTION_ERASE[] -Use a detached (separated) metadata device or file where the LUKS -header is stored. This option allows one to store ciphertext and LUKS -header on different devices. +Use a detached (separated) metadata device or file where the LUKS header is stored. +This option allows one to store ciphertext and LUKS header on different devices. + endif::[] ifdef::ACTION_OPEN[] Specify detached (separated) metadata device or file where the header is stored. + -*WARNING:* There is no check whether the ciphertext device specified -actually belongs to the header given. In fact, you can specify an -arbitrary device as the ciphertext device with the --header option. +*WARNING:* There is no check whether the ciphertext device specified actually belongs to the header given. +In fact, you can specify an arbitrary device as the ciphertext device with the --header option. Use with care. endif::[] ifndef::ACTION_REENCRYPT[] ifdef::ACTION_LUKSFORMAT[] -With a file name as the argument to --header, the file -will be automatically created if it does not exist. See the cryptsetup -FAQ for header size calculation. +With a file name as the argument to --header, the file will be automatically created if it does not exist. +See the cryptsetup FAQ for header size calculation. + -The --align-payload option is taken as absolute sector alignment on ciphertext -device and can be zero. +The --align-payload option is taken as absolute sector alignment on ciphertext device and can be zero. endif::[] ifndef::ACTION_LUKSFORMAT,ACTION_OPEN,ACTION_ERASE[] -For commands that change the LUKS header (e.g. _luksAddKey_), -specify the device or file with the LUKS header directly as the LUKS -device. +For commands that change the LUKS header (e.g. _luksAddKey_), specify the device or file with the LUKS header directly as the LUKS device. endif::[] endif::[] ifdef::ACTION_REENCRYPT[] @@ -311,14 +278,13 @@ If used with --encrypt/--new option, the header file will be created (or overwri Use with care. + *LUKS2*: -For decryption mode the option may be used to export original LUKS2 header -to a detached file. The passed future file must not exist at the time -of initializing the decryption operation. This frees space in head of data -device so that data can be moved at original LUKS2 header location. Later on -decryption operation continues as if the ordinary detached header was passed. +For decryption mode the option may be used to export original LUKS2 header to a detached file. +The passed future file must not exist at the time of initializing the decryption operation. +This frees space in head of data device so that data can be moved at original LUKS2 header location. +Later on decryption operation continues as if the ordinary detached header was passed. + -*WARNING:* Never put exported header file in a filesystem on top of device -you are about to decrypt! It would cause a deadlock. +*WARNING:* Never put exported header file in a filesystem on top of device you are about to decrypt! +It would cause a deadlock. endif::[] ifdef::ACTION_ERASE[] Use to specify detached LUKS2 header when erasing HW OPAL enabled data device. @@ -337,69 +303,54 @@ endif::[] ifdef::ACTION_REENCRYPT[] *--hotzone-size* _size_ (LUKS2 only):: -This option can be used to set an upper limit on the size of -reencryption area (hotzone). The _size_ can be specified with unit -suffix (for example 50M). Note that actual hotzone size may be less -than specified due to other limitations (free space in keyslots -area or available memory). +This option can be used to set an upper limit on the size of reencryption area (hotzone). +The _size_ can be specified with unit suffix (for example 50M). +Note that actual hotzone size may be less than specified due to other limitations (free space in keyslots area or available memory). + -With decryption mode for devices with LUKS2 header placed in head of data -device, the option specifies how large is the first data segment moved -from original data offset pointer. +With decryption mode for devices with LUKS2 header placed in head of data device, the option specifies how large is the first data segment moved from original data offset pointer. endif::[] ifdef::ACTION_LUKSFORMAT[] *--hw-opal*:: -Format LUKS2 device with dm-crypt encryption stacked on top HW based encryption configured -on SED OPAL locking range. This option enables both SW and HW based data encryption. +Format LUKS2 device with dm-crypt encryption stacked on top HW based encryption configured on SED OPAL locking range. +This option enables both SW and HW based data encryption. endif::[] ifdef::ACTION_ERASE[] *--hw-opal-factory-reset*:: -Erase *ALL* data on the OPAL self-encrypted device, regardless of the partition it is ran on, if any, -and does not require a valid LUKS2 header to be present on the device to run. After providing -correct PSID via interactive prompt or via --key-file parameter the device is erased. +Erase *ALL* data on the OPAL self-encrypted device. +The option does not require a valid LUKS2 header to be present on the device to run. +After providing correct PSID via interactive prompt or via --key-file parameter the device is erased. + -PSID is usually printed on the OPAL device label (either directly or as a QR code). PSID must be -entered without any dashes, spaces or underscores. +PSID is usually printed on the OPAL device label (either directly or as a QR code). +PSID must be entered without any dashes, spaces or underscores. + -*NOTE*: PSID should be treated as sensitive information as it allows anyone with remote access to -the OPAL device to destroy data even if the device is locked. Be sure you do not leak PSID through -transparent packaging during transport or images of the drive posted online. +*NOTE*: PSID should be treated as sensitive information as it allows anyone with remote access to the OPAL device to destroy data even if the device is locked. +Be sure you do not leak PSID through transparent packaging during transport or images of the drive posted online. endif::[] ifdef::ACTION_LUKSFORMAT[] *--hw-opal-only*:: -Format LUKS2 device with HW based encryption configured on SED OPAL locking range only. LUKS2 -format only manages locking range unlock key. This option enables HW based data encryption managed -by SED OPAL drive only. +Format LUKS2 device with HW based encryption configured on SED OPAL locking range only. +LUKS2 format only manages locking range unlock key. +This option enables HW based data encryption managed by SED OPAL drive only. + -*NOTE*: Please note that with OPAL-only (--hw-opal-only) encryption, -the configured OPAL administrator PIN (passphrase) allows unlocking -all configured locking ranges without LUKS keyslot decryption -(without knowledge of LUKS passphrase). -Because of many observed problems with compatibility, cryptsetup -currently DOES NOT use OPAL single-user mode, which would allow such -decoupling of OPAL admin PIN access. +*NOTE*: Please note that with OPAL-only (--hw-opal-only) encryption, the configured OPAL administrator PIN (passphrase) allows unlocking all configured locking ranges without LUKS keyslot decryption (without knowledge of LUKS passphrase). +Because of many observed problems with compatibility, cryptsetup currently DOES NOT use OPAL single-user mode, which would allow such decoupling of OPAL admin PIN access. endif::[] ifdef::ACTION_REENCRYPT[] *--init-only* (LUKS2 only):: -Initialize reencryption (any mode) operation in LUKS2 metadata only -and exit. If any reencrypt operation is already initialized in -metadata, the command with --init-only parameter fails. +Initialize reencryption (any mode) operation in LUKS2 metadata only and exit. +If any reencrypt operation is already initialized in metadata, the command with --init-only parameter fails. endif::[] ifdef::ACTION_LUKSFORMAT[] *--integrity* __:: -Specify integrity algorithm to be used for authenticated disk -encryption in LUKS2. +Specify integrity algorithm to be used for authenticated disk encryption in LUKS2. + -*WARNING: This extension is EXPERIMENTAL* and requires dm-integrity -kernel target (available since kernel version 4.12). For native AEAD -modes, also enable "User-space interface for AEAD cipher algorithms" in -"Cryptographic API" section (CONFIG_CRYPTO_USER_API_AEAD .config -option). +*WARNING: This extension is EXPERIMENTAL* and requires dm-integrity kernel target (available since kernel version 4.12). +For native AEAD modes, also enable "User-space interface for AEAD cipher algorithms" in "Cryptographic API" section (CONFIG_CRYPTO_USER_API_AEAD .config option). + For more info, see _AUTHENTICATED DISK ENCRYPTION_ section in *cryptsetup*(8). endif::[] @@ -407,21 +358,19 @@ endif::[] ifdef::ACTION_LUKSFORMAT[] *--integrity-inline*:: Store integrity tags to hardware sector integrity fields. -The device must support sectors with additional protection information -(PI, also known as DIF - data integrity field) of the requested size. -Another storage subsystem must not use the additional field -(the device must present a "nop" profile in the kernel). -Note that some devices must be reformatted at a low level to support -this option; for NVMe devices, see nvme(1) id-ns LBA profiles. +The device must support sectors with additional protection information (PI, also known as DIF - data integrity field) of the requested size. +Another storage subsystem must not use the additional field (the device must present a "nop" profile in the kernel). +Note that some devices must be reformatted at a low level to support this option; for NVMe devices, see nvme(1) id-ns LBA profiles. + -No journal or bitmap is used in this mode. The device should operate -with native speed (without any overhead). +No journal or bitmap is used in this mode. +The device should operate with native speed (without any overhead). This option is available since the Linux kernel version 6.11. endif::[] ifdef::ACTION_LUKSFORMAT[] *--integrity-key-size* _bytes_:: -The size of the data integrity key. Configurable only for HMAC integrity. +The size of the data integrity key. +Configurable only for HMAC integrity. Default integrity key size is set to the same as hash output length. endif::[] @@ -429,27 +378,22 @@ ifdef::ACTION_LUKSFORMAT[] *--integrity-legacy-padding*:: Use inefficient legacy padding. + -*WARNING*: Do not use this option until you need compatibility with specific -old kernel. +*WARNING*: Do not use this option until you need compatibility with specific old kernel. endif::[] ifdef::ACTION_REFRESH[] *--integrity-no-journal*:: -Activate device with integrity protection without using data journal -(direct write of data and integrity tags). Note that without journal -power fail can cause non-atomic write and data corruption. Use only if -journalling is performed on a different storage layer. +Activate device with integrity protection without using data journal (direct write of data and integrity tags). +Note that without journal power fail can cause non-atomic write and data corruption. +Use only if journalling is performed on a different storage layer. endif::[] ifdef::ACTION_LUKSFORMAT[] *--integrity-no-wipe*:: -Skip wiping of device authentication (integrity) tags. If you skip -this step, sectors will report invalid integrity tag until an -application write to the sector. +Skip wiping of device authentication (integrity) tags. +If you skip this step, sectors will report invalid integrity tag until an application write to the sector. + -*NOTE:* Even some writes to the device can fail if the write is not -aligned to page size and page-cache initiates read of a sector with -invalid integrity tag. +*NOTE:* Even some writes to the device can fail if the write is not aligned to page size and page-cache initiates read of a sector with invalid integrity tag. endif::[] ifdef::ACTION_LUKSFORMAT,ACTION_LUKSADDKEY,ACTION_LUKSCHANGEKEY,ACTION_LUKSCONVERTKEY,ACTION_REENCRYPT,ACTION_BENCHMARK[] @@ -459,36 +403,32 @@ The number of milliseconds to spend with PBKDF passphrase processing. Specifying 0 as parameter selects the compiled-in default. endif::[] ifdef::ACTION_REENCRYPT[] -The number of milliseconds to spend with PBKDF passphrase processing for the -new LUKS header. +The number of milliseconds to spend with PBKDF passphrase processing for the new LUKS header. endif::[] endif::[] ifdef::ACTION_OPEN[] *--iv-large-sectors*:: -Count Initialization Vector (IV) in larger sector size (if set) -instead of 512 bytes sectors. This option can be used only with _plain_ -device type. +Count Initialization Vector (IV) in larger sector size (if set) instead of 512 bytes sectors. +This option can be used only with _plain_ device type. + -*NOTE:* This option does not have any performance or security impact, -use it only for accessing incompatible existing disk images from other -systems that require this option. +*NOTE:* This option does not have any performance or security impact, use it only for accessing incompatible existing disk images from other systems that require this option. endif::[] ifdef::ACTION_TOKEN[] *--json-file*:: -Read token JSON from a file or write token to it. --json-file=- reads JSON from -standard input or writes it to standard output respectively. +Read token JSON from a file or write token to it. +Option --json-file=- reads JSON from standard input or writes it to standard output respectively. endif::[] ifdef::ACTION_REENCRYPT[] *--keep-key*:: *LUKS2*: -Do not change effective volume key and change other parameters provided -it is requested. +Do not change effective volume key and change other parameters provided it is requested. + *LUKS1*: -Reencrypt only the LUKS1 header and keyslots. Skips data in-place reencryption. +Reencrypt only the LUKS1 header and keyslots. +Skips data in-place reencryption. endif::[] ifdef::ACTION_OPEN,ACTION_LUKSFORMAT,ACTION_LUKSDUMP,ACTION_RESIZE,ACTION_LUKSRESUME,ACTION_LUKSADDKEY,ACTION_TOKEN[] @@ -504,42 +444,33 @@ If the name given is "-", then the passphrase will be read from stdin. In this case, reading will not stop at newline characters. + ifdef::ACTION_LUKSADDKEY,ACTION_LUKSCHANGEKEY[] -The passphrase supplied via --key-file is always the passphrase for existing -keyslot requested by the command. +The passphrase supplied via --key-file is always the passphrase for existing keyslot requested by the command. + ifdef::ACTION_LUKSADDKEY[] -If you want to set a new passphrase via key file, you have to use a -positional argument or parameter --new-keyfile. +If you want to set a new passphrase via key file, you have to use a positional argument or parameter --new-keyfile. endif::[] ifdef::ACTION_LUKSCHANGEKEY[] -If you want to set a new passphrase via key file, you have to use a -positional argument. +If you want to set a new passphrase via key file, you have to use a positional argument. endif::[] + endif::[] ifdef::ACTION_OPEN[] -*NOTE:* With _plain_ device type, the passphrase obtained via --key-file option is -passed directly in dm-crypt. Unlike the interactive mode (stdin) -where digest (--hash option) of the passphrase is passed in dm-crypt instead. +*NOTE:* With _plain_ device type, the passphrase obtained via --key-file option is passed directly in dm-crypt. +Unlike the interactive mode (stdin) where digest (--hash option) of the passphrase is passed in dm-crypt instead. + endif::[] ifndef::ACTION_REENCRYPT[] See section _NOTES ON PASSPHRASE PROCESSING_ in *cryptsetup*(8) for more information. endif::[] ifdef::ACTION_REENCRYPT[] -*WARNING:* --key-file option can be used only if there is only one active keyslot, -or alternatively, also if --key-slot option is specified (then all other keyslots -will be disabled in new LUKS device). +*WARNING:* --key-file option can be used only if there is only one active keyslot, or alternatively, also if --key-slot option is specified (then all other keyslots will be disabled in new LUKS device). + -If this option is not used, cryptsetup will ask for all active keyslot -passphrases. +If this option is not used, cryptsetup will ask for all active keyslot passphrases. endif::[] endif::[] ifdef::ACTION_ERASE[] *--key-file*, *-d* _file_ (LUKS2 with HW OPAL only):: - -Read the Admin PIN or PSID (with --hw-opal-factory-reset) from file -depending on options used. +Read the Admin PIN or PSID (with --hw-opal-factory-reset) from file depending on options used. + If the name given is "-", then the secret will be read from stdin. In this case, reading will not stop at newline characters. @@ -553,46 +484,46 @@ endif::[] ifdef::ACTION_OPEN,ACTION_RESIZE,ACTION_LUKSFORMAT,ACTION_LUKSRESUME,ACTION_LUKSADDKEY,ACTION_LUKSREMOVEKEY,ACTION_LUKSCHANGEKEY,ACTION_LUKSCONVERTKEY,ACTION_LUKSKILLSLOT,ACTION_LUKSDUMP,ACTION_REENCRYPT,ACTION_REPAIR,ACTION_BITLKDUMP[] *--keyfile-size*, *-l* _value_:: -Read a maximum of _value_ bytes from the key file. The default is to -read the whole file up to the compiled-in maximum that can be queried -with --help. Supplying more data than the compiled-in maximum aborts -the operation. +Read a maximum of _value_ bytes from the key file. +The default is to read the whole file up to the compiled-in maximum that can be queried with --help. +Supplying more data than the compiled-in maximum aborts the operation. + -This option is useful to cut trailing newlines, for example. If ---keyfile-offset is also given, the size count starts after the offset. +This option is useful to cut trailing newlines, for example. +If --keyfile-offset is also given, the size count starts after the offset. endif::[] ifdef::ACTION_OPEN,ACTION_LUKSFORMAT,ACTION_REENCRYPT,ACTION_BENCHMARK,ACTION_LUKSADDKEY[] *--key-size*, *-s* _bits_:: ifndef::ACTION_LUKSADDKEY,ACTION_REENCRYPT[] -Sets key size in _bits_. The argument has to be a multiple of 8. The -possible key-sizes are limited by the cipher and mode used. +Sets key size in _bits_. +The argument has to be a multiple of 8. +The possible key-sizes are limited by the cipher and mode used. + -See /proc/crypto for more information. Note that key-size in -/proc/crypto is stated in bytes. +See /proc/crypto for more information. +Note that key-size in /proc/crypto is stated in bytes. + endif::[] ifdef::ACTION_LUKSADDKEY[] -Provide volume key size in _bits_. The argument has to be a multiple of 8. +Provide volume key size in _bits_. +The argument has to be a multiple of 8. + -This option is required when parameter --volume-key-file is used to provide -current volume key. Also, it is used when new unbound keyslot is created by -specifying --unbound parameter. +This option is required when parameter --volume-key-file is used to provide current volume key. +Also, it is used when new unbound keyslot is created by specifying --unbound parameter. endif::[] ifdef::ACTION_OPEN[] -This option can be used for _plain_ and _luks_ devices. For LUKS2 devices -in reencryption you may use the parameter twice to specify both old and new volume key -sizes. Each --key-size option corresponds to the respective --volume-key-file parameter -(also allowed to be used up to two times). +This option can be used for _plain_ and _luks_ devices. +For LUKS2 devices in reencryption you may use the parameter twice to specify both old and new volume key sizes. +Each --key-size option corresponds to the respective --volume-key-file parameter (also allowed to be used up to two times). endif::[] ifndef::ACTION_REENCRYPT,ACTION_OPEN,ACTION_LUKSADDKEY[] -This option can be used for _open --type plain_ or _luksFormat_. All -other LUKS actions will use the key-size specified in the LUKS header. +This option can be used for _open --type plain_ or _luksFormat_. +All other LUKS actions will use the key-size specified in the LUKS header. Use _cryptsetup --help_ to show the compiled-in defaults. endif::[] ifdef::ACTION_REENCRYPT[] *LUKS2*: -Provide current key size in _bits_. The argument has to be a multiple of 8. +Provide current key size in _bits_. +The argument has to be a multiple of 8. Useful when specifying the size of current volume key when no keyslot is active. + *LUKS1*: @@ -603,24 +534,18 @@ endif::[] ifdef::ACTION_OPEN,ACTION_RESIZE,ACTION_LUKSFORMAT,ACTION_LUKSADDKEY,ACTION_LUKSCHANGEKEY,ACTION_LUKSCONVERTKEY,ACTION_LUKSDUMP,ACTION_LUKSRESUME,ACTION_TOKEN,ACTION_CONFIG,ACTION_TOKEN,ACTION_REPAIR,ACTION_REENCRYPT[] *--key-slot*, *-S* _<0-N>_:: ifdef::ACTION_LUKSADDKEY[] -When used together with parameter --new-key-slot this option allows you to specify which -key slot is selected for unlocking volume key. +When used together with parameter --new-key-slot this option allows you to specify which key slot is selected for unlocking volume key. + -*NOTE:* This option is ignored if existing volume key gets unlocked -via LUKS2 token (--token-id, --token-type or --token-only parameters) or -when volume key is provided directly via --volume-key-file parameter. +*NOTE:* This option is ignored if existing volume key gets unlocked via LUKS2 token (--token-id, --token-type or --token-only parameters) or when volume key is provided directly via --volume-key-file parameter. + -*NOTE:* To maintain backward compatibility, without --new-key-slot parameter, -this option allows you to specify which key slot is selected for the new key. +*NOTE:* To maintain backward compatibility, without --new-key-slot parameter, this option allows you to specify which key slot is selected for the new key. endif::[] ifndef::ACTION_OPEN,ACTION_LUKSADDKEY[] -For LUKS operations that add key material, this option allows you to -specify which key slot is selected for the new key. +For LUKS operations that add key material, this option allows you to specify which key slot is selected for the new key. endif::[] ifdef::ACTION_OPEN[] -This option selects a specific key-slot to -compare the passphrase against. If the given passphrase would only -match a different key-slot, the operation fails. +This option selects a specific key-slot to compare the passphrase against. +If the given passphrase would only match a different key-slot, the operation fails. endif::[] + ifdef::ACTION_REENCRYPT[] @@ -628,68 +553,60 @@ For reencryption mode it selects specific keyslot (and passphrase) that can be u If used all other keyslots get removed after reencryption operation is finished. + endif::[] -The maximum number of key slots depends on the LUKS version. LUKS1 can have up -to 8 key slots. LUKS2 can have up to 32 key slots based on key slot area -size and key size, but a valid key slot ID can always be between 0 and -31 for LUKS2. +The maximum number of key slots depends on the LUKS version. +LUKS1 can have up to 8 key slots. +LUKS2 can have up to 32 key slots based on key slot area size and key size, but a valid key slot ID can always be between 0 and 31 for LUKS2. endif::[] ifdef::ACTION_LUKSFORMAT,ACTION_LUKSADDKEY,ACTION_LUKSCHANGEKEY,ACTION_LUKSCONVERTKEY,ACTION_REENCRYPT[] *--keyslot-cipher* __:: -This option can be used to set specific cipher encryption for the -LUKS2 keyslot area. +This option can be used to set specific cipher encryption for the LUKS2 keyslot area. endif::[] ifdef::ACTION_LUKSFORMAT,ACTION_LUKSADDKEY,ACTION_LUKSCHANGEKEY,ACTION_LUKSCONVERTKEY,ACTION_REENCRYPT[] *--keyslot-key-size* __:: -This option can be used to set specific key size for the LUKS2 keyslot -area. +This option can be used to set specific key size for the LUKS2 keyslot area. endif::[] ifdef::ACTION_LUKSFORMAT,ACTION_CONFIG,ACTION_REENCRYPT[] *--label* _