-
-
Notifications
You must be signed in to change notification settings - Fork 61
tpm2 disk encryption with systemd-cryptenroll #9756
Copy link
Copy link
Open
Labels
C: bootThis issue pertains to boot-related issues in Qubes OS (e.g., system failing to boot).This issue pertains to boot-related issues in Qubes OS (e.g., system failing to boot).P: defaultPriority: default. Default priority for new issues, to be replaced given sufficient information.Priority: default. Default priority for new issues, to be replaced given sufficient information.cryptographyThis issue pertains to the use of cryptography in Qubes OS.This issue pertains to the use of cryptography in Qubes OS.hardware supportThis issue pertains to the hardware that Qubes OS supports.This issue pertains to the hardware that Qubes OS supports.securityThis issue pertains to the security of Qubes OS.This issue pertains to the security of Qubes OS.
Description
Metadata
Metadata
Assignees
Labels
C: bootThis issue pertains to boot-related issues in Qubes OS (e.g., system failing to boot).This issue pertains to boot-related issues in Qubes OS (e.g., system failing to boot).P: defaultPriority: default. Default priority for new issues, to be replaced given sufficient information.Priority: default. Default priority for new issues, to be replaced given sufficient information.cryptographyThis issue pertains to the use of cryptography in Qubes OS.This issue pertains to the use of cryptography in Qubes OS.hardware supportThis issue pertains to the hardware that Qubes OS supports.This issue pertains to the hardware that Qubes OS supports.securityThis issue pertains to the security of Qubes OS.This issue pertains to the security of Qubes OS.
The problem you're addressing (if any)
When enabling TPM2 sealed disk encryption keys with
systemd-cryptenroll(available as of systemd 248] it is fairly easy to seal the key (other than requiring that the user know the partition that is encrypted with LUKS):There are three additional steps that need to be done once and are somewhat tricky. The first is that tpm2-tss has to be included in the initrd by creating a new dracut config file:
And the second is that
/etc/crypttabhas to specify that the tpm2 slot in LUKS should be used. Some guides suggest editing the file to add the option or use sed to try to do so automatically. If they get this wrong, the system might not be bootable.And finally the user must rebuild the initrd with
sudo dracut -fto pick up the newcrypttaband include thetpm2-tssmodule in the image. If they are booting a signed UKI, they must also rebuild and re-sign their unifed Xen and dom0 vmlinux image.The solution you'd like
The Qubes initrd could include the tpm2-tss module by default since hopefully many users will choose to use hardware protected keys.
The
/etc/crypttabgeneration can include thetpm2-device=autooption for encrypted partitions even if no TPM2 sealed keys are created. The fallback behaviour is to ask for the passphrase anyway, so it does not change the boot time or user experience to have it included. Many of the guides also include the PCR list in thecrypttab, although the default behaviour is to use the ones specified in the LUKS header (along with a PIN if used) so there is no need to do more than add thetpm2-deviceoption.The value to a user and who that user might be
Guides for enabling hardware sealed keys for new users can be as simple as running
systemd-cryptenrollwith the users choice of PCRs, without requiring extra steps to reconfigure dracut, hand editing the crypttab that could risk breaking the boot, or rebuilding the initrd.Completion criteria checklist
No response