== OPTIONS ifdef::ACTION_LUKSFORMAT,ACTION_REENCRYPT[] *--align-payload* __ (DEPRECATED, use --offset):: 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). + For a detached LUKS header, this option specifies the offset on the data device. See also the --header option. + This option is DEPRECATED and has an unexpected impact on 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. + *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. endif::[] ifdef::COMMON_OPTIONS[] *--batch-mode*, *-q*:: Suppresses all confirmation questions. Use with care! + If the --verify-passphrase option is not specified, this option also switches off the passphrase verification. endif::[] ifdef::ACTION_REENCRYPT[] *--block-size* _value_ (LUKS1 only):: Use re-encryption block size of _value_ in MiB. + Values can be between 1 and 64 MiB. endif::[] ifdef::ACTION_CLOSE[] *--cancel-deferred*:: Removes a previously configured deferred device removal in the _close_ command. endif::[] ifdef::ACTION_OPEN,ACTION_LUKSFORMAT,ACTION_REENCRYPT,ACTION_TCRYPTDUMP,ACTION_BENCHMARK[] *--cipher*, *-c* __:: ifdef::ACTION_OPEN,ACTION_TCRYPTDUMP[] Set the cipher specification string for the _plain_ device type. + For the _tcrypt_ device type, it restricts checked cipher chains when looking for the header. endif::[] ifndef::ACTION_REENCRYPT,ACTION_OPEN,ACTION_TCRYPTDUMP[] Set the cipher specification string. endif::[] ifdef::ACTION_REENCRYPT[] *LUKS2*: Set the cipher specification string for the data segment only. + *LUKS1*: Set the cipher specification string for the data segment and keyslots. + The default cipher is applied if the cipher specification is omitted in encrypt mode. + In reencrypt mode, if no new cipher specification is requested, the existing cipher will remain. The only exception is if the cipher is "cipher_null", then the default cipher is used. 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. + 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 *#*. + If --debug-json is used, additional LUKS2 JSON data structures are printed. endif::[] ifdef::ACTION_REENCRYPT[] *--decrypt*:: Initialize (and run) device decryption mode. endif::[] ifdef::ACTION_CLOSE[] *--deferred*:: Defers device removal in the _close_ command until the last user closes it. endif::[] ifdef::ACTION_OPEN,ACTION_REENCRYPT,ACTION_RESIZE[] *--device-size* _size[units]_:: ifndef::ACTION_RESIZE[] Instead of the real device size, use the specified value. endif::[] ifdef::ACTION_RESIZE[] Sets the new size of the device. If unset, the real device size is used. endif::[] ifdef::ACTION_OPEN[] Usable only with _plain_ device type. endif::[] ifdef::ACTION_REENCRYPT[] It means that only the 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. + The sum of --device-size and --reduce-device-size values must not exceed the real device size. + *WARNING:* This is a destructive operation. Data beyond --device-size limit may be lost after the operation is 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). endif::[] ifdef::ACTION_LUKSFORMAT,ACTION_REENCRYPT[] *--disable-blkid*:: Disable use of the blkid library for checking and wiping on-disk signatures. endif::[] ifdef::ACTION_OPEN,ACTION_LUKSRESUME,ACTION_RESIZE,ACTION_TOKEN[] *--disable-external-tokens*:: Disable loading of plugins for external LUKS2 tokens. endif::[] ifdef::ACTION_OPEN,ACTION_RESIZE,ACTION_REFRESH,ACTION_LUKSFORMAT,ACTION_LUKSRESUME,ACTION_TOKEN,ACTION_REENCRYPT[] *--disable-keyring*:: Do not load the volume key in the kernel keyring; 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 is ignored for other formats. + ifdef::ACTION_REENCRYPT[] With locking disabled, LUKS2 images in files can be fully (re)encrypted offline without the need for superuser privileges provided that the used block ciphers are available in the 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). endif::[] ifdef::ACTION_OPEN,ACTION_TCRYPTDUMP[] *--disable-veracrypt*:: This option can be used to disable VeraCrypt compatible mode (only TrueCrypt devices are recognized). See the _TCRYPT_ section in *cryptsetup*(8) for more info. endif::[] ifdef::ACTION_LUKSDUMP[] *--dump-json-metadata*:: For _luksDump_ (LUKS2 only), this option prints the content of the 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. endif::[] ifdef::ACTION_REENCRYPT[] *--encrypt*, *--new*, *-N*:: Initialize (and run) the device in-place encryption mode. endif::[] ifdef::ACTION_RESIZE,ACTION_OPEN,ACTION_LUKSADDKEY,ACTION_LUKSDUMP,ACTION_LUKSRESUME,ACTION_TOKEN[] *--external-tokens-path* __:: Override the system directory path where cryptsetup searches for external token handlers (or token plugins). It must be an 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. It would result in the deletion of all remaining LUKS2 keyslots containing the volume key. + LUKS2 keyslot with the new volume key may be added after the reencryption operation is finished. See *cryptsetup-luksAddKey*(8) command. + *WARNING:* Use with extreme caution! If you lose the volume key stored in a file or in a kernel keyring before adding the LUKS2 keyslot containing the 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). + It may also help in case active device auto-detection on a 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. 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. + 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. + For the _tcrypt_ device type, it restricts the checked PBKDF2 variants when looking for the header. endif::[] ifdef::ACTION_LUKSFORMAT[] 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 the AF splitter. endif::[] ifdef::ACTION_REENCRYPT[] *LUKS1:* Specifies the hash used in the LUKS1 key setup scheme and volume key digest. + If this parameter is not specified, the default hash algorithm is always used for a new LUKS1 device header. + *LUKS2:* Ignored unless new keyslot pbkdf algorithm is set to PBKDF2 (see --pbkdf). endif::[] + ifdef::ACTION_LUKSFORMAT[] The hash algorithm must provide at least 160 bits of output. Do not use a non-crypto hash like *xxhash* as this breaks security. Use _cryptsetup --help_ to show the defaults. endif::[] 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 the ciphertext and LUKS header on different devices. + endif::[] ifdef::ACTION_OPEN[] Specify a 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. 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. + The --align-payload option is taken as absolute sector alignment on the 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. endif::[] endif::[] ifdef::ACTION_REENCRYPT[] If used with --encrypt/--new option, the header file will be created (or overwritten). Use with care. + *LUKS2*: For decryption mode, the option may be used to export the 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 the head of the data device so that data can be moved at the original LUKS2 header location. Later on, the decryption operation continues as if the ordinary detached header was passed. + *WARNING:* Never put an exported header file in a filesystem on top of the device you are about to decrypt! It would cause a deadlock. endif::[] ifdef::ACTION_ERASE[] Use to specify a detached LUKS2 header when erasing OPAL self-encrypting drive. endif::[] endif::[] ifdef::ACTION_LUKSHEADERBACKUP,ACTION_LUKSHEADERRESTORE[] *--header-backup-file* _file_:: Specify a file with the header backup file. endif::[] ifdef::COMMON_OPTIONS[] *--help*, *-?*:: Show help text and default parameters. endif::[] ifdef::ACTION_REENCRYPT[] *--hotzone-size* _size_ (LUKS2 only):: This option can be used to set an upper limit on the size of the reencryption area (hotzone). The _size_ can be specified with a unit suffix (for example, 50M). Note that the 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 the head of the data device, the option specifies how large is the first data segment moved from the original data offset pointer. endif::[] ifdef::ACTION_LUKSFORMAT[] *--hw-opal*:: Format LUKS2 device with dm-crypt encryption stacked on top of 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-encrypting drive. The option does not require a valid LUKS2 header to be present on the device to run. After providing the correct PSID via interactive prompt or via --key-file parameter the device is erased. + PSID is usually printed on the OPAL drive label (either directly or as a QR code). PSID must be entered without any dashes, spaces or underscores. + PSID should be treated as sensitive information as it allows anyone with remote access to the OPAL drive 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 the locking range unlock key. This option enables HW-based data encryption managed by the SED OPAL drive only. + 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. endif::[] ifdef::ACTION_LUKSFORMAT[] *--integrity* __:: Specify the integrity algorithm to be used for authenticated disk encryption in LUKS2. + *WARNING: This extension is EXPERIMENTAL* and requires dm-integrity kernel target. For native AEAD modes, also enable "User-space interface for AEAD cipher algorithms" in the "Cryptographic API" section (CONFIG_CRYPTO_USER_API_AEAD .config option). + For more info, see the _AUTHENTICATED DISK ENCRYPTION_ section in *cryptsetup*(8). endif::[] ifdef::ACTION_LUKSFORMAT[] *--integrity-inline*:: Store integrity tags in 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. + 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* _bits_:: The size of the data integrity key. The argument has to be a multiple of 8. Configurable only for HMAC integrity. The default integrity key size is set to the same as the hash output length. endif::[] ifdef::ACTION_LUKSFORMAT[] *--integrity-legacy-padding*:: Use inefficient legacy padding. + Do not use this option until you need compatibility with a 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 a journal, a power failure can cause non-atomic writes and data corruption. Use only if journaling 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 an invalid integrity tag until an application writes to the sector. + Skipping this step could also cause write failures due to IO operation alignments. For example, kernel page cache can request a read of a full page that fails due to an uninitialized integrity tag. It is usually a bug in the application that tries to read data that was not written before. endif::[] ifdef::ACTION_LUKSFORMAT,ACTION_LUKSADDKEY,ACTION_LUKSCHANGEKEY,ACTION_LUKSCONVERTKEY,ACTION_REENCRYPT,ACTION_BENCHMARK[] *--iter-time*, *-i* __:: ifndef::ACTION_REENCRYPT[] The number of milliseconds to spend with PBKDF passphrase processing. Specifying 0 as a 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. endif::[] endif::[] ifdef::ACTION_OPEN[] *--iv-large-sectors*:: Count Initialization Vector (IV) in larger sector size (if set) instead of 512-byte sectors. This option can be used only with the _plain_ device type. + 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 the token JSON from a file or write the 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 the effective volume key, and change other parameters if requested. + *LUKS1*: 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[] *--key-description* _text_:: Set the key description in the keyring that will be used for passphrase retrieval. endif::[] ifdef::ACTION_OPEN,ACTION_RESIZE,ACTION_LUKSFORMAT,ACTION_LUKSRESUME,ACTION_LUKSADDKEY,ACTION_LUKSREMOVEKEY,ACTION_LUKSCHANGEKEY,ACTION_LUKSCONVERTKEY,ACTION_LUKSKILLSLOT,ACTION_LUKSDUMP,ACTION_TCRYPTDUMP,ACTION_REENCRYPT,ACTION_REPAIR,ACTION_BITLKDUMP[] *--key-file*, *-d* _file_:: Read the passphrase from the file. + 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 the 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. endif::[] ifdef::ACTION_LUKSCHANGEKEY[] If you want to set a new passphrase via a key file, you have to use a positional argument. endif::[] + endif::[] ifdef::ACTION_OPEN[] With _plain_ device type, the passphrase obtained via --key-file option is passed directly in dm-crypt. Unlike the interactive mode (stdin), where the digest 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[] The --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 the new LUKS device). + 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 the 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. + 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-offset* _value_:: Skip _value_ bytes at the beginning of the key file. 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. + 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. + See /proc/crypto for more information. Note that the 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. + This option is required when the parameter --volume-key-file is used to provide current volume key. Also, it is used when a 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). 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. 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. Useful when specifying the size of the current volume key when no keyslot is active. + *LUKS1*: See --new-key-size. endif::[] 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 the parameter --new-key-slot, this option allows you to specify which keyslot is selected for unlocking the volume key. + This option is ignored if the 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. + To maintain backward compatibility, without --new-key-slot parameter, this option allows you to specify which keyslot 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 keyslot is selected for the new key. endif::[] ifdef::ACTION_OPEN[] This option selects a specific keyslot to compare the passphrase against. If the given passphrase would only matches a different keyslot, the operation fails. endif::[] + ifdef::ACTION_REENCRYPT[] For reencryption mode, it selects a specific keyslot (and passphrase) that can be used to unlock the new volume key. If used, all other keyslots get removed after the reencryption operation is finished. + endif::[] The maximum number of keyslots depends on the LUKS version. LUKS1 can have up to 8 keyslots. LUKS2 can have up to 32 keyslots based on keyslot area size and key size, but a valid keyslot 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. endif::[] ifdef::ACTION_LUKSFORMAT,ACTION_LUKSADDKEY,ACTION_LUKSCHANGEKEY,ACTION_LUKSCONVERTKEY,ACTION_REENCRYPT[] *--keyslot-key-size* __:: This option can be used to set a specific key size for the LUKS2 keyslot area. endif::[] ifdef::ACTION_LUKSFORMAT,ACTION_CONFIG,ACTION_REENCRYPT[] *--label* _