luks · shipping · also Linux Unified Key Setup

LUKS

LUKS is a disk-encryption metadata format that stores cipher parameters and keyslots so that several passphrases or keys can unlock one volume key.

Related Observatory article: Read on hesela.com

LUKS1 has a binary header and eight keyslots for independent passphrases that unlock one volume key. LUKS2 stores most metadata in JSON and limits keyslots only by header area size, while the reference implementation allows 32. Its binary header occupies one 4096-byte sector, of which 512 bytes are used, and the secondary header starts at one of nine fixed offsets from 16 KiB to 4 MiB. [4] The format names no particular cipher, and integrity protection stacks the encryption mapping on a dm-integrity device. LUKS2 can also manage hardware encryption on OPAL self-encrypting drives with Linux 6.4 or later. [1]

Relations

related
LUKS header backup, LUKS keyslot, dm-crypt, XTS-AES, Authenticated encryption, Backup, Cryptographic erase

Advantages

  • Primary and secondary copies of the binary and JSON areas, together with a metadata checksum, allow a damaged header to be detected and recovered. [4]
  • Passphrases can be revoked or changed individually because each one uses its own keyslot. [1]

Limitations

  • Recovery copies of the header/keyslots are security-sensitive, not harmless configuration exports. [2]
  • Binary keyslot data have no redundant copy, so damage to a keyslot area is not repaired from the secondary header. [4]
  • In authenticated encryption mode, discards cannot be passed through because the kernel encryption target does not support them when dm-integrity provides tag space. [1]

Citations

  1. cryptsetup v2.8.1 manual: LUKS, authenticated disk encryption and OPAL extension (accessed 2026-10-23)
  2. cryptsetup-luksHeaderBackup(8): header backups and retained decryption access (accessed 2026-10-15)
  3. Broz. LUKS2 On-Disk Format Specification, version 1.1.4 (2025-06-16), sections 1-2. (accessed 2026-10-23)

Further reading

  1. Hesela: Encryption is not authentication (accessed 2026-10-15)
Sources & caveats
  • luks2-spec is the LUKS2 On-Disk Format Specification version 1.1.4, read in sections 1 and 2 for keyslot limits, header layout and offsets.
  • cryptsetup-source is the v2.8.1 reference manual page, read for keyslots, authenticated disk encryption, discard support and the OPAL extension.
  • luks-header was not re-read and is kept only for the existing header-backup limitation.

JSON: /data/terms/luks.json

Published by Hesela team · Updated

Report a correction · Editorial standards · Reuse guidance

Cite this page
Hesela team. LUKS. Hesela. 2026-10-23. https://hesela.dev/terms/luks/