Skip to content

LUKS Encryption with TPM

Athena OS supports LUKS encryption for full-disk or root partition encryption with TPM 2.0.
Optionally, in Athena Arch, the encryption key can be automatically stored and managed by the TPM (Trusted Platform Module), providing secure key handling without requiring you to manually type a passphrase on every boot.

This integration is handled automatically by Aegis Installer, which can detect your TPM device and configure LUKS to unlock the encrypted partition using the TPM key at boot time.

By integrating LUKS with TPM, Athena OS ensures a high level of data protection while maintaining usability and system integrity.


LUKS (Linux Unified Key Setup) provides strong disk encryption by securing your partitions with AES-based cryptography.

When combined with TPM, the decryption key is securely sealed within the TPM hardware and can be unsealed only under the same platform configuration (PCR values).

In practice:

  1. The partition (usually /) is encrypted with LUKS.
  2. A keyslot is added to LUKS that uses a TPM-stored key.
  3. At boot, systemd-cryptsetup (or clevis) retrieves the key from the TPM to unlock the partition automatically.

This ensures that:

  • Your encryption key never leaves the TPM chip.
  • The system can auto-unlock without manual password entry (optional).
  • The disk remains unreadable if removed or the platform changes significantly.

During installation with Aegis, you can choose to:

  • Encrypt ROOT (LUKS) - a passphrase is requested.
  • Bind the key to TPM - if TPM is detected, Aegis will store the decryption key securely in the TPM and configure automatic unlocking.

You can manage TPM-bound LUKS keys using systemd-cryptenroll or clevis.
For example:

Terminal window
sudo systemd-cryptenroll --tpm2-device=auto /dev/nvme0n1p3

This command will create a TPM2-bound keyslot for the encrypted partition /dev/nvme0n1p3. If the TPM is cleared or replaced, this keyslot becomes invalid, hence why backups or recovery passphrases are essential.

To verify TPM enrollment:

Terminal window
sudo systemd-cryptenroll --list /dev/nvme0n1p3

PCRs (Platform Configuration Registers) are small memory registers inside the TPM that store cryptographic measurements of critical system components taken during boot. Each PCR represents a stage of the boot process, from firmware and bootloader to kernel and Secure Boot data. These measurements ensure that the TPM will only release the LUKS decryption key if the system’s boot components match the same trusted state recorded during enrollment.

PCRDescriptionExtended by
PCR0Core System Firmware executable code (aka Firmware). May change if you upgrade your UEFI.Firmware
PCR1Core System Firmware data (aka UEFI settings; configured boot order, for example)Firmware
PCR2Extended or pluggable executable code (aka OpROMs)Firmware
PCR3Extended or pluggable firmware data. Set during Boot Device Select UEFI boot phase.Firmware
PCR4Boot Manager Code and Boot Attempts. Measures the boot manager and the devices that the firmware tried to boot from.Firmware
PCR5Boot Manager Configuration and Data. Can measure configuration of boot loaders; includes the GPT Partition Table.Firmware
PCR6Resume from S4 and S5 Power State EventsFirmware
PCR7Secure Boot State. Contains the full contents of PK/KEK/db, as well as the specific certificates used to validate each boot applicationFirmware, shim (adds MokList, MokListX, and MokSBState)
PCR8Hash of the kernel command lineGRUB
PCR9Hash of the initramfs and EFI Load OptionsLinux (measures the initramfs and EFI Load Options, essentially the kernel cmdline options)
PCR10Reserved for Future Use
PCR11Hash of the Unified kernel imagesystemd-stub
PCR12Overridden kernel command line, Credentialssystemd-stub
PCR13System Extensionssystemd-stub
PCR14shim’s MokList, MokListX, and MokSBState.shim
PCR15Hash of the LUKS volume keysystemd-cryptsetup
PCR16Debug. May be used and reset at any time. May be absent from an official firmware release.
PCR23Application Support. The OS can set and reset this PCR.

What happens when PCRs change?

Athena OS uses PCR7, PCR9, PCR11, PCR14 registries. During each boot, Athena OS measures firmware, bootloader, and kernel components into TPM registers (PCRs). If the current measurements match those taken when the LUKS key was enrolled, the TPM releases the key automatically. If they differ, for example, after firmware or kernel updates, or potential tampering on kernel, firmware or bootloader, the TPM refuses to unseal the key. In that case, you’ll be prompted to enter your LUKS passphrase manually. Once booted, you can safely re-enroll the TPM keyslot to reflect the new measurements.

Important Warnings for Dual Boot with Windows

Section titled “Important Warnings for Dual Boot with Windows”

If you are dual booting with Windows that uses BitLocker, be extremely careful.

BitLocker also stores its encryption keys in the same TPM chip.

Before performing any TPM operations from Linux:

  1. Backup your BitLocker recovery key. You can find it in your Microsoft Account → https://account.microsoft.com/devices/recoverykey

  2. Suspend BitLocker protection from Windows before manipulating TPM.

    Terminal window
    manage-bde -protectors -disable C:
  3. After operations are done, re-enable protection:

    Terminal window
    manage-bde -protectors -enable C:

If you previously used BitLocker and reinstalled Athena on the same system, it is highly recommended to clear TPM only after backing up all Windows recovery keys.

If you lose TPM access or reinstall your firmware, your TPM keyslot will no longer unlock your LUKS partition automatically, and you will be asked to manually enter the LUKS passphrase. You can unlock it using your manual passphrase entered during Athena OS installation.

Once ologged on the system, you can re-enroll a new TPM keyslot by executing:

Terminal window
sudo systemd-cryptenroll --tpm2-device=auto --tpm2-pcrs=7+9+11+14 /dev/nvme0n1p3

and entering the LUKS passphrase.