CRYPTSETUP(8) (NAME) cryptsetup - dm-crypt (SYNOPSIS) cryptsetup [] [ ] (DESCRIPTION) cryptsetup dm-crypt device-mapper . dm-crypt LUKS . LUKS dm-crypt . . cryptsetup loop-AES TrueCrypt VeraCrypt BitLocker FileVault2 OPAL . cryptsetup cryptsetup-(8) cryptsetup . (BASIC ACTIONS) . (OPEN) open --type ( ). cryptsetup-open(8). (CLOSE) close . cryptsetup-close(8). (STATUS) status . cryptsetup-status(8). (RESIZE) resize . cryptsetup-resize(8). (REFRESH) refresh . cryptsetup-refresh(8). (REENCRYPT) reencrypt or --active-name [] LUKS . cryptsetup-reencrypt(8). (PLAIN MODE) dm-crypt Salt . . . () . /dev/mapper/ . (plain) : (OPEN) open --type plain create ( ) ( ). cryptsetup-open(8). (LUKS EXTENSION) LUKS ( Linux Unified Key Setup) . . ' LUKS' ( LUKS container) . LUKS ' LUKS' . . LUKS LUKS LUKS . LUKS (anti-forensic stripes) . (brute-force) (PBKDF) . LUKS2 PBKDF (authenticated encryption) . luksFormat --type luks2 LUKS2 . . . . UUID LUKS UUID= . /dev/disk/by-uuid . (detached header) --header LUKS . LUKS : (FORMAT) luksFormat [] LUKS ( ). cryptsetup-luksFormat(8). (OPEN) open --type luks luksOpen ( ) LUKS . cryptsetup-open(8). (SUSPEND) luksSuspend ( / ) . cryptsetup-luksSuspend(8). (RESUME) luksResume . cryptsetup-luksResume(8). (ADD KEY) luksAddKey [] . cryptsetup-luksAddKey(8). (REMOVE KEY) luksRemoveKey [] LUKS . cryptsetup-luksRemoveKey(8). (CHANGE KEY) luksChangeKey [] . cryptsetup-luksChangeKey(8). (CONVERT KEY) luksConvertKey LUKS2 PBKDF . cryptsetup-luksConvertKey(8). (KILL SLOT) luksKillSlot LUKS . cryptsetup-luksKillSlot(8). (ERASE) erase luksErase ( ) LUKS . cryptsetup-erase(8). (UUID) luksUUID UUID LUKS . cryptsetup-luksUUID(8). (IS LUKS) isLuks LUKS (true) (false) . cryptsetup-isLuks(8). (DUMP) luksDump LUKS . cryptsetup-luksDump(8). (HEADER BACKUP) luksHeaderBackup --header-backup-file LUKS . cryptsetup-luksHeaderBackup(8). (HEADER RESTORE) luksHeaderRestore --header-backup-file LUKS . cryptsetup-luksHeaderRestore(8). (TOKEN) token . cryptsetup-token(8). (CONVERT) convert --type LUKS1 LUKS2 . cryptsetup-convert(8). (CONFIG) config ( LUKS ). cryptsetup-config(8). LOOP-AES (LOOP-AES EXTENSION) cryptsetup loop-AES . (OPEN) open --type loopaes --key-file loopaesOpen --key-file ( ) loop-AES . cryptsetup-open(8). FAQ loop-AES loop-AES . TCRYPT ( TRUECRYPT VERACRYPT) cryptsetup TrueCrypt tcplay VeraCrypt . TCRYPT cryptsetup TCRYPT . TCRYPT ( 2.6.38). "User-space interface for symmetric key cipher algorithms" "Cryptographic API" ( CRYPTO_USER_API_SKCIPHER). TCRYPT . cryptsetup LRW ( Blowfish LRW ). VeraCrypt TrueCrypt . VeraCrypt PIM ( Personal Iteration Multiplier) --veracrypt-pim= PIM --veracrypt-query-pim PIM . PIM . PIM . VeraCrypt --disable-veracrypt . : tcryptOpen LRW XTS . tcryptDump TCRYPT () . ( ) --tcrypt-system . ( ) . TCRYPT (losetup -P losetup(8) ) . . cryptsetup TCRYPT . ( ) --tcrypt-hidden . () --tcrypt-backup . : (mount) . . (OPEN) open --type tcrypt tcryptOpen ( ) TCRYPT ( TrueCrypt) . cryptsetup-open(8). (DUMP) tcryptDump TCRYPT . cryptsetup-tcryptDump(8). TrueCrypt VeraCrypt . cryptsetup TrueCrypt VeraCrypt cryptsetup . BITLK ( BITLOCKER ) cryptsetup BitLocker BitLocker to Go . BITLK cryptsetup BITLK . BITLK ( TCRYPT ). cryptsetup BITLK Windows Vista BitLocker . CBC 5.3 Elephant 5.6 . bitlkDump BITLK () . open (startup key) . . BitLocker ( FVEK) --volume-key-file . ( // ). ( TPM ) . (OPEN) open --type bitlk bitlkOpen ( ) BITLK ( BitLocker) . cryptsetup-open(8). (DUMP) bitlkDump BITLK . cryptsetup-bitlkDump(8). cryptsetup Windows BitLocker cryptsetup . FVAULT2 ( FILEVAULT2 ) cryptsetup FileVault2 ( FileVault2) macOS . : cryptsetup FileVault2 Core Storage +HFS ( MacOS X 10.7 Lion) . FileVault APFS macOS . FVAULT2 cryptsetup FVAULT2 . FVAULT2 ( TCRYPT ) +HFS ( hfsplus) . cryptsetup . fvault2Dump FVAULT2 . open . . (OPEN) open --type fvault2 fvault2Open ( ) FVAULT2 ( FileVault2) ( ) . cryptsetup-open(8). SED ( ) OPAL cryptsetup OPAL dm-crypt . LUKS2 LUKS2 ( : ). : 6.4 . . --hw-opal OPAL + dm-crypt --hw-opal-only OPAL dm-crypt . LUKS2 dm-crypt . LUKS2 . subsystem HW-OPAL OPAL . (FORMAT) luksFormat --type luks2 --hw-opal [] dm-crypt --hw-opal --hw-opal-only . . (ERASE) erase . . --hw-opal-factory-reset PSID ( ) . : LUKS2. (MISCELLANEOUS ACTIONS) (REPAIR) repair . LUKS . cryptsetup-repair(8). (BENCHMARK) benchmark KDF ( ) . cryptsetup-benchmark(8). DM-CRYPT LUKS LUKS . dm-crypt . LUKS . (WARNINGS) Cryptsetup FAQ . . . : . . . Cryptsetup FAQ . (Character encoding): . . ASCII UTF-8 cryptsetup . (7-bit ASCII) 7-bit ASCII ASCII UTF-8 . LUKS: LUKS . . LUKS ! LUKS . : LUKS dm-crypt . wipefs(8) . . MD RAID . . . Cryptsetup FAQ . (EXAMPLES) : LUKS 2 /dev/sdX. sudo cryptsetup --type luks2 luksFormat /dev/sdX : . sudo cryptsetup luksAddKey --key-slot 5 /dev/sdX : LUKS . sudo cryptsetup luksHeaderBackup /dev/sdX --header-backup-file /var/tmp/NameOfBackupFile : LUKS /dev/sdX sdX_crypt. sudo cryptsetup open /dev/sdX sdX_crypt : . LUKS . : /dev/sdX. sudo cryptsetup erase /dev/sdX : LUKS . sudo cryptsetup luksHeaderRestore /dev/sdX --header-backup-file /var/tmp/NameOfBackupFile (RETURN CODES) cryptsetup 0 . : 1 2 ( ) 3 4 5 . (NOTES) (Passphrase processing for PLAIN mode) Salt . . . : '\n' . --hash . -s . (stdin): ( ) . --keyfile-size . --hash . -s . --key-file=- stdin . "plain" --hash . ( ) ( ) . . stdin . : -s . : --hash . --hash stdin . cryptsetup . --keyfile-size . LUKS (Passphrase processing for LUKS) LUKS PBKDF ( Cryptsetup FAQ ). : PBKDF2 . (stdin): LUKS stdin . --keyfile-size . --keyfile-size . : LUKS ( luksAddKey luksFormat) . PBKDF2 . . . . --iter-time . luksOpen . / (Incoherent behavior for invalid passphrases/keys) LUKS . dm-crypt . dm-crypt . (Supported ciphers, modes, hashes and key sizes) . /proc/crypto . . --hash libgcrypt gcrypt . . (Notes on passphrases) ! . . LUKS LUKS . . (Notes on Random Number Generators) (RNG) cryptsetup RNG . cryptsetup/LUKS . ( /dev/urandom ) Salt AF . . /dev/random /dev/urandom --use-random --use-urandom . /dev/random luksFormat . ( ) . /dev/urandom . . urandom(4) . [] (Authenticated disk encryption - EXPERIMENTAL) 4.12 dm-crypt . ( ) . (AEAD) . LUKS2 dm-integrity . . dm-crypt dm-integrity . cryptsetup luksOpen . LUKS2 --integrity ( cryptsetup-luksFormat(8)). 5.7 TRIM dm-integrity cryptsetup(8) discard (TRIM) dm-crypt dm-integrity ( --allow-discards cryptsetup-luksFormat(8)). ( ). LUKS . : . . CRC32 ( "none"). dm-integrity LUKS2 . (Notes on loopback device use) cryptsetup ( LVM) . cryptsetup . 2.6.25 loop autoclear ( ). . Cryptsetup FAQ . status . losetup(8) . LUKS2 (LUKS2 header locking) LUKS2 . flock(2) . ( /run/cryptsetup) . . LUKS2 . LUKS (LUKS on-disk format specification) LUKS LUKS1 LUKS2 . (AUTHORS) cryptsetup Jana Saout . . LUKS Clemens Fruhwirth . . Milan Broz . Arno Wagner . (REPORTING BUGS) cryptsetup . . --debug . (SEE ALSO) Cryptsetup FAQ cryptsetup(8), integritysetup(8) veritysetup(8) CRYPTSETUP cryptsetup . cryptsetup 2.7.5 2025-05-04 CRYPTSETUP(8)