{
    "content": [
        {
            "type": "text",
            "text": "# cryptsetup (man)\n\n## NAME\n\ncryptsetup - manage plain dm-crypt and LUKS encrypted volumes\n\n## DESCRIPTION\n\ncryptsetup  is  used to conveniently setup dm-crypt managed device-mapper mappings. These in‐\nclude plain dm-crypt volumes and LUKS volumes. The difference is that LUKS  uses  a  metadata\nheader  and  can hence offer more features than plain dm-crypt. On the other hand, the header\nis visible and vulnerable to damage.\n\n## TLDR\n\n> Manage plain `dm-crypt` and LUKS (Linux Unified Key Setup) encrypted volumes.\n\n- Initialize a LUKS volume with a passphrase (overwrites all data on the partition):\n  `cryptsetup luksFormat {{/dev/sdXY}}`\n- Open a LUKS volume and create a decrypted mapping at `/dev/mapper/mapping_name`:\n  `cryptsetup open {{/dev/sdXY}} {{mapping_name}}`\n- Display information about a mapping:\n  `cryptsetup status {{mapping_name}}`\n- Remove an existing mapping:\n  `cryptsetup close {{mapping_name}}`\n- Change a LUKS volume's passphrase:\n  `cryptsetup luksChangeKey {{/dev/sdXY}}`\n- Display LUKS header information and key slot metadata of an encrypted device:\n  `cryptsetup luksDump {{/dev/sdXY}}`\n\n*Source: tldr-pages*\n\n## Sections\n\n- **NAME**\n- **SYNOPSIS** (1 subsections)\n- **DESCRIPTION** (1 subsections)\n- **WARNINGS**\n- **BASIC ACTIONS**\n- **PLAIN MODE**\n- **LUKS EXTENSION** (3 subsections)\n- **MISCELLANEOUS**\n- **OPTIONS** (70 subsections)\n- **EXAMPLE** (1 subsections)\n- **RETURN CODES**\n- **NOTES ON PASSPHRASE PROCESSING FOR PLAIN MODE**\n- **NOTES ON PASSPHRASE PROCESSING FOR LUKS**\n- **INCOHERENT BEHAVIOR FOR INVALID PASSPHRASES/KEYS** (1 subsections)\n- **NOTES ON PASSPHRASES**\n- **NOTES ON RANDOM NUMBER GENERATORS** (1 subsections)\n- **NOTES ON LOOPBACK DEVICE USE** (1 subsections)\n- **DEPRECATED ACTIONS**\n- **REPORTING BUGS**\n- **AUTHORS**\n- **COPYRIGHT**\n- **SEE ALSO** (1 subsections)\n\nUse structuredContent.sections for detailed options, examples, and full documentation.\n"
        }
    ],
    "structuredContent": {
        "command": "cryptsetup",
        "section": "",
        "mode": "man",
        "summary": "cryptsetup - manage plain dm-crypt and LUKS encrypted volumes",
        "synopsis": "",
        "tldr_summary": "Manage plain `dm-crypt` and LUKS (Linux Unified Key Setup) encrypted volumes.",
        "tldr_examples": [
            {
                "description": "Initialize a LUKS volume with a passphrase (overwrites all data on the partition)",
                "command": "cryptsetup luksFormat {{/dev/sdXY}}"
            },
            {
                "description": "Open a LUKS volume and create a decrypted mapping at `/dev/mapper/mapping_name`",
                "command": "cryptsetup open {{/dev/sdXY}} {{mapping_name}}"
            },
            {
                "description": "Display information about a mapping",
                "command": "cryptsetup status {{mapping_name}}"
            },
            {
                "description": "Remove an existing mapping",
                "command": "cryptsetup close {{mapping_name}}"
            },
            {
                "description": "Change a LUKS volume's passphrase",
                "command": "cryptsetup luksChangeKey {{/dev/sdXY}}"
            },
            {
                "description": "Display LUKS header information and key slot metadata of an encrypted device",
                "command": "cryptsetup luksDump {{/dev/sdXY}}"
            }
        ],
        "tldr_source": "official",
        "flags": [
            {
                "flag": "-v",
                "long": "--verbose",
                "arg": null,
                "description": "Print more information on command execution."
            },
            {
                "flag": "",
                "long": "--debug-json",
                "arg": null,
                "description": "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."
            },
            {
                "flag": "",
                "long": "--type",
                "arg": "<device-type>",
                "description": "Specifies required device type, for more info read BASIC ACTIONS section. --hash, -h <hash-spec> Specifies the passphrase hash for open (for plain and loopaes device types). Specifies the hash used in the LUKS key setup scheme and volume key digest for luks‐ Format. The specified hash is used as hash-parameter for PBKDF2 and for the AF split‐ ter. The specified hash name is passed to the compiled-in crypto backend. Different back‐ ends may support different hashes. For luksFormat, the hash algorithm must provide at least 160 bits of output, which excludes, e.g., MD5. Do not use a non-crypto hash like \"crc32\" as this breaks security. Values compatible with old version of cryptsetup are \"ripemd160\" for open --type plain and \"sha1\" for luksFormat. Use cryptsetup --help to show the defaults. --cipher, -c <cipher-spec> Set the cipher specification string. cryptsetup --help shows the compiled-in defaults. The current default in the distrib‐ uted sources is \"aes-cbc-essiv:sha256\" for plain dm-crypt and \"aes-xts-plain64\" for LUKS. If a hash is part of the cipher specification, then it is used as part of the IV gen‐ eration. 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. XTS mode requires kernel 2.6.24 or later and plain64 requires kernel 2.6.33 or later. More information can be found in the FAQ."
            },
            {
                "flag": "-y",
                "long": "--verify-passphrase",
                "arg": null,
                "description": "When interactively asking for a passphrase, ask for it twice and complain if both in‐ puts do not match. Advised when creating a regular mapping for the first time, or when running luksFormat. Ignored on input from file or stdin. --key-file, -d name Read the passphrase from file. If the name given is \"-\", then the passphrase will be read from stdin. In this case, reading will not stop at newline characters. With LUKS, passphrases supplied via --key-file are always the existing passphrases re‐ quested by a command, except in the case of luksFormat where --key-file is equivalent to the positional key file argument. If you want to set a new passphrase via key file, you have to use a positional argu‐ ment to luksAddKey. See section NOTES ON PASSPHRASE PROCESSING for more information. --keyfile-offset value Skip value bytes at the beginning of the key file. Works with all commands that ac‐ cept key files. --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. Works with all commands that ac‐ cept key files. --new-keyfile-offset value Skip value bytes at the start when adding a new passphrase from key file with luksAdd‐ Key. --new-keyfile-size value Read a maximum of value bytes when adding a new passphrase from key file with luksAdd‐ Key. The default is to read the whole file up to the compiled-in maximum length that can be queried with --help. Supplying more than the compiled in maximum aborts the operation. When --new-keyfile-offset is also given, reading starts after the offset."
            },
            {
                "flag": "",
                "long": "--master-key-file",
                "arg": null,
                "description": "Use a master key stored in a file. For luksFormat this allows creating a LUKS header with this specific master key. If the master key was taken from an existing LUKS header and all other parameters are the same, then the new header decrypts the data encrypted with the header the master key was taken from. Action luksDump together with --dump-master-key option: The volume (master) key is stored in a file instead of being printed out to standard output. WARNING: If you create your own master key, you need to make sure to do it right. Oth‐ erwise, you can end up with a low-entropy or otherwise partially predictable master key which will compromise security. For luksAddKey this allows adding a new passphrase without having to know an existing one. For open this allows one to open the LUKS device without giving a passphrase."
            },
            {
                "flag": "",
                "long": "--dump-json-metadata",
                "arg": null,
                "description": "For luksDump (LUKS2 only) this option prints content of LUKS2 header JSON metadata area."
            },
            {
                "flag": "",
                "long": "--dump-master-key",
                "arg": null,
                "description": "For luksDump this option includes the master key in the displayed information. Use with care, as the master key can be used to bypass the passphrases, see also option --master-key-file."
            },
            {
                "flag": "",
                "long": "--json-file",
                "arg": null,
                "description": "Read token json from a file or write token to it. See token action for more informa‐ tion. --json-file=- reads json from standard input or writes it to standard output re‐ spectively."
            },
            {
                "flag": "",
                "long": "--use-random",
                "arg": null,
                "description": ""
            },
            {
                "flag": "",
                "long": "--use-urandom",
                "arg": null,
                "description": "For luksFormat these options define which kernel random number generator will be used to create the master key (which is a long-term key). See NOTES ON RANDOM NUMBER GENERATORS for more information. Use cryptsetup --help to show the compiled-in default random number generator. WARNING: In a low-entropy situation (e.g. in an embedded system), both selections are problematic. Using /dev/urandom can lead to weak keys. Using /dev/random can block a long time, potentially forever, if not enough entropy can be harvested by the kernel."
            },
            {
                "flag": "-S",
                "long": "--key-slot",
                "arg": "<0-N>",
                "description": "For LUKS operations that add key material, this options allows you to specify which key slot is selected for the new key. This option can be used for luksFormat, and luksAddKey. In addition, for 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. Maximum number of key slots depends on 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."
            },
            {
                "flag": "-s",
                "long": "--key-size",
                "arg": "<bits>",
                "description": "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. 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."
            },
            {
                "flag": "-b",
                "long": "--size",
                "arg": null,
                "description": "Set the size of the device in sectors of 512 bytes. This option is only relevant for the open and resize actions."
            },
            {
                "flag": "-o",
                "long": "--offset",
                "arg": null,
                "description": "Start offset in the backend device in 512-byte sectors. This option is only relevant for the open action with plain or loopaes device types or for LUKS devices in luksFor‐ mat. For LUKS, the --offset option sets the data offset (payload) of data device and must be be aligned to 4096-byte sectors (must be multiple of 8). This option cannot be combined with --align-payload option."
            },
            {
                "flag": "-p",
                "long": "--skip",
                "arg": null,
                "description": "Start offset used in IV calculation in 512-byte sectors (how many sectors of the en‐ crypted data to skip at the beginning). This option is only relevant for the open ac‐ tion with plain or loopaes device types. Hence, if --offset n, and --skip s, sector n (the first sector of the encrypted de‐ vice) will get a sector number of s for the IV calculation. --device-size size[units] Instead of real device size, use specified value. With reencrypt action it means that only specified area (from the start of the device to the specified size) will be reencrypted. With resize action it sets new size of the device. 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). WARNING: This is destructive operation when used with reencrypt command."
            },
            {
                "flag": "-r",
                "long": "--readonly",
                "arg": null,
                "description": "set up a read-only mapping."
            },
            {
                "flag": "",
                "long": "--shared",
                "arg": null,
                "description": "Creates an additional mapping for one common ciphertext device. Arbitrary mappings are supported. This option is only relevant for the open --type plain action. Use --off‐ set, --size and --skip to specify the mapped area."
            },
            {
                "flag": "",
                "long": "--pbkdf",
                "arg": null,
                "description": "Set Password-Based Key Derivation Function (PBKDF) algorithm for LUKS keyslot. The PBKDF can be: pbkdf2 (for PBKDF2 according to RFC2898), argon2i for Argon2i or ar‐ gon2id for Argon2id (see https://www.cryptolux.org/index.php/Argon2 for more info). For LUKS1, only PBKDF2 is accepted (no need to use this option). The default PBKDF2 for LUKS2 is set during compilation time and is available in cryptsetup --help output. A PBKDF is used for increasing dictionary and brute-force attack cost for keyslot passwords. The parameters can be time, memory and parallel cost. For PBKDF2, only time cost (number of iterations) applies. For Argon2i/id, there is also memory cost (memory required during the process of key derivation) and parallel cost (number of threads that run in parallel during the key derivation. Note that increasing memory cost also increases time, so the final parameter values are measured by a benchmark. The benchmark tries to find iteration time (--iter-time) with required memory cost --pbkdf-memory. If it is not possible, the memory cost is decreased as well. The parallel cost --pbkdf-parallel is constant and is checked against available CPU cores. You can see all PBKDF parameters for particular LUKS2 keyslot with luksDump command. NOTE: If you do not want to use benchmark and want to specify all parameters directly, use --pbkdf-force-iterations with --pbkdf-memory and --pbkdf-parallel. This will override the values without benchmarking. Note it can cause extremely long unlocking time. Use only in specific cases, for example, if you know that the formatted device will be used on some small embedded system. MINIMAL AND MAXIMAL PBKDF COSTS: For PBKDF2, the minimum iteration count is 1000 and maximum is 4294967295 (maximum for 32bit unsigned integer). Memory and parallel costs are unused for PBKDF2. For Argon2i and Argon2id, minimum iteration count (CPU cost) is 4 and maximum is 4294967295 (maximum for 32bit unsigned integer). Minimum memory cost is 32 KiB and maximum is 4 GiB. (Limited by addresable memory on some CPU plat‐ forms.) If the memory cost parameter is benchmarked (not specified by a parameter) it is always in range from 64 MiB to 1 GiB. The parallel cost minimum is 1 and maximum 4 (if enough CPUs cores are available, otherwise it is decreased)."
            },
            {
                "flag": "-i",
                "long": "--iter-time",
                "arg": null,
                "description": "The number of milliseconds to spend with PBKDF passphrase processing. This option is only relevant for LUKS operations that set or change passphrases, such as luksFormat or luksAddKey. Specifying 0 as parameter selects the compiled-in default."
            },
            {
                "flag": "",
                "long": "--pbkdf-memory",
                "arg": "<number>",
                "description": "Set the memory cost for PBKDF (for Argon2i/id the number represents kilobytes). Note that it is maximal value, PBKDF benchmark or available physical memory can decrease it. This option is not available for PBKDF2."
            },
            {
                "flag": "",
                "long": "--pbkdf-parallel",
                "arg": "<number>",
                "description": "Set the parallel cost for PBKDF (number of threads, up to 4). Note that it is maximal value, it is decreased automatically if CPU online count is lower. This option is not available for PBKDF2."
            },
            {
                "flag": "",
                "long": "--pbkdf-force-iterations",
                "arg": "<num>",
                "description": "Avoid PBKDF benchmark and set time cost (iterations) directly. It can be used for LUKS/LUKS2 device only. See --pbkdf option for more info."
            },
            {
                "flag": "-q",
                "long": "--batch-mode",
                "arg": null,
                "description": "Suppresses all confirmation questions. Use with care! If the -y option is not specified, this option also switches off the passphrase veri‐ fication for luksFormat."
            },
            {
                "flag": "",
                "long": "--progress-frequency",
                "arg": "<seconds>",
                "description": "Print separate line every <seconds> with wipe progress."
            },
            {
                "flag": "-t",
                "long": "--timeout",
                "arg": null,
                "description": "The number of seconds to wait before timeout on passphrase input via terminal. It is relevant every time a passphrase is asked, for example for open, luksFormat or luksAd‐ dKey. It has no effect if used in conjunction with --key-file. This option is useful when the system should not stall if the user does not input a passphrase, e.g. during boot. The default is a value of 0 seconds, which means to wait forever."
            },
            {
                "flag": "-T",
                "long": "--tries",
                "arg": null,
                "description": "How often the input of the passphrase shall be retried. This option is relevant every time a passphrase is asked, for example for open, luksFormat or luksAddKey. The de‐ fault is 3 tries."
            },
            {
                "flag": "",
                "long": "--align-payload",
                "arg": null,
                "description": "Align payload at a boundary of value 512-byte sectors. This option is relevant for luksFormat. 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 calcu‐ lated value is a multiple of the default) data is by default aligned to a 1MiB bound‐ ary (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. 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. --uuid=UUID Use the provided UUID for the luksFormat command instead of generating a new one. Changes the existing UUID when used with the luksUUID command. The UUID must be provided in the standard UUID format, e.g. 12345678-1234-1234-1234-123456789abc."
            },
            {
                "flag": "",
                "long": "--allow-discards",
                "arg": null,
                "description": "Allow the use of discard (TRIM) requests for the device. This option is only relevant for open action. 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 filesys‐ tem-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 ig‐ nored. --perf-samecpucrypt 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 avail‐ able CPUs. This option is only relevant for open action. NOTE: This option is available only for low-level dm-crypt performance tuning, use only if you need a change to default dm-crypt behaviour. Needs kernel 4.0 or later. --perf-submitfromcryptcpus Disable offloading writes to a separate thread after encryption. There are some situ‐ ations where offloading write bios from the encryption threads to a single thread de‐ grades performance significantly. The default is to offload write bios to the same thread. This option is only relevant for open action. NOTE: This option is available only for low-level dm-crypt performance tuning, use only if you need a change to default dm-crypt behaviour. Needs kernel 4.0 or later. --perf-noreadworkqueue, --perf-nowriteworkqueue Bypass dm-crypt internal workqueue and process read or write requests synchronously. This option is only relevant for open action. NOTE: These options are available only for low-level dm-crypt performance tuning, use only if you need a change to default dm-crypt behaviour. Needs kernel 5.9 or later."
            },
            {
                "flag": "",
                "long": "--test-passphrase",
                "arg": null,
                "description": "Do not activate the device, just verify passphrase. This option is only relevant for open action (the device mapping name is not mandatory if this option is used). --header <device or file storing the LUKS header> 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. This option is only relevant for LUKS devices and can be used with the luksFormat, open, luksSuspend, luksResume, status and resize commands. For luksFormat with a file name as the argument to --header, the file will be automat‐ ically created if it does not exist. See the cryptsetup FAQ for header size calcula‐ tion. For other commands that change the LUKS header (e.g. luksAddKey), specify the device or file with the LUKS header directly as the LUKS device. If used with luksFormat, the --align-payload option is taken as absolute sector align‐ ment on ciphertext device and can be zero. 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 de‐ vice for open with the --header option. Use with care."
            },
            {
                "flag": "",
                "long": "--header-backup-file",
                "arg": "<file>",
                "description": "Specify file with header backup for luksHeaderBackup or luksHeaderRestore actions."
            },
            {
                "flag": "",
                "long": "--force-password",
                "arg": null,
                "description": "Do not use password quality checking for new LUKS passwords. This option applies only to luksFormat, luksAddKey and luksChangeKey and 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)."
            },
            {
                "flag": "",
                "long": "--deferred",
                "arg": null,
                "description": "Defers device removal in close command until the last user closes it."
            },
            {
                "flag": "",
                "long": "--cancel-deferred",
                "arg": null,
                "description": "Removes a previously configured deferred device removal in close command."
            },
            {
                "flag": "",
                "long": "--disable-external-tokens",
                "arg": null,
                "description": "Disable loading of plugins for external LUKS2 tokens."
            },
            {
                "flag": "",
                "long": "--disable-locks",
                "arg": null,
                "description": "Disable lock protection for metadata on disk. This option is valid only for LUKS2 and ignored for other formats. 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)."
            },
            {
                "flag": "",
                "long": "--disable-keyring",
                "arg": null,
                "description": "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 format."
            },
            {
                "flag": "",
                "long": "--key-description",
                "arg": "<text>",
                "description": "Set key description in keyring for use with token command."
            },
            {
                "flag": "",
                "long": "--priority",
                "arg": "<normal|prefer|ignore>",
                "description": "Set a priority for LUKS2 keyslot. The prefer priority marked slots are tried before normal priority. The ignored priority means, that slot is never used, if not explic‐ itly requested by --key-slot option."
            },
            {
                "flag": "",
                "long": "--token-id",
                "arg": null,
                "description": "Specify what token to use in actions token, open or resize. If omitted, all available tokens will be checked before proceeding further with passphrase prompt."
            },
            {
                "flag": "",
                "long": "--token-only",
                "arg": null,
                "description": "Do not proceed further with action (any of token, open or resize) if token activation failed. Without the option, action asks for passphrase to proceed further."
            },
            {
                "flag": "",
                "long": "--token-type",
                "arg": null,
                "description": "Restrict tokens eligible for operation to specific token type (name). Mostly useful when no --token-id is specified."
            },
            {
                "flag": "",
                "long": "--sector-size",
                "arg": "<bytes>",
                "description": "Set sector size for use with disk encryption. It must be power of two and in range 512 - 4096 bytes. This option is available only in the LUKS2 or plain modes. The default for plain mode is 512 bytes. For LUKS2 devices it's established during luksFormat operation based on parameters provided by underlying data device. For na‐ tive 4K block devices it's 4096 bytes. For 4K/512e (4K physical sector size with 512 bytes emulation) it's 4096 bytes. For drives reporting only 512 bytes block size it remains 512 bytes. If data device is regular file put in filesystem it's 4096 bytes. Note that if sector size is higher than underlying device hardware sector and there is not integrity protection that uses data journal, using this option can increase risk on incomplete sector writes during a power fail. If used together with --integrity option and dm-integrity journal, the atomicity of writes is guaranteed in all cases (but it cost write performance - data has to be written twice). Increasing sector size from 512 bytes to 4096 bytes can provide better performance on most of the modern storage devices and also with some hw encryption accelerators."
            },
            {
                "flag": "",
                "long": "--iv-large-sectors",
                "arg": null,
                "description": "Count Initialization Vector (IV) in larger sector size (if set) instead of 512 bytes sectors. This option can be used only for open command and plain encryption 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 op‐ tion."
            },
            {
                "flag": "",
                "long": "--persistent",
                "arg": null,
                "description": "If used with LUKS2 devices and activation commands like open or refresh, the specified activation flags are persistently written into metadata and used next time automati‐ cally even for normal activation. (No need to use cryptab or other system configura‐ tion files.) If you need to remove a persistent flag, use --persistent without the flag you want to remove (e.g. to disable persistently stored discard flag, use --persistent without --allow-discards). Only --allow-discards, --perf-samecpucrypt, --perf-submitfromcryptcpus, --perf-noreadworkqueue, --perf-nowriteworkqueue and --integrity-no-journal can be stored persistently."
            },
            {
                "flag": "",
                "long": "--refresh",
                "arg": null,
                "description": "Refreshes an active device with new set of parameters. See action refresh description for more details."
            },
            {
                "flag": "",
                "long": "--label",
                "arg": "<LABEL>",
                "description": "--subsystem <SUBSYSTEM> Set label and subsystem description for LUKS2 device, can be used in config and format actions. The label and subsystem are optional fields and can be later used in udev scripts for triggering user actions once device marked by these labels is detected."
            },
            {
                "flag": "",
                "long": "--integrity",
                "arg": null,
                "description": "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 (CON‐ FIGCRYPTOUSERAPIAEAD .config option). For more info, see AUTHENTICATED DISK ENCRYPTION section."
            },
            {
                "flag": "",
                "long": "--luks2-metadata-size",
                "arg": "<size>",
                "description": "This option can be used to enlarge the LUKS2 metadata (JSON) area. The size includes 4096 bytes for binary metadata (usable JSON area is smaller of the binary area). Ac‐ cording to LUKS2 specification, only these values are valid: 16, 32, 64, 128, 256, 512, 1024, 2048 and 4096 kB The <size> can be specified with unit suffix (for example 128k)."
            },
            {
                "flag": "",
                "long": "--luks2-keyslots-size",
                "arg": "<size>",
                "description": "This option can be used to set specific size of the LUKS2 binary keyslot area (key ma‐ terial is encrypted there). The value must be aligned to multiple of 4096 bytes with maximum size 128MB. The <size> can be specified with unit suffix (for example 128k)."
            },
            {
                "flag": "",
                "long": "--keyslot-cipher",
                "arg": "<cipher-spec>",
                "description": "This option can be used to set specific cipher encryption for the LUKS2 keyslot area."
            },
            {
                "flag": "",
                "long": "--keyslot-key-size",
                "arg": "<bits>",
                "description": "This option can be used to set specific key size for the LUKS2 keyslot area."
            },
            {
                "flag": "",
                "long": "--integrity-no-journal",
                "arg": null,
                "description": "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 stor‐ age layer."
            },
            {
                "flag": "",
                "long": "--integrity-no-wipe",
                "arg": null,
                "description": "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."
            },
            {
                "flag": "",
                "long": "--unbound",
                "arg": null,
                "description": "Creates new or dumps existing LUKS2 unbound keyslot. See luksAddKey or luksDump ac‐ tions for more details."
            },
            {
                "flag": "",
                "long": "--tcrypt-hidden",
                "arg": null,
                "description": "--tcrypt-system --tcrypt-backup Specify which TrueCrypt on-disk header will be used to open the device. See TCRYPT section for more info."
            },
            {
                "flag": "",
                "long": "--veracrypt",
                "arg": null,
                "description": "This option is ignored as VeraCrypt compatible mode is supported by default."
            },
            {
                "flag": "",
                "long": "--disable-veracrypt",
                "arg": null,
                "description": "This option can be used to disable VeraCrypt compatible mode (only TrueCrypt devices are recognized). Only for TCRYPT extension. See TCRYPT section for more info."
            },
            {
                "flag": "",
                "long": "--veracrypt-pim",
                "arg": null,
                "description": "--veracrypt-query-pim Use a custom Personal Iteration Multiplier (PIM) for VeraCrypt device. See TCRYPT section for more info."
            },
            {
                "flag": "",
                "long": "--serialize-memory-hard-pbkdf",
                "arg": null,
                "description": "Use a global lock to serialize unlocking of keyslots using memory-hard PBKDF. NOTE: This is (ugly) workaround for a specific situation when multiple devices are ac‐ tivated in parallel and system instead of reporting out of memory starts uncondition‐ ally stop processes using out-of-memory killer. DO NOT USE this switch until you are implementing boot environment with parallel de‐ vices activation!"
            },
            {
                "flag": "",
                "long": "--encrypt",
                "arg": null,
                "description": "Initialize (and run) device encryption (reencrypt action parameter)"
            },
            {
                "flag": "",
                "long": "--decrypt",
                "arg": null,
                "description": "Initialize (and run) device decryption (reencrypt action parameter)"
            },
            {
                "flag": "",
                "long": "--init-only",
                "arg": null,
                "description": "Initialize reencryption (any variant) operation in LUKS2 metadata only and exit. If any reencrypt operation is already initialized in metadata, the command with --init-only parameter fails."
            },
            {
                "flag": "",
                "long": "--resume-only",
                "arg": null,
                "description": "Resume reencryption (any variant) operation already described in LUKS2 metadata. If no reencrypt operation is initialized, the command with --resume-only parameter fails. Useful for resuming reencrypt operation without accidentally triggering new reencryp‐ tion operation."
            },
            {
                "flag": "",
                "long": "--resilience",
                "arg": "<mode>",
                "description": "Reencryption resilience mode can be one of checksum, journal or none. checksum: default mode, where individual checksums of ciphertext hotzone sectors are stored, so the recovery process can detect which sectors were already reencrypted. It requires that the device sector write is atomic. journal: the hotzone is journaled in the binary area (so the data are written twice). none: performance mode. There is no protection and the only way it's safe to interrupt the reencryption is similar to old offline reencryption utility. (ctrl+c). The option is ignored if reencryption with datashift mode is in progress."
            },
            {
                "flag": "",
                "long": "--resilience-hash",
                "arg": "<hash>",
                "description": "The hash algorithm used with \"--resilience checksum\" only. The default hash is sha256. With other resilience modes, the hash parameter is ignored."
            },
            {
                "flag": "",
                "long": "--hotzone-size",
                "arg": "<size>",
                "description": "This option can be used to set an upper limit on the size of reencryption area (hot‐ zone). The <size> can be specified with unit suffix (for example 50M). Note that ac‐ tual hotzone size may be less than specified <size> due to other limitations (free space in keyslots area or available memory)."
            },
            {
                "flag": "",
                "long": "--reduce-device-size",
                "arg": "<size>",
                "description": "Initialize LUKS2 reencryption with data device size reduction (currently only --en‐ crypt variant is supported). Last <size> sectors of <device> will be used to properly initialize device reencryp‐ tion. That means any data at last <size> sectors will be lost. It could be useful if you added some space to underlying partition or logical volume (so last <size> sectors contains no data). Recommended minimal size is twice the default LUKS2 header size (--reduce-device-size 32M) for --encrypt use case. Be sure to have enough (at least --reduce-device-size value of free space at the end of <device>). WARNING: This is a destructive operation and cannot be reverted. Use with extreme care - accidentally overwritten filesystems are usually unrecoverable."
            },
            {
                "flag": "",
                "long": "--version",
                "arg": null,
                "description": "Show the program version."
            },
            {
                "flag": "",
                "long": "--usage",
                "arg": null,
                "description": "Show short option help."
            },
            {
                "flag": "-?",
                "long": "--help",
                "arg": null,
                "description": "Show help text and default parameters."
            }
        ],
        "examples": [
            "Example 1: Create LUKS 2 container on block device /dev/sdX.",
            "sudo cryptsetup --type luks2 luksFormat /dev/sdX",
            "Example 2: Add an additional passphrase to key slot 5.",
            "sudo cryptsetup luksAddKey --key-slot 5 /dev/sdX",
            "Example 3: Create LUKS header backup and save it to file.",
            "sudo  cryptsetup luksHeaderBackup /dev/sdX --header-backup-file /var/tmp/NameOfBackup‐",
            "File",
            "Example 4: Open LUKS container on /dev/sdX and map it to sdXcrypt.",
            "sudo cryptsetup open /dev/sdX sdXcrypt",
            "Your cannot use your luks container afterwards anymore unless you have a backup to re‐",
            "store.",
            "Example 5: Erase all key slots on /dev/sdX.",
            "sudo cryptsetup erase /dev/sdX",
            "Example 6: Restore LUKS header from backup file.",
            "sudo cryptsetup luksHeaderRestore /dev/sdX --header-backup-file /var/tmp/NameOfBackup‐",
            "File"
        ],
        "see_also": [],
        "section_outline": [
            {
                "name": "NAME",
                "lines": 2,
                "subsections": []
            },
            {
                "name": "SYNOPSIS",
                "lines": 1,
                "subsections": [
                    {
                        "name": "cryptsetup <options> <action> <action args>",
                        "lines": 1
                    }
                ]
            },
            {
                "name": "DESCRIPTION",
                "lines": 9,
                "subsections": [
                    {
                        "name": "PLAIN DM-CRYPT OR LUKS?",
                        "lines": 4
                    }
                ]
            },
            {
                "name": "WARNINGS",
                "lines": 32,
                "subsections": []
            },
            {
                "name": "BASIC ACTIONS",
                "lines": 127,
                "subsections": []
            },
            {
                "name": "PLAIN MODE",
                "lines": 20,
                "subsections": []
            },
            {
                "name": "LUKS EXTENSION",
                "lines": 315,
                "subsections": [
                    {
                        "name": "loop-AES EXTENSION",
                        "lines": 35
                    },
                    {
                        "name": "TCRYPT (TrueCrypt-compatible and VeraCrypt) EXTENSION",
                        "lines": 102
                    },
                    {
                        "name": "BITLK (Windows BitLocker-compatible) EXTENSION (EXPERIMENTAL)",
                        "lines": 47
                    }
                ]
            },
            {
                "name": "MISCELLANEOUS",
                "lines": 38,
                "subsections": []
            },
            {
                "name": "OPTIONS",
                "lines": 1,
                "subsections": [
                    {
                        "name": "--verbose, -v",
                        "lines": 2,
                        "flag": "-v",
                        "long": "--verbose"
                    },
                    {
                        "name": "--debug or --debug-json",
                        "lines": 3,
                        "long": "--debug-json"
                    },
                    {
                        "name": "--type <device-type>",
                        "lines": 36,
                        "long": "--type",
                        "arg": "<device-type>"
                    },
                    {
                        "name": "--verify-passphrase, -y",
                        "lines": 42,
                        "flag": "-y",
                        "long": "--verify-passphrase"
                    },
                    {
                        "name": "--master-key-file",
                        "lines": 19,
                        "long": "--master-key-file"
                    },
                    {
                        "name": "--dump-json-metadata",
                        "lines": 3,
                        "long": "--dump-json-metadata"
                    },
                    {
                        "name": "--dump-master-key",
                        "lines": 4,
                        "long": "--dump-master-key"
                    },
                    {
                        "name": "--json-file",
                        "lines": 4,
                        "long": "--json-file"
                    },
                    {
                        "name": "--use-random",
                        "lines": 1,
                        "long": "--use-random"
                    },
                    {
                        "name": "--use-urandom",
                        "lines": 10,
                        "long": "--use-urandom"
                    },
                    {
                        "name": "--key-slot, -S <0-N>",
                        "lines": 11,
                        "flag": "-S",
                        "long": "--key-slot",
                        "arg": "<0-N>"
                    },
                    {
                        "name": "--key-size, -s <bits>",
                        "lines": 10,
                        "flag": "-s",
                        "long": "--key-size",
                        "arg": "<bits>"
                    },
                    {
                        "name": "--size, -b <number of 512 byte sectors>",
                        "lines": 3,
                        "flag": "-b",
                        "long": "--size"
                    },
                    {
                        "name": "--offset, -o <number of 512 byte sectors>",
                        "lines": 8,
                        "flag": "-o",
                        "long": "--offset"
                    },
                    {
                        "name": "--skip, -p <number of 512 byte sectors>",
                        "lines": 22,
                        "flag": "-p",
                        "long": "--skip"
                    },
                    {
                        "name": "--readonly, -r",
                        "lines": 2,
                        "flag": "-r",
                        "long": "--readonly"
                    },
                    {
                        "name": "--shared",
                        "lines": 4,
                        "long": "--shared"
                    },
                    {
                        "name": "--pbkdf <PBKDF spec>",
                        "lines": 37,
                        "long": "--pbkdf"
                    },
                    {
                        "name": "--iter-time, -i <number of milliseconds>",
                        "lines": 4,
                        "flag": "-i",
                        "long": "--iter-time"
                    },
                    {
                        "name": "--pbkdf-memory <number>",
                        "lines": 4,
                        "long": "--pbkdf-memory",
                        "arg": "<number>"
                    },
                    {
                        "name": "--pbkdf-parallel <number>",
                        "lines": 4,
                        "long": "--pbkdf-parallel",
                        "arg": "<number>"
                    },
                    {
                        "name": "--pbkdf-force-iterations <num>",
                        "lines": 3,
                        "long": "--pbkdf-force-iterations",
                        "arg": "<num>"
                    },
                    {
                        "name": "--batch-mode, -q",
                        "lines": 5,
                        "flag": "-q",
                        "long": "--batch-mode"
                    },
                    {
                        "name": "--progress-frequency <seconds>",
                        "lines": 2,
                        "long": "--progress-frequency",
                        "arg": "<seconds>"
                    },
                    {
                        "name": "--timeout, -t <number of seconds>",
                        "lines": 7,
                        "flag": "-t",
                        "long": "--timeout"
                    },
                    {
                        "name": "--tries, -T",
                        "lines": 4,
                        "flag": "-T",
                        "long": "--tries"
                    },
                    {
                        "name": "--align-payload <number of 512 byte sectors>",
                        "lines": 23,
                        "long": "--align-payload"
                    },
                    {
                        "name": "--allow-discards",
                        "lines": 36,
                        "long": "--allow-discards"
                    },
                    {
                        "name": "--test-passphrase",
                        "lines": 24,
                        "long": "--test-passphrase"
                    },
                    {
                        "name": "--header-backup-file <file>",
                        "lines": 2,
                        "long": "--header-backup-file",
                        "arg": "<file>"
                    },
                    {
                        "name": "--force-password",
                        "lines": 8,
                        "long": "--force-password"
                    },
                    {
                        "name": "--deferred",
                        "lines": 2,
                        "long": "--deferred"
                    },
                    {
                        "name": "--cancel-deferred",
                        "lines": 2,
                        "long": "--cancel-deferred"
                    },
                    {
                        "name": "--disable-external-tokens",
                        "lines": 2,
                        "long": "--disable-external-tokens"
                    },
                    {
                        "name": "--disable-locks",
                        "lines": 6,
                        "long": "--disable-locks"
                    },
                    {
                        "name": "--disable-keyring",
                        "lines": 3,
                        "long": "--disable-keyring"
                    },
                    {
                        "name": "--key-description <text>",
                        "lines": 2,
                        "long": "--key-description",
                        "arg": "<text>"
                    },
                    {
                        "name": "--priority <normal|prefer|ignore>",
                        "lines": 4,
                        "long": "--priority",
                        "arg": "<normal|prefer|ignore>"
                    },
                    {
                        "name": "--token-id",
                        "lines": 3,
                        "long": "--token-id"
                    },
                    {
                        "name": "--token-only",
                        "lines": 3,
                        "long": "--token-only"
                    },
                    {
                        "name": "--token-type",
                        "lines": 3,
                        "long": "--token-type"
                    },
                    {
                        "name": "--sector-size <bytes>",
                        "lines": 20,
                        "long": "--sector-size",
                        "arg": "<bytes>"
                    },
                    {
                        "name": "--iv-large-sectors",
                        "lines": 7,
                        "long": "--iv-large-sectors"
                    },
                    {
                        "name": "--persistent",
                        "lines": 13,
                        "long": "--persistent"
                    },
                    {
                        "name": "--refresh",
                        "lines": 3,
                        "long": "--refresh"
                    },
                    {
                        "name": "--label <LABEL>",
                        "lines": 5,
                        "long": "--label",
                        "arg": "<LABEL>"
                    },
                    {
                        "name": "--integrity <integrity algorithm>",
                        "lines": 9,
                        "long": "--integrity"
                    },
                    {
                        "name": "--luks2-metadata-size <size>",
                        "lines": 6,
                        "long": "--luks2-metadata-size",
                        "arg": "<size>"
                    },
                    {
                        "name": "--luks2-keyslots-size <size>",
                        "lines": 4,
                        "long": "--luks2-keyslots-size",
                        "arg": "<size>"
                    },
                    {
                        "name": "--keyslot-cipher <cipher-spec>",
                        "lines": 2,
                        "long": "--keyslot-cipher",
                        "arg": "<cipher-spec>"
                    },
                    {
                        "name": "--keyslot-key-size <bits>",
                        "lines": 2,
                        "long": "--keyslot-key-size",
                        "arg": "<bits>"
                    },
                    {
                        "name": "--integrity-no-journal",
                        "lines": 5,
                        "long": "--integrity-no-journal"
                    },
                    {
                        "name": "--integrity-no-wipe",
                        "lines": 6,
                        "long": "--integrity-no-wipe"
                    },
                    {
                        "name": "--unbound",
                        "lines": 4,
                        "long": "--unbound"
                    },
                    {
                        "name": "--tcrypt-hidden",
                        "lines": 3,
                        "long": "--tcrypt-hidden"
                    },
                    {
                        "name": "--veracrypt",
                        "lines": 2,
                        "long": "--veracrypt"
                    },
                    {
                        "name": "--disable-veracrypt",
                        "lines": 3,
                        "long": "--disable-veracrypt"
                    },
                    {
                        "name": "--veracrypt-pim",
                        "lines": 3,
                        "long": "--veracrypt-pim"
                    },
                    {
                        "name": "--serialize-memory-hard-pbkdf",
                        "lines": 9,
                        "long": "--serialize-memory-hard-pbkdf"
                    },
                    {
                        "name": "--encrypt",
                        "lines": 2,
                        "long": "--encrypt"
                    },
                    {
                        "name": "--decrypt",
                        "lines": 2,
                        "long": "--decrypt"
                    },
                    {
                        "name": "--init-only",
                        "lines": 4,
                        "long": "--init-only"
                    },
                    {
                        "name": "--resume-only",
                        "lines": 5,
                        "long": "--resume-only"
                    },
                    {
                        "name": "--resilience <mode>",
                        "lines": 13,
                        "long": "--resilience",
                        "arg": "<mode>"
                    },
                    {
                        "name": "--resilience-hash <hash>",
                        "lines": 3,
                        "long": "--resilience-hash",
                        "arg": "<hash>"
                    },
                    {
                        "name": "--hotzone-size <size>",
                        "lines": 5,
                        "long": "--hotzone-size",
                        "arg": "<size>"
                    },
                    {
                        "name": "--reduce-device-size <size>",
                        "lines": 16,
                        "long": "--reduce-device-size",
                        "arg": "<size>"
                    },
                    {
                        "name": "--version",
                        "lines": 2,
                        "long": "--version"
                    },
                    {
                        "name": "--usage",
                        "lines": 2,
                        "long": "--usage"
                    },
                    {
                        "name": "--help, -?",
                        "lines": 2,
                        "flag": "-?",
                        "long": "--help"
                    }
                ]
            },
            {
                "name": "EXAMPLE",
                "lines": 13,
                "subsections": [
                    {
                        "name": "WARNING: The command in example 5 will erase all key slots.",
                        "lines": 10
                    }
                ]
            },
            {
                "name": "RETURN CODES",
                "lines": 5,
                "subsections": []
            },
            {
                "name": "NOTES ON PASSPHRASE PROCESSING FOR PLAIN MODE",
                "lines": 37,
                "subsections": []
            },
            {
                "name": "NOTES ON PASSPHRASE PROCESSING FOR LUKS",
                "lines": 26,
                "subsections": []
            },
            {
                "name": "INCOHERENT BEHAVIOR FOR INVALID PASSPHRASES/KEYS",
                "lines": 5,
                "subsections": [
                    {
                        "name": "NOTES ON SUPPORTED CIPHERS, MODES, HASHES AND KEY SIZES",
                        "lines": 7
                    }
                ]
            },
            {
                "name": "NOTES ON PASSPHRASES",
                "lines": 6,
                "subsections": []
            },
            {
                "name": "NOTES ON RANDOM NUMBER GENERATORS",
                "lines": 14,
                "subsections": [
                    {
                        "name": "AUTHENTICATED DISK ENCRYPTION (EXPERIMENTAL)",
                        "lines": 34
                    }
                ]
            },
            {
                "name": "NOTES ON LOOPBACK DEVICE USE",
                "lines": 9,
                "subsections": [
                    {
                        "name": "LUKS2 header locking",
                        "lines": 7
                    }
                ]
            },
            {
                "name": "DEPRECATED ACTIONS",
                "lines": 5,
                "subsections": []
            },
            {
                "name": "REPORTING BUGS",
                "lines": 4,
                "subsections": []
            },
            {
                "name": "AUTHORS",
                "lines": 6,
                "subsections": []
            },
            {
                "name": "COPYRIGHT",
                "lines": 9,
                "subsections": []
            },
            {
                "name": "SEE ALSO",
                "lines": 3,
                "subsections": [
                    {
                        "name": "lab.com/cryptsetup/cryptsetup/wikis/FrequentlyAskedQuestions",
                        "lines": 9
                    }
                ]
            }
        ],
        "sections": {
            "NAME": {
                "content": "cryptsetup - manage plain dm-crypt and LUKS encrypted volumes\n",
                "subsections": []
            },
            "SYNOPSIS": {
                "content": "",
                "subsections": [
                    {
                        "name": "cryptsetup <options> <action> <action args>",
                        "content": ""
                    }
                ]
            },
            "DESCRIPTION": {
                "content": "cryptsetup  is  used to conveniently setup dm-crypt managed device-mapper mappings. These in‐\nclude plain dm-crypt volumes and LUKS volumes. The difference is that LUKS  uses  a  metadata\nheader  and  can hence offer more features than plain dm-crypt. On the other hand, the header\nis visible and vulnerable to damage.\n\nIn addition, cryptsetup provides limited support for the use of loop-AES volumes,  TrueCrypt,\nVeraCrypt and BitLocker compatible volumes.\n\n",
                "subsections": [
                    {
                        "name": "PLAIN DM-CRYPT OR LUKS?",
                        "content": "Unless you understand the cryptographic background well, use LUKS.  With plain dm-crypt there\nare a number of possible user errors that massively decrease security. While LUKS cannot  fix\nthem all, it can lessen the impact for many of them.\n"
                    }
                ]
            },
            "WARNINGS": {
                "content": "A  lot  of good information on the risks of using encrypted storage, on handling problems and\non security aspects can be found in the Cryptsetup FAQ. Read it. Nonetheless, some risks  de‐\nserve to be mentioned here.\n\nBackup:  Storage media die. Encryption has no influence on that.  Backup is mandatory for en‐\ncrypted data as well, if the data has any worth. See the Cryptsetup FAQ for advice on how  to\ndo a backup of an encrypted volume.\n\nCharacter encoding: If you enter a passphrase with special symbols, the passphrase can change\ndepending on character encoding. Keyboard settings can also change, which can make blind  in‐\nput  hard  or  impossible.  For example, switching from some ASCII 8-bit variant to UTF-8 can\nlead to a different binary encoding and hence different passphrase seen by  cryptsetup,  even\nif  what  you  see on the terminal is exactly the same. It is therefore highly recommended to\nselect passphrase characters only from 7-bit ASCII, as the encoding for 7-bit ASCII stays the\nsame for all ASCII variants and UTF-8.\n\nLUKS header: If the header of a LUKS volume gets damaged, all data is permanently lost unless\nyou have a header-backup.  If a key-slot is damaged, it can only be restored from  a  header-\nbackup  or  if another active key-slot with known passphrase is undamaged.  Damaging the LUKS\nheader is something people manage to do with surprising frequency. This risk is the result of\na  trade-off  between  security and safety, as LUKS is designed for fast and secure wiping by\njust overwriting header and key-slot area.\n\nPreviously used partitions: If a partition was previously used, it is a  very  good  idea  to\nwipe  filesystem signatures, data, etc. before creating a LUKS or plain dm-crypt container on\nit.  For a quick removal of filesystem signatures, use \"wipefs\". Take care though  that  this\nmay  not remove everything. In particular, MD RAID signatures at the end of a device may sur‐\nvive. It also does not remove data. For a full wipe, overwrite  the  whole  partition  before\ncontainer  creation.  If you do not know how to do that, the cryptsetup FAQ describes several\noptions.\n\n",
                "subsections": []
            },
            "BASIC ACTIONS": {
                "content": "The following are valid actions for all supported device types.\n\nopen <device> <name> --type <devicetype>\n\nOpens (creates a mapping with) <name> backed by device <device>.\n\nDevice type can be plain, luks (default), luks1, luks2, loopaes or tcrypt.\n\nFor backward compatibility there are open command aliases:\n\ncreate (argument-order <name> <device>): open --type plain\nplainOpen: open --type plain\nluksOpen: open --type luks\nloopaesOpen: open --type loopaes\ntcryptOpen: open --type tcrypt\nbitlkOpen: open --type bitlk\n\n<options> are type specific and are described below for individual device  types.  For\ncreate,  the  order of the <name> and <device> options is inverted for historical rea‐\nsons, all other aliases use the standard <device> <name> order.\n\nclose <name>\n\nRemoves the existing mapping <name> and wipes the key from kernel memory.\n\nFor backward compatibility  there  are  close  command  aliases:  remove,  plainClose,\nluksClose, loopaesClose, tcryptClose (all behaves exactly the same, device type is de‐\ntermined automatically from active device).\n\n<options> can be [--deferred] or [--cancel-deferred]\n\n\nstatus <name>\n\nReports the status for the mapping <name>.\n\nresize <name>\n\nResizes an active mapping <name>.\n\nIf --size (in 512-bytes sectors) or --device-size are not specified, the size is  com‐\nputed  from  the  underlying  device. For LUKS it is the size of the underlying device\nwithout the area reserved for LUKS header (see data payload offset  in  luksDump  com‐\nmand).  For plain crypt device, the whole device size is used.\n\nNote  that this does not change the raw device geometry, it just changes how many sec‐\ntors of the raw device are represented in the mapped device.\n\nIf cryptsetup detected volume key for active device loaded in kernel keyring  service,\nresize  action would first try to retrieve the key using a token and only if it failed\nit'd ask for a passphrase to unlock a keyslot (LUKS) or to derive a volume  key  again\n(plain mode).  The kernel keyring is used by default for LUKS2 devices.\n\nWith LUKS2 device additional <options> can be [--token-id, --token-only, --token-type,\n--key-slot, --key-file, --keyfile-size, --keyfile-offset, --timeout,  --disable-exter‐\nnal-tokens, --disable-locks, --disable-keyring].\n\n\nrefresh <name>\n\nRefreshes parameters of active mapping <name>.\n\nUpdates  parameters of active device <name> without need to deactivate the device (and\numount filesystem). Currently it supports parameters  refresh  on  following  devices:\nLUKS1, LUKS2 (including authenticated encryption), plain crypt and loopaes.\n\nMandatory  parameters  are  identical to those of an open action for respective device\ntype.\n\nYou may change following parameters on all devices --perf-samecpucrypt,  --perf-sub‐\nmitfromcryptcpus,  --perf-noreadworkqueue,  --perf-nowriteworkqueue  and  --al‐\nlow-discards.\n\nRefreshing device without any optional parameter will refresh the device with  default\nsetting (respective to device type).\n\nLUKS2 only:\n\n--integrity-no-journal  parameter affects only LUKS2 devices with underlying dm-integ‐\nrity device.\n\nAdding option --persistent stores any combination of device parameters above in  LUKS2\nmetadata (only after successful refresh operation).\n\n--disable-keyring  parameter  refreshes  a  device  with volume key passed in dm-crypt\ndriver.\n\n\nreencrypt <device> or --active-name <name> [<newname>]\n\nRun resilient reencryption (LUKS2 device only).\n\nThere are 3 basic modes of operation:\n\n• device reencryption (reencrypt)\n\n• device encryption (reencrypt --encrypt)\n\n• device decryption (reencrypt --decrypt)\n\n<device> or --active-name <name> is mandatory parameter.\n\nWith <device> parameter cryptsetup looks up active <device> dm mapping.  If no  active\nmapping  is  detected,  it  starts  offline reencryption otherwise online reencryption\ntakes place.\n\nReencryption process may be safely interrupted by a user via SIGTERM signal (ctrl+c).\n\nTo resume already initialized or interrupted reencryption,  just  run  the  cryptsetup\nreencrypt  command  again to continue the reencryption operation.  Reencryption may be\nresumed with different --resilience or --hotzone-size unless  implicit  datashift  re‐\nsilience mode is used (reencrypt --encrypt with --reduce-device-size option).\n\nIf the reencryption process was interrupted abruptly (reencryption process crash, sys‐\ntem crash, poweroff) it may require recovery. The recovery is currently run  automati‐\ncally on next activation (action open) when needed.\n\nOptional parameter <newname> takes effect only with --encrypt option and it activates\ndevice <newname> immediately after encryption initialization  gets  finished.  That's\nuseful  when  device  needs  to be ready as soon as possible and mounted (used) before\nfull data area encryption is completed.\n\nAction supports following additional <options> [--encrypt,  --decrypt,  --device-size,\n--resilience,  --resilience-hash,  --hotzone-size,  --init-only,  --resume-only, --re‐\nduce-device-size, --master-key-file, --key-size].\n\n",
                "subsections": []
            },
            "PLAIN MODE": {
                "content": "Plain dm-crypt encrypts the device sector-by-sector with a single,  non-salted  hash  of  the\npassphrase.  No  checks are performed, no metadata is used. There is no formatting operation.\nWhen the raw device is mapped (opened), the usual device operations can be used on the mapped\ndevice, including filesystem creation.  Mapped devices usually reside in /dev/mapper/<name>.\n\nThe following are valid plain device type actions:\n\nopen --type plain <device> <name>\ncreate <name> <device> (OBSOLETE syntax)\n\nOpens (creates a mapping with) <name> backed by device <device>.\n\n<options>  can  be  [--hash, --cipher, --verify-passphrase, --sector-size, --key-file,\n--keyfile-offset, --key-size, --offset, --skip, --size,  --readonly,  --shared,  --al‐\nlow-discards, --refresh]\n\nExample:  'cryptsetup  open  --type plain /dev/sda10 e1' maps the raw encrypted device\n/dev/sda10 to the mapped (decrypted) device /dev/mapper/e1, which can then be mounted,\nfsck-ed or have a filesystem created on it.\n",
                "subsections": []
            },
            "LUKS EXTENSION": {
                "content": "LUKS, the Linux Unified Key Setup, is a standard for disk encryption.  It adds a standardized\nheader at the start of the device, a key-slot area directly behind the header  and  the  bulk\ndata  area  behind  that. The whole set is called a 'LUKS container'.  The device that a LUKS\ncontainer resides on is called a 'LUKS device'.  For most purposes, both terms  can  be  used\ninterchangeably.  But note that when the LUKS header is at a nonzero offset in a device, then\nthe device is not a LUKS device anymore, but has a LUKS container stored in it at an offset.\n\nLUKS can manage multiple passphrases that can be individually revoked or changed and that can\nbe  securely  scrubbed  from  persistent  media  due  to  the  use  of anti-forensic stripes.\nPassphrases are protected against brute-force and dictionary attacks by PBKDF2, which  imple‐\nments hash iteration and salting in one function.\n\nLUKS2  is  a  new  version  of header format that allows additional extensions like different\nPBKDF algorithm or authenticated encryption.  You can format device with LUKS2 header if  you\nspecify --type luks2 in luksFormat command.  For activation, the format is already recognized\nautomatically.\n\nEach passphrase, also called a key in this document, is associated with one of  8  key-slots.\nKey  operations  that  do  not specify a slot affect the first slot that matches the supplied\npassphrase or the first empty slot if a new passphrase is added.\n\nThe <device> parameter can also be specified by a LUKS UUID in the format UUID=<uuid>. Trans‐\nlation to real device name uses symlinks in /dev/disk/by-uuid directory.\n\nTo specify a detached header, the --header parameter can be used in all LUKS commands and al‐\nways takes precedence over the positional <device> parameter.\n\nThe following are valid LUKS actions:\n\nluksFormat <device> [<key file>]\n\nInitializes a LUKS partition and sets the initial passphrase (for key-slot 0),  either\nvia prompting or via <key file>. Note that if the second argument is present, then the\npassphrase is taken from the file given there, without the need to use the  --key-file\noption.  Also  note  that for both forms of reading the passphrase from a file you can\ngive '-' as file name, which results in the passphrase being read from stdin  and  the\nsafety-question being skipped.\n\nYou  cannot  call  luksFormat on a device or filesystem that is mapped or in use, e.g.\nmounted filesysem, used in LVM, active RAID member etc.  The device or filesystem  has\nto be un-mounted in order to call luksFormat.\n\nTo use LUKS2, specify --type luks2.\n\n<options>  can  be  [--hash,  --cipher,  --verify-passphrase,  --key-size, --key-slot,\n--key-file (takes precedence over optional second argument), --keyfile-offset,  --key‐\nfile-size,  --use-random  |  --use-urandom,  --uuid,  --master-key-file,  --iter-time,\n--header, --pbkdf-force-iterations, --force-password, --disable-locks].\n\nFor LUKS2, additional  <options>  can  be  [--integrity,  --integrity-no-wipe,  --sec‐\ntor-size,  --label,  --subsystem,  --pbkdf,  --pbkdf-memory,  --pbkdf-parallel, --dis‐\nable-locks,    --disable-keyring,    --luks2-metadata-size,     --luks2-keyslots-size,\n--keyslot-cipher, --keyslot-key-size].\n\nWARNING:  Doing  a luksFormat on an existing LUKS container will make all data the old\ncontainer permanently irretrievable unless you have a header backup.\n\nopen --type luks <device> <name>\nluksOpen <device> <name> (old syntax)\n\nOpens the LUKS device <device> and sets up a mapping <name> after successful verifica‐\ntion of the supplied passphrase.\n\nFirst,  the  passphrase is searched in LUKS tokens. If it's not found in any token and\nalso the passphrase is not supplied via --key-file, the command prompts for it  inter‐\nactively.\n\n<options>   can   be   [--key-file,   --keyfile-offset,   --keyfile-size,  --readonly,\n--test-passphrase, --allow-discards, --header,  --key-slot,  --master-key-file,  --to‐\nken-id,   --token-only,  --token-type,  --disable-external-tokens,  --disable-keyring,\n--disable-locks, --type, --refresh, --serialize-memory-hard-pbkdf].\n\nluksSuspend <name>\n\nSuspends an active device (all IO operations will block and  accesses  to  the  device\nwill  wait indefinitely) and wipes the encryption key from kernel memory. Needs kernel\n2.6.19 or later.\n\nAfter this operation you have to use luksResume to reinstate the  encryption  key  and\nunblock the device or close to remove the mapped device.\n\nWARNING: never suspend the device on which the cryptsetup binary resides.\n\n<options> can be [--header, --disable-locks].\n\nluksResume <name>\n\nResumes  a  suspended device and reinstates the encryption key.  Prompts interactively\nfor a passphrase if --key-file is not given.\n\n<options> can be  [--key-file,  --keyfile-size,  --header,  --disable-keyring,  --dis‐\nable-locks, --type]\n\nluksAddKey <device> [<key file with new key>]\n\nAdds  a  new  passphrase. An existing passphrase must be supplied interactively or via\n--key-file.  The new passphrase to be added can be  specified  interactively  or  read\nfrom the file given as positional argument.\n\nNOTE:  with --unbound option the action creates new unbound LUKS2 keyslot. The keyslot\ncannot be used for device activation.  If you don't pass new key via --master-key-file\noption, new random key is generated. Existing passphrase for any active keyslot is not\nrequired.\n\n<options> can be [--key-file, --keyfile-offset, --keyfile-size,  --new-keyfile-offset,\n--new-keyfile-size,  --key-slot, --master-key-file, --force-password, --header, --dis‐\nable-locks,  --iter-time,  --pbkdf,   --pbkdf-force-iterations,   --unbound,   --type,\n--keyslot-cipher, --keyslot-key-size].\n\nluksRemoveKey <device> [<key file with passphrase to be removed>]\n\nRemoves the supplied passphrase from the LUKS device. The passphrase to be removed can\nbe specified interactively, as the positional argument or via --key-file.\n\n<options> can  be  [--key-file,  --keyfile-offset,  --keyfile-size,  --header,  --dis‐\nable-locks, --type]\n\nWARNING:  If  you read the passphrase from stdin (without further argument or with '-'\nas an argument to --key-file), batch-mode (-q) will be implicitly switched on  and  no\nwarning  will  be given when you remove the last remaining passphrase from a LUKS con‐\ntainer. Removing the last passphrase makes the LUKS container  permanently  inaccessi‐\nble.\n\nluksChangeKey <device> [<new key file>]\n\nChanges an existing passphrase. The passphrase to be changed must be supplied interac‐\ntively or via --key-file.  The new passphrase can be supplied interactively  or  in  a\nfile given as positional argument.\n\nIf  a key-slot is specified (via --key-slot), the passphrase for that key-slot must be\ngiven and the new passphrase will overwrite the specified key-slot. If no key-slot  is\nspecified and there is still a free key-slot, then the new passphrase will be put into\na free key-slot before the key-slot containing the old passphrase is purged. If  there\nis  no  free  key-slot,  then  the key-slot with the old passphrase is overwritten di‐\nrectly.\n\nWARNING: If a key-slot is overwritten, a media failure during this operation can cause\nthe  overwrite  to fail after the old passphrase has been wiped and make the LUKS con‐\ntainer inaccessible.\n\n<options> can be [--key-file, --keyfile-offset, --keyfile-size,  --new-keyfile-offset,\n--iter-time,   --pbkdf,   --pbkdf-force-iterations,   --new-keyfile-size,  --key-slot,\n--force-password,     --header,     --disable-locks,     --type,     --keyslot-cipher,\n--keyslot-key-size].\n\nluksConvertKey <device>\n\nConverts an existing LUKS2 keyslot to new pbkdf parameters. The passphrase for keyslot\nto be converted must be supplied interactively or via --key-file. If no --pbkdf param‐\neters are specified LUKS2 default pbkdf values will apply.\n\nIf  a  keyslot  is specified (via --key-slot), the passphrase for that keyslot must be\ngiven. If no keyslot is specified and there is still a free keyslot, then the new  pa‐\nrameters will be put into a free keyslot before the keyslot containing the old parame‐\nters is purged. If there is no free keyslot, then the keyslot with the old  parameters\nis overwritten directly.\n\nWARNING:  If a keyslot is overwritten, a media failure during this operation can cause\nthe overwrite to fail after the old parameters have been wiped and make the LUKS  con‐\ntainer inaccessible.\n\n<options>  can be [--key-file, --keyfile-offset, --keyfile-size, --key-slot, --header,\n--disable-locks,  --iter-time,  --pbkdf,   --pbkdf-force-iterations,   --pbkdf-memory,\n--pbkdf-parallel, --keyslot-cipher, --keyslot-key-size].\n\nluksKillSlot <device> <key slot number>\n\nWipe the key-slot number <key slot> from the LUKS device. Except running in batch-mode\n(-q) a remaining passphrase must be supplied, either interactively or via  --key-file.\nThis  command can remove the last remaining key-slot, but requires an interactive con‐\nfirmation when doing so. Removing the last passphrase makes a  LUKS  container  perma‐\nnently inaccessible.\n\n<options>  can  be  [--key-file,  --keyfile-offset,  --keyfile-size,  --header, --dis‐\nable-locks, --type].\n\nWARNING: If you read the passphrase from stdin (without further argument or  with  '-'\nas  an  argument to --key-file), batch-mode (-q) will be implicitly switched on and no\nwarning will be given when you remove the last remaining passphrase from a  LUKS  con‐\ntainer.  Removing  the last passphrase makes the LUKS container permanently inaccessi‐\nble.\n\nNOTE: If there is no passphrase provided (on stdin or through --key-file argument) and\nbatch-mode (-q) is active, the key-slot is removed without any other warning.\n\n\nerase <device>\nluksErase <device>\n\nErase  all  keyslots and make the LUKS container permanently inaccessible.  You do not\nneed to provide any password for this operation.\n\nWARNING: This operation is irreversible.\n\nluksUUID <device>\n\nPrint the UUID of a LUKS device.\nSet new UUID if --uuid option is specified.\n\nisLuks <device>\n\nReturns true, if <device> is a LUKS device, false otherwise.  Use option -v to get hu‐\nman-readable feedback. 'Command successful.'  means the device is a LUKS device.\n\nBy specifying --type you may query for specific LUKS version.\n\nluksDump <device>\n\nDump the header information of a LUKS device.\n\nIf  the --dump-master-key option is used, the LUKS device master key is dumped instead\nof the keyslot info. Together with --master-key-file option, master key is dumped to a\nfile  instead of standard output. Beware that the master key cannot be changed without\nreencryption and can be used to decrypt the data stored in the LUKS container  without\na  passphrase  and  even without the LUKS header. This means that if the master key is\ncompromised, the whole device has to be erased or reencrypted to prevent  further  ac‐\ncess. Use this option carefully.\n\nTo  dump  the master key, a passphrase has to be supplied, either interactively or via\n--key-file.\n\nTo dump unbound key (LUKS2 format only), --unbound parameter, specific  --key-slot  id\nand proper passphrase has to be supplied, either interactively or via --key-file.  Op‐\ntional --master-key-file parameter enables unbound keyslot dump to a file.\n\nTo  dump  LUKS2  JSON  metadata  (without  basic  heade  information  like  UUID)  use\n--dump-json-metadata option.\n\n<options>  can be [--dump-master-key, --dump-json-metadata, --key-file, --keyfile-off‐\nset, --keyfile-size, --header, --disable-locks, --master-key-file, --type,  --unbound,\n--key-slot].\n\nWARNING:  If  --dump-master-key is used with --key-file and the argument to --key-file\nis '-', no validation question will be asked and no warning given.\n\nluksHeaderBackup <device> --header-backup-file <file>\n\nStores a binary backup of the LUKS header and keyslot area.\nNote: Using '-' as filename writes the header backup to a file named '-'.\n\nWARNING: This backup file and a passphrase valid at the time of backup allows  decryp‐\ntion  of  the LUKS data area, even if the passphrase was later changed or removed from\nthe LUKS device. Also note that with a header backup you lose the ability to  securely\nwipe  the LUKS device by just overwriting the header and key-slots. You either need to\nsecurely erase all header backups in addition or overwrite the encrypted data area  as\nwell.   The second option is less secure, as some sectors can survive, e.g. due to de‐\nfect management.\n\nluksHeaderRestore <device> --header-backup-file <file>\n\nRestores a binary backup of the LUKS header and keyslot area from the specified file.\nNote: Using '-' as filename reads the header backup from a file named '-'.\n\nWARNING: Header and keyslots will be replaced, only the passphrases  from  the  backup\nwill work afterward.\n\nThis  command requires that the master key size and data offset of the LUKS header al‐\nready on the device and of the header backup match. Alternatively, if there is no LUKS\nheader on the device, the backup will also be written to it.\n\ntoken <add|remove|import|export> <device>\n\nAction add creates new keyring token to enable auto-activation of the device.  For the\nauto-activation, the passphrase must be stored in keyring with the specified  descrip‐\ntion.  Usually,  the passphrase should be stored in user or user-session keyring.  The\ntoken command is supported only for LUKS2.\n\nFor adding new keyring token, option --key-description is mandatory.  Also, new  token\nis assigned to key slot specified with --key-slot option or to all active key slots in\nthe case --key-slot option is omitted.\n\nTo remove existing token, specify the token ID which should be removed with --token-id\noption.\n\nWARNING:  The  action  token remove removes any token type, not just keyring type from\ntoken slot specified by --token-id option.\n\nAction import can store arbitrary valid token json in LUKS2 header. It may  be  passed\nvia standard input or via file passed in --json-file option. If you specify --key-slot\nthen successfully imported token is also assigned to the key slot.\n\nAction export writes requested token json to a file  passed  with  --json-file  or  to\nstandard output.\n\n<options>  can  be [--header, --token-id, --key-slot, --key-description, --disable-ex‐\nternal-tokens, --disable-locks, --disable-keyring, --json-file].\n\nconvert <device> --type <format>\n\nConverts the device between LUKS1 and LUKS2 format (if possible).  The conversion will\nnot  be  performed  if  there  is an additional LUKS2 feature or LUKS1 has unsupported\nheader size.\n\nConversion (both directions) must be performed on inactive device. There must  not  be\nactive dm-crypt mapping established for LUKS header requested for conversion.\n\n--type option is mandatory with following accepted values: luks1 or luks2.\n\nWARNING:  The convert action can destroy the LUKS header in the case of a crash during\nconversion or if a media error occurs.  Always create a header backup before  perform‐\ning this operation!\n\n<options> can be [--header, --type].\n\nconfig <device>\n\nSet  permanent  configuration  options  (store to LUKS header).  The config command is\nsupported only for LUKS2.\n\nThe permanent options can be --priority to set priority (normal, prefer,  ignore)  for\nkeyslot (specified by --key-slot) or --label and --subsystem.\n\n<options> can be [--priority, --label, --subsystem, --key-slot, --header].\n\n",
                "subsections": [
                    {
                        "name": "loop-AES EXTENSION",
                        "content": "cryptsetup supports mapping loop-AES encrypted partition using a compatibility mode.\n\nopen --type loopaes <device> <name> --key-file <keyfile>\nloopaesOpen <device> <name> --key-file <keyfile>  (old syntax)\n\nOpens the loop-AES <device> and sets up a mapping <name>.\n\nIf the key file is encrypted with GnuPG, then you have to use --key-file=- and decrypt\nit before use, e.g. like this:\ngpg --decrypt <keyfile> | cryptsetup loopaesOpen --key-file=- <device> <name>\n\nWARNING: The loop-AES extension cannot use the direct input of key file on real termi‐\nnal  because the keys are separated by end-of-line and only part of the multi-key file\nwould be read.\nIf you need it in script, just use the pipe redirection:\necho $keyfile | cryptsetup loopaesOpen --key-file=- <device> <name>\n\nUse --keyfile-size to specify the proper key length if needed.\n\nUse --offset to specify device offset. Note that the units need  to  be  specified  in\nnumber of 512 byte sectors.\n\nUse --skip to specify the IV offset. If the original device used an offset and but did\nnot use it in IV sector calculations, you have to explicitly use --skip 0 in  addition\nto the offset parameter.\n\nUse  --hash to override the default hash function for passphrase hashing (otherwise it\nis detected according to key size).\n\n<options> can be [--key-file, --key-size, --offset, --skip, --hash, --readonly,  --al‐\nlow-discards, --refresh].\n\nSee  also  section  7 of the FAQ and http://loop-aes.sourceforge.net for more information re‐\ngarding loop-AES.\n"
                    },
                    {
                        "name": "TCRYPT (TrueCrypt-compatible and VeraCrypt) EXTENSION",
                        "content": "cryptsetup supports mapping of TrueCrypt, tcplay or VeraCrypt encrypted partition using a na‐\ntive  Linux  kernel API.  Header formatting and TCRYPT header change is not supported, crypt‐\nsetup never changes TCRYPT header on-device.\n\nTCRYPT extension requires kernel userspace crypto API to be available  (introduced  in  Linux\nkernel  2.6.38).   If  you  are configuring kernel yourself, enable \"User-space interface for\nsymmetric key cipher algorithms\" in  \"Cryptographic  API\"  section  (CRYPTOUSERAPISKCIPHER\n.config option).\n\nBecause TCRYPT header is encrypted, you have to always provide valid passphrase and keyfiles.\n\nCryptsetup  should  recognize  all header variants, except legacy cipher chains using LRW en‐\ncryption mode with 64 bits encryption block (namely Blowfish in LRW mode is  not  recognized,\nthis is limitation of kernel crypto API).\n\nVeraCrypt  is  just extension of TrueCrypt header with increased iteration count so unlocking\ncan take quite a lot of time (in comparison with TCRYPT device).\n\nTo open a VeraCrypt device with a custom Personal Iteration Multiplier (PIM) value,  use  ei‐\nther the --veracrypt-pim=<PIM> option to directly specify the PIM on the command- line or use\n--veracrypt-query-pim to be prompted for the PIM.\n\nThe PIM value affects the number of iterations applied during key derivation. Please refer to\nhttps://www.veracrypt.fr/en/Personal%20Iterations%20Multiplier%20%28PIM%29.html  for more de‐\ntailed information.\n\nIf you need to disable VeraCrypt device support, use --disable-veracrypt option.\n\nNOTE: Activation with tcryptOpen is supported only for cipher chains using LRW or XTS encryp‐\ntion modes.\n\nThe  tcryptDump command should work for all recognized TCRYPT devices and doesn't require su‐\nperuser privilege.\n\nTo map system device (device with boot loader where the whole encrypted system  resides)  use\n--tcrypt-system  option.   You  can  use partition device as the parameter (parameter must be\nreal partition device, not an image in a file), then only this partition is mapped.\n\nIf you have the whole TCRYPT device as a file image and you want to  map  multiple  partition\nencrypted  with system encryption, please create loopback mapping with partitions first (los‐‐\netup -P, see losetup(8) man page for more info), and use loop partition as the device parame‐\nter.\n\nIf  you  use the whole base device as a parameter, one device for the whole system encryption\nis mapped. This mode is available only for backward compatibility with older cryptsetup  ver‐\nsions which mapped TCRYPT system encryption using the whole device.\n\nTo use hidden header (and map hidden device, if available), use --tcrypt-hidden option.\n\nTo explicitly use backup (secondary) header, use --tcrypt-backup option.\n\nNOTE:  There  is no protection for a hidden volume if the outer volume is mounted. The reason\nis that if there were any protection, it would require some metadata describing what to  pro‐\ntect in the outer volume and the hidden volume would become detectable.\n\n\nopen --type tcrypt <device> <name>\ntcryptOpen <device> <name>  (old syntax)\n\nOpens the TCRYPT (a TrueCrypt-compatible) <device> and sets up a mapping <name>.\n\n<options>  can  be  [--key-file,  --tcrypt-hidden,  --tcrypt-system,  --tcrypt-backup,\n--readonly, --test-passphrase, --allow-discards, --disable-veracrypt, --veracrypt-pim,\n--veracrypt-query-pim, --header, --cipher, --hash].\n\nThe keyfile parameter allows a combination of file content with the passphrase and can\nbe repeated. Note that using keyfiles is compatible with TCRYPT and is different  from\nLUKS keyfile logic.\n\nIf  --PBKDF2 variants with the specified hash algorithms are checked. This could speed\nup unlocking the device (but also it reveals some information about the container).\n\nIf you use --header in combination with hidden or system options, the header file must\ncontain specific headers on the same positions as the original encrypted container.\n\nWARNING:  Option  --allow-discards cannot be combined with option --tcrypt-hidden. For\nnormal mapping, it can cause the destruction of hidden volume (hidden  volume  appears\nas unused space for outer volume so this space can be discarded).\n\n\ntcryptDump <device>\n\nDump the header information of a TCRYPT device.\n\nIf  the  --dump-master-key  option is used, the TCRYPT device master key is dumped in‐\nstead of TCRYPT header info. Beware that the master key (or concatenated  master  keys\nif  cipher  chain  is  used) can be used to decrypt the data stored in the TCRYPT con‐\ntainer without a passphrase.  This means that if the master key  is  compromised,  the\nwhole device has to be erased to prevent further access. Use this option carefully.\n\n<options>  can  be  [--dump-master-key,  --key-file, --tcrypt-hidden, --tcrypt-system,\n--tcrypt-backup, --cipher, --hash].\n\nThe keyfile parameter allows a combination of file content with the passphrase and can\nbe repeated.\n\nSee also https://en.wikipedia.org/wiki/TrueCrypt for more information regarding TrueCrypt.\n\nPlease  note  that cryptsetup does not use TrueCrypt code, please report all problems related\nto this compatibility extension to the cryptsetup project.\n\n"
                    },
                    {
                        "name": "BITLK (Windows BitLocker-compatible) EXTENSION (EXPERIMENTAL)",
                        "content": "cryptsetup supports mapping of BitLocker and BitLocker to Go encrypted partition using a  na‐\ntive  Linux kernel API.  Header formatting and BITLK header changes are not supported, crypt‐\nsetup never changes BITLK header on-device.\n\nWARNING: This extension is EXPERIMENTAL.\n\nBITLK extension requires kernel userspace crypto API to be available (for details see  TCRYPT\nsection).\n\nCryptsetup  should  recognize all BITLK header variants, except legacy header used in Windows\nVista systems and partially decrypted BitLocker devices.  Activation of  legacy  devices  en‐\ncrypted in CBC mode requires at least Linux kernel version 5.3 and for devices using Elephant\ndiffuser kernel 5.6.\n\nThe bitlkDump command should work for all recognized BITLK devices and doesn't require  supe‐\nruser privilege.\n\nFor unlocking with the open a password or a recovery passphrase or a startup key must be pro‐\nvided.\n\nAdditionally unlocking using master key is supported. You must provide BitLocker Full  Volume\nEncryption Key (FVEK) using the --master-key-file option. The key must be decrypted and with‐\nout the header (only 128/256/512 bits of key data depending on used cipher and mode).\n\nOther unlocking methods (TPM, SmartCard) are not supported.\n\n\nopen --type bitlk <device> <name>\nbitlkOpen <device> <name>  (old syntax)\n\nOpens the BITLK (a BitLocker-compatible) <device> and sets up a mapping <name>.\n\n<options> can be [--key-file, --readonly, --test-passphrase,  --allow-discards  --mas‐\nter-key-file].\n\n\nbitlkDump <device>\n\nDump the header information of a BITLK device.\n\n<options> can be [--dump-master-key --master-key-file].\n\n\nPlease  note that cryptsetup does not use any Windows BitLocker code, please report all prob‐\nlems related to this compatibility extension to the cryptsetup project.\n\n"
                    }
                ]
            },
            "MISCELLANEOUS": {
                "content": "repair <device>\n\nTries to repair the device metadata if possible. Currently supported only for LUKS de‐\nvice type.\n\nThis command is useful to fix some known benign LUKS metadata header corruptions. Only\nbasic corruptions of unused keyslot are fixable. This command  will  only  change  the\nLUKS  header, not any key-slot data. You may enforce LUKS version by adding --type op‐\ntion.\n\nIt also repairs (upgrades) LUKS2 reencryption metadata by adding metadata digest  that\nprotects it against malicious changes.\n\nIf  LUKS2  reencryption was interrupted in the middle of writting reencryption segment\nthe repair command can be used to perform reencryption recovery so  that  reencryption\ncan continue later.\n\nWARNING: Always create a binary backup of the original header before calling this com‐\nmand.\n\nbenchmark <options>\n\nBenchmarks ciphers and KDF (key derivation function).  Without parameters, it tries to\nmeasure few common configurations.\n\nTo  benchmark  other ciphers or modes, you need to specify --cipher and --key-size op‐\ntions or --hash for KDF test.\n\nNOTE: This benchmark is using memory only and is only  informative.   You  cannot  di‐\nrectly predict real storage encryption speed from it.\n\nFor  testing  block ciphers, this benchmark requires kernel userspace crypto API to be\navailable (introduced in Linux kernel 2.6.38).  If you are  configuring  kernel  your‐\nself,  enable  \"User-space  interface for symmetric key cipher algorithms\" in \"Crypto‐\ngraphic API\" section (CRYPTOUSERAPISKCIPHER .config option).\n\n<options> can be [--cipher, --key-size, --hash].\n",
                "subsections": []
            },
            "OPTIONS": {
                "content": "",
                "subsections": [
                    {
                        "name": "--verbose, -v",
                        "content": "Print more information on command execution.\n",
                        "flag": "-v",
                        "long": "--verbose"
                    },
                    {
                        "name": "--debug or --debug-json",
                        "content": "Run in debug mode with full diagnostic logs. Debug output lines are always prefixed by\n'#'.  If --debug-json is used, additional LUKS2 JSON data structures are printed.\n",
                        "long": "--debug-json"
                    },
                    {
                        "name": "--type <device-type>",
                        "content": "Specifies required device type, for more info read BASIC ACTIONS section.\n\n--hash, -h <hash-spec>\nSpecifies the passphrase hash for open (for plain and loopaes device types).\n\nSpecifies  the  hash used in the LUKS key setup scheme and volume key digest for luks‐\nFormat. The specified hash is used as hash-parameter for PBKDF2 and for the AF  split‐\nter.\n\nThe  specified hash name is passed to the compiled-in crypto backend.  Different back‐\nends may support different hashes.  For luksFormat, the hash algorithm must provide at\nleast 160 bits of output, which excludes, e.g., MD5. Do not use a non-crypto hash like\n\"crc32\" as this breaks security.\n\nValues compatible with old version of cryptsetup are \"ripemd160\" for open --type plain\nand \"sha1\" for luksFormat.\n\nUse cryptsetup --help to show the defaults.\n\n--cipher, -c <cipher-spec>\nSet the cipher specification string.\n\ncryptsetup --help shows the compiled-in defaults.  The current default in the distrib‐\nuted sources is \"aes-cbc-essiv:sha256\" for plain dm-crypt  and  \"aes-xts-plain64\"  for\nLUKS.\n\nIf  a hash is part of the cipher specification, then it is used as part of the IV gen‐\neration. For example, ESSIV needs a hash function, while \"plain64\" does not and  hence\nnone is specified.\n\nFor  XTS  mode  you  can optionally set a key size of 512 bits with the -s option. Key\nsize for XTS mode is twice that for other modes for the same security level.\n\nXTS mode requires kernel 2.6.24 or later and plain64 requires kernel 2.6.33 or  later.\nMore information can be found in the FAQ.\n",
                        "long": "--type",
                        "arg": "<device-type>"
                    },
                    {
                        "name": "--verify-passphrase, -y",
                        "content": "When  interactively asking for a passphrase, ask for it twice and complain if both in‐\nputs do not match. Advised when creating a regular mapping for the first time, or when\nrunning luksFormat. Ignored on input from file or stdin.\n\n--key-file, -d name\nRead the passphrase from file.\n\nIf  the name given is \"-\", then the passphrase will be read from stdin.  In this case,\nreading will not stop at newline characters.\n\nWith LUKS, passphrases supplied via --key-file are always the existing passphrases re‐\nquested  by a command, except in the case of luksFormat where --key-file is equivalent\nto the positional key file argument.\n\nIf you want to set a new passphrase via key file, you have to use a  positional  argu‐\nment to luksAddKey.\n\nSee section NOTES ON PASSPHRASE PROCESSING for more information.\n\n--keyfile-offset value\nSkip  value  bytes at the beginning of the key file.  Works with all commands that ac‐\ncept key files.\n\n--keyfile-size, -l value\nRead a maximum of value bytes from the key file.  The default is  to  read  the  whole\nfile  up  to  the  compiled-in maximum that can be queried with --help. Supplying more\ndata than the compiled-in maximum aborts the operation.\n\nThis option is useful to cut trailing newlines, for example.  If  --keyfile-offset  is\nalso  given, the size count starts after the offset.  Works with all commands that ac‐\ncept key files.\n\n--new-keyfile-offset value\nSkip value bytes at the start when adding a new passphrase from key file with luksAdd‐\nKey.\n\n--new-keyfile-size  value\nRead a maximum of value bytes when adding a new passphrase from key file with luksAdd‐\nKey.  The default is to read the whole file up to the compiled-in maximum length  that\ncan  be  queried  with --help.  Supplying more than the compiled in maximum aborts the\noperation.  When --new-keyfile-offset is also given, reading starts after the offset.\n",
                        "flag": "-y",
                        "long": "--verify-passphrase"
                    },
                    {
                        "name": "--master-key-file",
                        "content": "Use a master key stored in a file.\n\nFor luksFormat this allows creating a LUKS header with this specific  master  key.  If\nthe master key was taken from an existing LUKS header and all other parameters are the\nsame, then the new header decrypts the data encrypted with the header the  master  key\nwas taken from.\n\nAction  luksDump  together  with  --dump-master-key option: The volume (master) key is\nstored in a file instead of being printed out to standard output.\n\nWARNING: If you create your own master key, you need to make sure to do it right. Oth‐\nerwise,  you  can  end up with a low-entropy or otherwise partially predictable master\nkey which will compromise security.\n\nFor luksAddKey this allows adding a new passphrase without having to know an  existing\none.\n\nFor open this allows one to open the LUKS device without giving a passphrase.\n",
                        "long": "--master-key-file"
                    },
                    {
                        "name": "--dump-json-metadata",
                        "content": "For  luksDump  (LUKS2  only)  this option prints content of LUKS2 header JSON metadata\narea.\n",
                        "long": "--dump-json-metadata"
                    },
                    {
                        "name": "--dump-master-key",
                        "content": "For luksDump this option includes the master key in  the  displayed  information.  Use\nwith  care,  as  the master key can be used to bypass the passphrases, see also option\n--master-key-file.\n",
                        "long": "--dump-master-key"
                    },
                    {
                        "name": "--json-file",
                        "content": "Read token json from a file or write token to it. See token action for  more  informa‐\ntion. --json-file=- reads json from standard input or writes it to standard output re‐\nspectively.\n",
                        "long": "--json-file"
                    },
                    {
                        "name": "--use-random",
                        "content": "",
                        "long": "--use-random"
                    },
                    {
                        "name": "--use-urandom",
                        "content": "For luksFormat these options define which kernel random number generator will be  used\nto create the master key (which is a long-term key).\n\nSee  NOTES  ON RANDOM NUMBER GENERATORS for more information. Use cryptsetup --help to\nshow the compiled-in default random number generator.\n\nWARNING: In a low-entropy situation (e.g. in an embedded system), both selections  are\nproblematic.  Using /dev/urandom can lead to weak keys.  Using /dev/random can block a\nlong time, potentially forever, if not enough entropy can be harvested by the kernel.\n",
                        "long": "--use-urandom"
                    },
                    {
                        "name": "--key-slot, -S <0-N>",
                        "content": "For LUKS operations that add key material, this options allows you  to  specify  which\nkey  slot  is  selected  for the new key.  This option can be used for luksFormat, and\nluksAddKey.\nIn addition, for open,  this  option  selects  a  specific  key-slot  to  compare  the\npassphrase  against.   If  the given passphrase would only match a different key-slot,\nthe operation fails.\n\nMaximum number of key slots depends on LUKS version. LUKS1 can have up to 8 key slots.\nLUKS2  can  have  up  to  32 key slots based on key slot area size and key size, but a\nvalid key slot ID can always be between 0 and 31 for LUKS2.\n",
                        "flag": "-S",
                        "long": "--key-slot",
                        "arg": "<0-N>"
                    },
                    {
                        "name": "--key-size, -s <bits>",
                        "content": "Sets key size in bits. The argument has to be a multiple of 8. The possible  key-sizes\nare limited by the cipher and mode used.\n\nSee /proc/crypto for more information. Note that key-size in /proc/crypto is stated in\nbytes.\n\nThis option can be used for open --type plain or luksFormat.  All other  LUKS  actions\nwill use the key-size specified in the LUKS header.  Use cryptsetup --help to show the\ncompiled-in defaults.\n",
                        "flag": "-s",
                        "long": "--key-size",
                        "arg": "<bits>"
                    },
                    {
                        "name": "--size, -b <number of 512 byte sectors>",
                        "content": "Set the size of the device in sectors of 512 bytes.  This option is only relevant  for\nthe open and resize actions.\n",
                        "flag": "-b",
                        "long": "--size"
                    },
                    {
                        "name": "--offset, -o <number of 512 byte sectors>",
                        "content": "Start  offset in the backend device in 512-byte sectors.  This option is only relevant\nfor the open action with plain or loopaes device types or for LUKS devices in luksFor‐\nmat.\n\nFor  LUKS,  the --offset option sets the data offset (payload) of data device and must\nbe be aligned to 4096-byte sectors (must be multiple of 8).   This  option  cannot  be\ncombined with --align-payload option.\n",
                        "flag": "-o",
                        "long": "--offset"
                    },
                    {
                        "name": "--skip, -p <number of 512 byte sectors>",
                        "content": "Start  offset  used in IV calculation in 512-byte sectors (how many sectors of the en‐\ncrypted data to skip at the beginning).  This option is only relevant for the open ac‐\ntion with plain or loopaes device types.\n\nHence,  if  --offset  n, and --skip s, sector n (the first sector of the encrypted de‐\nvice) will get a sector number of s for the IV calculation.\n\n--device-size size[units]\nInstead of real device size, use specified value.\n\nWith reencrypt action it means that only specified area (from the start of the  device\nto the specified size) will be reencrypted.\n\nWith resize action it sets new size of the device.\n\nIf no unit suffix is specified, the size is in bytes.\n\nUnit suffix can be S for 512 byte sectors, K/M/G/T (or KiB,MiB,GiB,TiB) for units with\n1024 base or KB/MB/GB/TB for 1000 base (SI scale).\n\nWARNING: This is destructive operation when used with reencrypt command.\n",
                        "flag": "-p",
                        "long": "--skip"
                    },
                    {
                        "name": "--readonly, -r",
                        "content": "set up a read-only mapping.\n",
                        "flag": "-r",
                        "long": "--readonly"
                    },
                    {
                        "name": "--shared",
                        "content": "Creates an additional mapping for one common ciphertext device. Arbitrary mappings are\nsupported.   This option is only relevant for the open --type plain action. Use --off‐\nset, --size and --skip to specify the mapped area.\n",
                        "long": "--shared"
                    },
                    {
                        "name": "--pbkdf <PBKDF spec>",
                        "content": "Set Password-Based Key Derivation Function (PBKDF) algorithm for  LUKS  keyslot.   The\nPBKDF  can  be:  pbkdf2  (for PBKDF2 according to RFC2898), argon2i for Argon2i or ar‐\ngon2id for Argon2id (see https://www.cryptolux.org/index.php/Argon2 for more info).\n\nFor LUKS1, only PBKDF2 is accepted (no need to use this option).  The  default  PBKDF2\nfor LUKS2 is set during compilation time and is available in cryptsetup --help output.\n\nA  PBKDF  is  used  for  increasing dictionary and brute-force attack cost for keyslot\npasswords. The parameters can be time, memory and parallel cost.\n\nFor PBKDF2, only time cost (number of iterations) applies.  For Argon2i/id,  there  is\nalso  memory  cost (memory required during the process of key derivation) and parallel\ncost (number of threads that run in parallel during the key derivation.\n\nNote that increasing memory cost also increases time, so the  final  parameter  values\nare  measured by a benchmark. The benchmark tries to find iteration time (--iter-time)\nwith required memory cost --pbkdf-memory. If it is not possible, the  memory  cost  is\ndecreased  as  well.   The  parallel  cost --pbkdf-parallel is constant and is checked\nagainst available CPU cores.\n\nYou can see all PBKDF parameters for particular LUKS2 keyslot with luksDump command.\n\nNOTE: If you do not want to use benchmark and want to specify all parameters directly,\nuse  --pbkdf-force-iterations  with  --pbkdf-memory  and  --pbkdf-parallel.  This will\noverride the values without benchmarking.  Note it can cause extremely long  unlocking\ntime.  Use  only in specific cases, for example, if you know that the formatted device\nwill be used on some small embedded system.\n\nMINIMAL AND MAXIMAL PBKDF COSTS: For PBKDF2, the minimum iteration count is  1000  and\nmaximum is 4294967295 (maximum for 32bit unsigned integer).  Memory and parallel costs\nare unused for PBKDF2.  For Argon2i and Argon2id, minimum iteration count  (CPU  cost)\nis  4  and maximum is 4294967295 (maximum for 32bit unsigned integer).  Minimum memory\ncost is 32 KiB and maximum is 4 GiB. (Limited by addresable memory on some  CPU  plat‐\nforms.)  If the memory cost parameter is benchmarked (not specified by a parameter) it\nis always in range from 64 MiB to 1 GiB.  The parallel cost minimum is 1 and maximum 4\n(if enough CPUs cores are available, otherwise it is decreased).\n",
                        "long": "--pbkdf"
                    },
                    {
                        "name": "--iter-time, -i <number of milliseconds>",
                        "content": "The  number of milliseconds to spend with PBKDF passphrase processing.  This option is\nonly relevant for LUKS operations that set or change passphrases, such  as  luksFormat\nor luksAddKey.  Specifying 0 as parameter selects the compiled-in default.\n",
                        "flag": "-i",
                        "long": "--iter-time"
                    },
                    {
                        "name": "--pbkdf-memory <number>",
                        "content": "Set  the memory cost for PBKDF (for Argon2i/id the number represents kilobytes).  Note\nthat it is maximal value, PBKDF benchmark or available physical  memory  can  decrease\nit.  This option is not available for PBKDF2.\n",
                        "long": "--pbkdf-memory",
                        "arg": "<number>"
                    },
                    {
                        "name": "--pbkdf-parallel <number>",
                        "content": "Set the parallel cost for PBKDF (number of threads, up to 4).  Note that it is maximal\nvalue, it is decreased automatically if CPU online count is lower.  This option is not\navailable for PBKDF2.\n",
                        "long": "--pbkdf-parallel",
                        "arg": "<number>"
                    },
                    {
                        "name": "--pbkdf-force-iterations <num>",
                        "content": "Avoid  PBKDF  benchmark  and  set time cost (iterations) directly.  It can be used for\nLUKS/LUKS2 device only.  See --pbkdf option for more info.\n",
                        "long": "--pbkdf-force-iterations",
                        "arg": "<num>"
                    },
                    {
                        "name": "--batch-mode, -q",
                        "content": "Suppresses all confirmation questions. Use with care!\n\nIf the -y option is not specified, this option also switches off the passphrase  veri‐\nfication for luksFormat.\n",
                        "flag": "-q",
                        "long": "--batch-mode"
                    },
                    {
                        "name": "--progress-frequency <seconds>",
                        "content": "Print separate line every <seconds> with wipe progress.\n",
                        "long": "--progress-frequency",
                        "arg": "<seconds>"
                    },
                    {
                        "name": "--timeout, -t <number of seconds>",
                        "content": "The  number  of seconds to wait before timeout on passphrase input via terminal. It is\nrelevant every time a passphrase is asked, for example for open, luksFormat or luksAd‐\ndKey.  It has no effect if used in conjunction with --key-file.\nThis  option  is  useful when the system should not stall if the user does not input a\npassphrase, e.g. during boot. The default is a value of 0 seconds, which means to wait\nforever.\n",
                        "flag": "-t",
                        "long": "--timeout"
                    },
                    {
                        "name": "--tries, -T",
                        "content": "How often the input of the passphrase shall be retried.  This option is relevant every\ntime a passphrase is asked, for example for open, luksFormat or luksAddKey.   The  de‐\nfault is 3 tries.\n",
                        "flag": "-T",
                        "long": "--tries"
                    },
                    {
                        "name": "--align-payload <number of 512 byte sectors>",
                        "content": "Align  payload  at  a boundary of value 512-byte sectors.  This option is relevant for\nluksFormat.\n\nIf not specified, cryptsetup tries to use the topology info provided by the kernel for\nthe  underlying  device to get the optimal alignment.  If not available (or the calcu‐\nlated value is a multiple of the default) data is by default aligned to a 1MiB  bound‐\nary (i.e. 2048 512-byte sectors).\n\nFor  a  detached LUKS header, this option specifies the offset on the data device. See\nalso the --header option.\n\nWARNING: This option is DEPRECATED and has often unexpected impact to the data  offset\nand  keyslot area size (for LUKS2) due to the complex rounding.  For fixed data device\noffset use --offset option instead.\n\n\n--uuid=UUID\nUse the provided UUID for the luksFormat command instead  of  generating  a  new  one.\nChanges the existing UUID when used with the luksUUID command.\n\nThe    UUID    must    be    provided    in    the    standard   UUID   format,   e.g.\n12345678-1234-1234-1234-123456789abc.\n",
                        "long": "--align-payload"
                    },
                    {
                        "name": "--allow-discards",
                        "content": "Allow the use of discard (TRIM) requests for the device.  This option is only relevant\nfor  open  action.   This  is also not supported for LUKS2 devices with data integrity\nprotection.\n\nWARNING: This command can have a negative security impact because it can make filesys‐\ntem-level  operations visible on the physical device. For example, information leaking\nfilesystem type, used space, etc. may be extractable from the physical device  if  the\ndiscarded blocks can be located later. If in doubt, do not use it.\n\nA  kernel  version  of 3.1 or later is needed. For earlier kernels, this option is ig‐\nnored.\n\n--perf-samecpucrypt\nPerform encryption using the same cpu that IO was submitted on.  The default is to use\nan  unbound workqueue so that encryption work is automatically balanced between avail‐\nable CPUs.  This option is only relevant for open action.\n\nNOTE: This option is available only for low-level  dm-crypt  performance  tuning,  use\nonly if you need a change to default dm-crypt behaviour. Needs kernel 4.0 or later.\n\n--perf-submitfromcryptcpus\nDisable offloading writes to a separate thread after encryption.  There are some situ‐\nations where offloading write bios from the encryption threads to a single thread  de‐\ngrades  performance  significantly.   The default is to offload write bios to the same\nthread.  This option is only relevant for open action.\n\nNOTE: This option is available only for low-level  dm-crypt  performance  tuning,  use\nonly if you need a change to default dm-crypt behaviour. Needs kernel 4.0 or later.\n\n--perf-noreadworkqueue, --perf-nowriteworkqueue\nBypass  dm-crypt  internal workqueue and process read or write requests synchronously.\nThis option is only relevant for open action.\n\nNOTE: These options are available only for low-level dm-crypt performance tuning,  use\nonly if you need a change to default dm-crypt behaviour. Needs kernel 5.9 or later.\n",
                        "long": "--allow-discards"
                    },
                    {
                        "name": "--test-passphrase",
                        "content": "Do  not activate the device, just verify passphrase.  This option is only relevant for\nopen action (the device mapping name is not mandatory if this option is used).\n\n--header <device or file storing the LUKS header>\nUse a detached (separated) metadata device or file where the LUKS  header  is  stored.\nThis option allows one to store ciphertext and LUKS header on different devices.\n\nThis  option  is  only  relevant for LUKS devices and can be used with the luksFormat,\nopen, luksSuspend, luksResume, status and resize commands.\n\nFor luksFormat with a file name as the argument to --header, the file will be automat‐\nically  created if it does not exist.  See the cryptsetup FAQ for header size calcula‐\ntion.\n\nFor other commands that change the LUKS header (e.g. luksAddKey), specify  the  device\nor file with the LUKS header directly as the LUKS device.\n\nIf used with luksFormat, the --align-payload option is taken as absolute sector align‐\nment on ciphertext device and can be zero.\n\nWARNING: There is no check whether the ciphertext device specified actually belongs to\nthe  header  given. In fact, you can specify an arbitrary device as the ciphertext de‐\nvice for open with the --header option. Use with care.\n",
                        "long": "--test-passphrase"
                    },
                    {
                        "name": "--header-backup-file <file>",
                        "content": "Specify file with header backup for luksHeaderBackup or luksHeaderRestore actions.\n",
                        "long": "--header-backup-file",
                        "arg": "<file>"
                    },
                    {
                        "name": "--force-password",
                        "content": "Do not use password quality checking for new LUKS passwords.\n\nThis option applies only to luksFormat, luksAddKey and luksChangeKey and is ignored if\ncryptsetup is built without password quality checking support.\n\nFor  more info about password quality check, see the manual page for pwquality.conf(5)\nand passwdqc.conf(5).\n",
                        "long": "--force-password"
                    },
                    {
                        "name": "--deferred",
                        "content": "Defers device removal in close command until the last user closes it.\n",
                        "long": "--deferred"
                    },
                    {
                        "name": "--cancel-deferred",
                        "content": "Removes a previously configured deferred device removal in close command.\n",
                        "long": "--cancel-deferred"
                    },
                    {
                        "name": "--disable-external-tokens",
                        "content": "Disable loading of plugins for external LUKS2 tokens.\n",
                        "long": "--disable-external-tokens"
                    },
                    {
                        "name": "--disable-locks",
                        "content": "Disable lock protection for metadata on disk.  This option is valid only for LUKS2 and\nignored for other formats.\n\nWARNING:  Do not use this option unless you run cryptsetup in a restricted environment\nwhere locking is impossible to perform (where /run directory cannot be used).\n",
                        "long": "--disable-locks"
                    },
                    {
                        "name": "--disable-keyring",
                        "content": "Do not load volume key in kernel keyring and store it directly in the dm-crypt  target\ninstead.  This option is supported only for the LUKS2 format.\n",
                        "long": "--disable-keyring"
                    },
                    {
                        "name": "--key-description <text>",
                        "content": "Set key description in keyring for use with token command.\n",
                        "long": "--key-description",
                        "arg": "<text>"
                    },
                    {
                        "name": "--priority <normal|prefer|ignore>",
                        "content": "Set  a  priority for LUKS2 keyslot.  The prefer priority marked slots are tried before\nnormal priority.  The ignored priority means, that slot is never used, if not  explic‐\nitly requested by --key-slot option.\n",
                        "long": "--priority",
                        "arg": "<normal|prefer|ignore>"
                    },
                    {
                        "name": "--token-id",
                        "content": "Specify what token to use in actions token, open or resize.  If omitted, all available\ntokens will be checked before proceeding further with passphrase prompt.\n",
                        "long": "--token-id"
                    },
                    {
                        "name": "--token-only",
                        "content": "Do not proceed further with action (any of token, open or resize) if token  activation\nfailed. Without the option, action asks for passphrase to proceed further.\n",
                        "long": "--token-only"
                    },
                    {
                        "name": "--token-type",
                        "content": "Restrict  tokens  eligible  for operation to specific token type (name). Mostly useful\nwhen no --token-id is specified.\n",
                        "long": "--token-type"
                    },
                    {
                        "name": "--sector-size <bytes>",
                        "content": "Set sector size for use with disk encryption. It must be power of two and in range 512\n- 4096 bytes. This option is available only in the LUKS2 or plain modes.\n\nThe  default  for  plain  mode is 512 bytes. For LUKS2 devices it's established during\nluksFormat operation based on parameters provided by underlying data device.  For  na‐\ntive  4K  block devices it's 4096 bytes. For 4K/512e (4K physical sector size with 512\nbytes emulation) it's 4096 bytes. For drives reporting only 512 bytes  block  size  it\nremains 512 bytes. If data device is regular file put in filesystem it's 4096 bytes.\n\nNote that if sector size is higher than underlying device hardware sector and there is\nnot integrity protection that uses data journal, using this option can  increase  risk\non incomplete sector writes during a power fail.\n\nIf  used  together  with --integrity option and dm-integrity journal, the atomicity of\nwrites is guaranteed in all cases (but it cost write performance  -  data  has  to  be\nwritten twice).\n\nIncreasing  sector size from 512 bytes to 4096 bytes can provide better performance on\nmost of the modern storage devices and also with some hw encryption accelerators.\n",
                        "long": "--sector-size",
                        "arg": "<bytes>"
                    },
                    {
                        "name": "--iv-large-sectors",
                        "content": "Count Initialization Vector (IV) in larger sector size (if set) instead of  512  bytes\nsectors. This option can be used only for open command and plain encryption type.\n\nNOTE:  This  option  does not have any performance or security impact, use it only for\naccessing incompatible existing disk images from other systems that require  this  op‐\ntion.\n",
                        "long": "--iv-large-sectors"
                    },
                    {
                        "name": "--persistent",
                        "content": "If used with LUKS2 devices and activation commands like open or refresh, the specified\nactivation flags are persistently written into metadata and used next  time  automati‐\ncally  even for normal activation.  (No need to use cryptab or other system configura‐\ntion files.)\n\nIf you need to remove a persistent flag, use --persistent without the flag you want to\nremove  (e.g.  to  disable  persistently stored discard flag, use --persistent without\n--allow-discards).\n\nOnly    --allow-discards,    --perf-samecpucrypt,     --perf-submitfromcryptcpus,\n--perf-noreadworkqueue,  --perf-nowriteworkqueue and --integrity-no-journal can be\nstored persistently.\n",
                        "long": "--persistent"
                    },
                    {
                        "name": "--refresh",
                        "content": "Refreshes an active device with new set of parameters. See action refresh  description\nfor more details.\n",
                        "long": "--refresh"
                    },
                    {
                        "name": "--label <LABEL>",
                        "content": "--subsystem  <SUBSYSTEM>  Set label and subsystem description for LUKS2 device, can be\nused in config and format actions.  The label and subsystem are  optional  fields  and\ncan  be  later  used in udev scripts for triggering user actions once device marked by\nthese labels is detected.\n",
                        "long": "--label",
                        "arg": "<LABEL>"
                    },
                    {
                        "name": "--integrity <integrity algorithm>",
                        "content": "Specify integrity algorithm to be used for authenticated disk encryption in LUKS2.\n\nWARNING: This extension  is  EXPERIMENTAL  and  requires  dm-integrity  kernel  target\n(available since kernel version 4.12).  For native AEAD modes, also enable \"User-space\ninterface  for  AEAD  cipher  algorithms\"  in  \"Cryptographic   API\"   section   (CON‐\nFIGCRYPTOUSERAPIAEAD .config option).\n\nFor more info, see AUTHENTICATED DISK ENCRYPTION section.\n",
                        "long": "--integrity"
                    },
                    {
                        "name": "--luks2-metadata-size <size>",
                        "content": "This  option can be used to enlarge the LUKS2 metadata (JSON) area.  The size includes\n4096 bytes for binary metadata (usable JSON area is smaller of the binary area).   Ac‐\ncording  to  LUKS2  specification,  only these values are valid: 16, 32, 64, 128, 256,\n512, 1024, 2048 and 4096 kB The <size> can be specified with unit suffix (for  example\n128k).\n",
                        "long": "--luks2-metadata-size",
                        "arg": "<size>"
                    },
                    {
                        "name": "--luks2-keyslots-size <size>",
                        "content": "This option can be used to set specific size of the LUKS2 binary keyslot area (key ma‐\nterial is encrypted there). The value must be aligned to multiple of 4096  bytes  with\nmaximum size 128MB.  The <size> can be specified with unit suffix (for example 128k).\n",
                        "long": "--luks2-keyslots-size",
                        "arg": "<size>"
                    },
                    {
                        "name": "--keyslot-cipher <cipher-spec>",
                        "content": "This option can be used to set specific cipher encryption for the LUKS2 keyslot area.\n",
                        "long": "--keyslot-cipher",
                        "arg": "<cipher-spec>"
                    },
                    {
                        "name": "--keyslot-key-size <bits>",
                        "content": "This option can be used to set specific key size for the LUKS2 keyslot area.\n",
                        "long": "--keyslot-key-size",
                        "arg": "<bits>"
                    },
                    {
                        "name": "--integrity-no-journal",
                        "content": "Activate  device with integrity protection without using data journal (direct write of\ndata and integrity tags).  Note that without journal power fail can  cause  non-atomic\nwrite  and data corruption.  Use only if journalling is performed on a different stor‐\nage layer.\n",
                        "long": "--integrity-no-journal"
                    },
                    {
                        "name": "--integrity-no-wipe",
                        "content": "Skip wiping of device authentication (integrity) tags. If you skip this step,  sectors\nwill report invalid integrity tag until an application write to the sector.\n\nNOTE: Even some writes to the device can fail if the write is not aligned to page size\nand page-cache initiates read of a sector with invalid integrity tag.\n",
                        "long": "--integrity-no-wipe"
                    },
                    {
                        "name": "--unbound",
                        "content": "Creates new or dumps existing LUKS2 unbound keyslot. See luksAddKey  or  luksDump  ac‐\ntions for more details.\n\n",
                        "long": "--unbound"
                    },
                    {
                        "name": "--tcrypt-hidden",
                        "content": "--tcrypt-system --tcrypt-backup Specify which TrueCrypt on-disk header will be used to\nopen the device.  See TCRYPT section for more info.\n",
                        "long": "--tcrypt-hidden"
                    },
                    {
                        "name": "--veracrypt",
                        "content": "This option is ignored as VeraCrypt compatible mode is supported by default.\n",
                        "long": "--veracrypt"
                    },
                    {
                        "name": "--disable-veracrypt",
                        "content": "This option can be used to disable VeraCrypt compatible mode (only  TrueCrypt  devices\nare recognized). Only for TCRYPT extension. See TCRYPT section for more info.\n",
                        "long": "--disable-veracrypt"
                    },
                    {
                        "name": "--veracrypt-pim",
                        "content": "--veracrypt-query-pim  Use  a custom Personal Iteration Multiplier (PIM) for VeraCrypt\ndevice.  See TCRYPT section for more info.\n",
                        "long": "--veracrypt-pim"
                    },
                    {
                        "name": "--serialize-memory-hard-pbkdf",
                        "content": "Use a global lock to serialize unlocking of keyslots using memory-hard PBKDF.\n\nNOTE: This is (ugly) workaround for a specific situation when multiple devices are ac‐\ntivated  in parallel and system instead of reporting out of memory starts uncondition‐\nally stop processes using out-of-memory killer.\n\nDO NOT USE this switch until you are implementing boot environment with  parallel  de‐\nvices activation!\n",
                        "long": "--serialize-memory-hard-pbkdf"
                    },
                    {
                        "name": "--encrypt",
                        "content": "Initialize (and run) device encryption (reencrypt action parameter)\n",
                        "long": "--encrypt"
                    },
                    {
                        "name": "--decrypt",
                        "content": "Initialize (and run) device decryption (reencrypt action parameter)\n",
                        "long": "--decrypt"
                    },
                    {
                        "name": "--init-only",
                        "content": "Initialize  reencryption  (any  variant) operation in LUKS2 metadata only and exit. If\nany  reencrypt  operation  is  already  initialized  in  metadata,  the  command  with\n--init-only parameter fails.\n",
                        "long": "--init-only"
                    },
                    {
                        "name": "--resume-only",
                        "content": "Resume reencryption (any variant) operation already described in LUKS2 metadata. If no\nreencrypt operation is initialized, the command with  --resume-only  parameter  fails.\nUseful  for resuming reencrypt operation without accidentally triggering new reencryp‐\ntion operation.\n",
                        "long": "--resume-only"
                    },
                    {
                        "name": "--resilience <mode>",
                        "content": "Reencryption resilience mode can be one of checksum, journal or none.\n\nchecksum: default mode, where individual checksums of ciphertext hotzone  sectors  are\nstored, so the recovery process can detect which sectors were already reencrypted.  It\nrequires that the device sector write is atomic.\n\njournal: the hotzone is journaled in the binary area (so the data are written twice).\n\nnone: performance mode. There is no protection and the only way it's safe to interrupt\nthe reencryption is similar to old offline reencryption utility. (ctrl+c).\n\nThe option is ignored if reencryption with datashift mode is in progress.\n",
                        "long": "--resilience",
                        "arg": "<mode>"
                    },
                    {
                        "name": "--resilience-hash <hash>",
                        "content": "The  hash  algorithm  used  with  \"--resilience  checksum\"  only.  The default hash is\nsha256. With other resilience modes, the hash parameter is ignored.\n",
                        "long": "--resilience-hash",
                        "arg": "<hash>"
                    },
                    {
                        "name": "--hotzone-size <size>",
                        "content": "This option can be used to set an upper limit on the size of reencryption  area  (hot‐\nzone).   The <size> can be specified with unit suffix (for example 50M). Note that ac‐\ntual hotzone size may be less than specified <size> due  to  other  limitations  (free\nspace in keyslots area or available memory).\n",
                        "long": "--hotzone-size",
                        "arg": "<size>"
                    },
                    {
                        "name": "--reduce-device-size <size>",
                        "content": "Initialize  LUKS2  reencryption  with data device size reduction (currently only --en‐\ncrypt variant is supported).\n\nLast <size> sectors of <device> will be used to properly initialize  device  reencryp‐\ntion.  That means any data at last <size> sectors will be lost.\n\nIt  could  be useful if you added some space to underlying partition or logical volume\n(so last <size> sectors contains no data).\n\nRecommended minimal size is twice the default LUKS2 header size  (--reduce-device-size\n32M)  for  --encrypt  use  case. Be sure to have enough (at least --reduce-device-size\nvalue      of free space at the end of <device>).\n\nWARNING: This is a destructive operation and cannot be  reverted.   Use  with  extreme\ncare - accidentally overwritten filesystems are usually unrecoverable.\n",
                        "long": "--reduce-device-size",
                        "arg": "<size>"
                    },
                    {
                        "name": "--version",
                        "content": "Show the program version.\n",
                        "long": "--version"
                    },
                    {
                        "name": "--usage",
                        "content": "Show short option help.\n",
                        "long": "--usage"
                    },
                    {
                        "name": "--help, -?",
                        "content": "Show help text and default parameters.\n",
                        "flag": "-?",
                        "long": "--help"
                    }
                ]
            },
            "EXAMPLE": {
                "content": "Example 1: Create LUKS 2 container on block device /dev/sdX.\nsudo cryptsetup --type luks2 luksFormat /dev/sdX\n\nExample 2: Add an additional passphrase to key slot 5.\nsudo cryptsetup luksAddKey --key-slot 5 /dev/sdX\n\nExample 3: Create LUKS header backup and save it to file.\nsudo  cryptsetup luksHeaderBackup /dev/sdX --header-backup-file /var/tmp/NameOfBackup‐\nFile\n\nExample 4: Open LUKS container on /dev/sdX and map it to sdXcrypt.\nsudo cryptsetup open /dev/sdX sdXcrypt\n",
                "subsections": [
                    {
                        "name": "WARNING: The command in example 5 will erase all key slots.",
                        "content": "Your cannot use your luks container afterwards anymore unless you have a backup to re‐\nstore.\n\nExample 5: Erase all key slots on /dev/sdX.\nsudo cryptsetup erase /dev/sdX\n\nExample 6: Restore LUKS header from backup file.\nsudo cryptsetup luksHeaderRestore /dev/sdX --header-backup-file /var/tmp/NameOfBackup‐\nFile\n"
                    }
                ]
            },
            "RETURN CODES": {
                "content": "Cryptsetup returns 0 on success and a non-zero value on error.\n\nError codes are: 1 wrong parameters, 2 no permission (bad passphrase), 3  out  of  memory,  4\nwrong device specified, 5 device already exists or device is busy.\n",
                "subsections": []
            },
            "NOTES ON PASSPHRASE PROCESSING FOR PLAIN MODE": {
                "content": "Note  that no iterated hashing or salting is done in plain mode.  If hashing is done, it is a\nsingle direct hash. This means that low-entropy passphrases are easy to attack in plain mode.\n\nFrom a terminal: The passphrase is read until the first newline, i.e. '\\n'.  The input  with‐\nout  the  newline  character  is  processed  with the default hash or the hash specified with\n--hash.  The hash result will be truncated to the key size of the used cipher,  or  the  size\nspecified with -s.\n\nFrom  stdin:  Reading  will  continue  until  a  newline  (or until the maximum input size is\nreached), with the trailing newline stripped. The maximum input size is defined by  the  same\ncompiled-in  default as for the maximum key file size and can be overwritten using --keyfile-\nsize option.\n\nThe data read will be hashed with the default hash or the hash specified  with  --hash.   The\nhash  result will be truncated to the key size of the used cipher, or the size specified with\n-s.\n\nNote that if --key-file=- is used for reading the key from stdin, trailing newlines  are  not\nstripped from the input.\n\nIf \"plain\" is used as argument to --hash, the input data will not be hashed. Instead, it will\nbe zero padded (if shorter than the key size) or truncated (if longer than the key size)  and\nused  directly  as  the  binary key. This is useful for directly specifying a binary key.  No\nwarning will be given if the amount of data read from stdin is less than the key size.\n\nFrom a key file: It will be truncated to the key size of the used cipher or the size given by\n-s and directly used as a binary key.\n\nWARNING:  The  --hash  argument is being ignored.  The --hash option is usable only for stdin\ninput in plain mode.\n\nIf the key file is shorter than the key, cryptsetup will quit with an error.  The maximum in‐\nput  size is defined by the same compiled-in default as for the maximum key file size and can\nbe overwritten using --keyfile-size option.\n\n\n",
                "subsections": []
            },
            "NOTES ON PASSPHRASE PROCESSING FOR LUKS": {
                "content": "LUKS uses PBKDF2 to protect against dictionary attacks and to give some protection to low-en‐\ntropy passphrases (see RFC 2898 and the cryptsetup FAQ).\n\nFrom  a terminal: The passphrase is read until the first newline and then processed by PBKDF2\nwithout the newline character.\n\nFrom stdin: LUKS will read passphrases from stdin up to the first newline  character  or  the\ncompiled-in maximum key file length. If --keyfile-size is given, it is ignored.\n\nFrom key file: The complete keyfile is read up to the compiled-in maximum size. Newline char‐\nacters do not terminate the input. The --keyfile-size option can be used  to  limit  what  is\nread.\n\nPassphrase  processing: Whenever a passphrase is added to a LUKS header (luksAddKey, luksFor‐\nmat), the user may specify how much the time the passphrase processing  should  consume.  The\ntime  is  used to determine the iteration count for PBKDF2 and higher times will offer better\nprotection  for  low-entropy  passphrases,  but  open  will  take  longer  to  complete.  For\npassphrases  that  have  entropy higher than the used key length, higher iteration times will\nnot increase security.\n\nThe default setting of one or two seconds is sufficient for most practical  cases.  The  only\nexception  is  a low-entropy passphrase used on a device with a slow CPU, as this will result\nin a low iteration count. On a slow device, it may be advisable  to  increase  the  iteration\ntime using the --iter-time option in order to obtain a higher iteration count. This does slow\ndown all later luksOpen operations accordingly.\n",
                "subsections": []
            },
            "INCOHERENT BEHAVIOR FOR INVALID PASSPHRASES/KEYS": {
                "content": "LUKS checks for a valid passphrase when an encrypted partition is unlocked. The  behavior  of\nplain  dm-crypt is different.  It will always decrypt with the passphrase given. If the given\npassphrase is wrong, the device mapped by plain dm-crypt will essentially still  contain  en‐\ncrypted data and will be unreadable.\n",
                "subsections": [
                    {
                        "name": "NOTES ON SUPPORTED CIPHERS, MODES, HASHES AND KEY SIZES",
                        "content": "The  available combinations of ciphers, modes, hashes and key sizes depend on kernel support.\nSee /proc/crypto for a list of available options. You might need to  load  additional  kernel\ncrypto modules in order to get more options.\n\nFor  the  --hash option, if the crypto backend is libgcrypt, then all algorithms supported by\nthe gcrypt library are available.  For other crypto backends, some algorithms may be missing.\n"
                    }
                ]
            },
            "NOTES ON PASSPHRASES": {
                "content": "Mathematics can't be bribed. Make sure you keep your passphrases safe.  There are a few  nice\ntricks  for constructing a fallback, when suddenly out of the blue, your brain refuses to co‐\noperate.  These fallbacks need LUKS, as  it's  only  possible  with  LUKS  to  have  multiple\npassphrases.  Still, if your attacker model does not prevent it, storing your passphrase in a\nsealed envelope somewhere may be a good idea as well.\n",
                "subsections": []
            },
            "NOTES ON RANDOM NUMBER GENERATORS": {
                "content": "Random Number Generators (RNG) used in cryptsetup are always the kernel RNGs without any mod‐\nifications or additions to data stream produced.\n\nThere  are  two  types  of  randomness  cryptsetup/LUKS  needs.  One  type (which always uses\n/dev/urandom) is used for salts, the AF splitter and for wiping deleted keyslots.\n\nThe second type is used for the volume (master) key. You can switch between using /dev/random\nand  /dev/urandom   here,  see --use-random and --use-urandom options. Using /dev/random on a\nsystem without enough entropy sources can cause  luksFormat  to  block  until  the  requested\namount  of  random  data  is gathered. In a low-entropy situation (embedded system), this can\ntake a very long time and potentially forever. At the same time, using /dev/urandom in a low-\nentropy situation will produce low-quality keys. This is a serious problem, but solving it is\nout of scope for a mere man-page.  See urandom(4) for more information.\n",
                "subsections": [
                    {
                        "name": "AUTHENTICATED DISK ENCRYPTION (EXPERIMENTAL)",
                        "content": "Since Linux kernel version 4.12 dm-crypt supports authenticated disk encryption.\n\nNormal disk encryption modes are length-preserving (plaintext sector is of the same size as a\nciphertext sector) and can provide only confidentiality protection, but not cryptographically\nsound data integrity protection.\n\nAuthenticated modes require additional space per-sector for authentication tag  and  use  Au‐\nthenticated Encryption with Additional Data (AEAD) algorithms.\n\nIf you configure LUKS2 device with data integrity protection, there will be an underlying dm-\nintegrity device, which provides additional per-sector metadata space and also  provide  data\njournal  protection  to  ensure atomicity of data and metadata update.  Because there must be\nadditional space for metadata and journal, the available space for the device will be smaller\nthan for length-preserving modes.\n\nThe  dm-crypt  device  then resides on top of such a dm-integrity device.  All activation and\ndeactivation of this device stack is performed by cryptsetup, there is no difference in using\nluksOpen  for  integrity protected devices.  If you want to format LUKS2 device with data in‐\ntegrity protection, use --integrity option.\n\nSince dm-integrity doesn't support discards (TRIM), dm-crypt device on  top  of  it  inherits\nthis, so integrity protection mode doesn't support discards either.\n\nSome  integrity  modes  requires two independent keys (key for encryption and for authentica‐\ntion). Both these keys are stored in one LUKS keyslot.\n\nWARNING: All support for authenticated modes is experimental and there are  only  some  modes\navailable  for  now.  Note that there are a very few authenticated encryption algorithms that\nare suitable for disk encryption. You also cannot use CRC32 or  any  other  non-cryptographic\nchecksums (other than the special integrity mode \"none\"). If for some reason you want to have\nintegrity control without using authentication mode, then you should separately configure dm-\nintegrity independently of LUKS2.\n\n"
                    }
                ]
            },
            "NOTES ON LOOPBACK DEVICE USE": {
                "content": "Cryptsetup  is  usually  used directly on a block device (disk partition or LVM volume). How‐\never, if the device argument is a file, cryptsetup tries to allocate a  loopback  device  and\nmap  it  into this file. This mode requires Linux kernel 2.6.25 or more recent which supports\nthe loop autoclear flag (loop device is cleared on the last close automatically). Of  course,\nyou can always map a file to a loop-device manually. See the cryptsetup FAQ for an example.\n\nWhen  device  mapping is active, you can see the loop backing file in the status command out‐\nput. Also see losetup(8).\n",
                "subsections": [
                    {
                        "name": "LUKS2 header locking",
                        "content": "The LUKS2 on-disk metadata is updated in several steps and to achieve proper  atomic  update,\nthere  is  a locking mechanism.  For an image in file, code uses flock(2) system call.  For a\nblock device, lock is performed over a special file stored in a locking directory (by default\n/run/lock/cryptsetup).  The locking directory should be created with the proper security con‐\ntext by the distribution during the boot-up phase.  Only LUKS2 uses locks, other  formats  do\nnot use this mechanism.\n"
                    }
                ]
            },
            "DEPRECATED ACTIONS": {
                "content": "The  reload action is no longer supported.  Please use dmsetup(8) if you need to directly ma‐\nnipulate with the device mapping table.\n\nThe luksDelKey was replaced with luksKillSlot.\n",
                "subsections": []
            },
            "REPORTING BUGS": {
                "content": "Report bugs, including ones in the documentation, on the  cryptsetup  mailing  list  at  <dm-\ncrypt@saout.de>  or in the 'Issues' section on LUKS website.  Please attach the output of the\nfailed command with the --debug option added.\n",
                "subsections": []
            },
            "AUTHORS": {
                "content": "cryptsetup originally written by Jana Saout <jana@saout.de>\nThe LUKS extensions and original man page were written by Clemens  Fruhwirth  <clemens@endor‐\nphin.org>.\nMan page extensions by Milan Broz <gmazyland@gmail.com>.\nMan page rewrite and extension by Arno Wagner <arno@wagner.name>.\n",
                "subsections": []
            },
            "COPYRIGHT": {
                "content": "Copyright © 2004 Jana Saout\nCopyright © 2004-2006 Clemens Fruhwirth\nCopyright © 2012-2014 Arno Wagner\nCopyright © 2009-2021 Red Hat, Inc.\nCopyright © 2009-2021 Milan Broz\n\nThis is free software; see the source for copying conditions.  There is NO warranty; not even\nfor MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.\n",
                "subsections": []
            },
            "SEE ALSO": {
                "content": "The LUKS website at https://gitlab.com/cryptsetup/cryptsetup/\n\nThe cryptsetup FAQ,  contained  in  the  distribution  package  and  online  at  https://git‐‐",
                "subsections": [
                    {
                        "name": "lab.com/cryptsetup/cryptsetup/wikis/FrequentlyAskedQuestions",
                        "content": "The cryptsetup mailing list and list archive, see FAQ entry 1.6.\n\nThe  LUKS  version  1  on-disk  format  specification  available at https://gitlab.com/crypt‐‐\nsetup/cryptsetup/wikis/Specification  and  LUKS  version   2   at   https://gitlab.com/crypt‐‐\nsetup/LUKS2-docs.\n\n\n\ncryptsetup                                  January 2021                               CRYPTSETUP(8)"
                    }
                ]
            }
        }
    }
}