Opt-in FIDO2 (security key) unlock for the LUKS root, without changing the default
Summary
Would you be open to a supported, opt-in way to unlock the LUKS2 root with a FIDO2 security key (systemd-cryptenroll --fido2-device=auto)? As noted in #15798, #141 was closed with "I like what we have now"; this does not ask to change the passphrase default. It is the FIDO2 counterpart of #15798, and could probably share the initramfs switch proposed in #20208.
Observation (4.5.0-3)
/etc/mkinitcpio.conf.d/00-omarchy-hooks.conf(package-owned) assignsHOOKS=(base udev plymouth keyboard autodetect microcode modconf kms keymap consolefont block encrypt filesystems fsck btrfs-overlayfs)and the command line usescryptdevice=. The busyboxencrypthook does not read LUKS2 tokens, so an enrolled FIDO2 slot would be ignored, as #15798 found for TPM2.omarchy-setup-security-fido2configures pam-u2f for sudo and polkit only.- #2326 was closed with a manual recipe from 3.1.x that edits the package-owned hooks file. On 4.5.0-3 a comment on #15798 reports that the whole set has to change (
systemd,sd-encrypt,sd-vconsole,sd-btrfs-overlayfs, noconsolefont/resume, plusrd.luks.name=). - #7222 / #7223 show that a mixed state (
rd.luks.name=with theencrypthook) leaves the root unbootable, so a hand-made switch could be undone by a later migration.
Proposal (sketch)
An explicit command or Setup > Security entry, e.g. omarchy-setup-security-luks-fido2, that:
- checks first (LUKS2, Limine, known hook set) and prints its plan;
- takes a snapshot and a LUKS header backup;
- switches to the systemd hook set through a new drop-in, and writes
rd.luks.name=<luks-uuid>=root rd.luks.options=<luks-uuid>=fido2-device=autovia/etc/limine-entry-tool.d/, removingcryptdevice=; - enrols with PIN and touch on
<luks-partition>, one token at a time (autoneeds exactly one plugged in; systemd #41830 can burn a second key's PIN retries), and offers a second key or--recovery-key; - keeps the passphrase slot; wiping it is a separate, explicit step, taken only after each key has unlocked a real boot. Without the key, systemd waits
token-timeout=(30 s) and falls back to the passphrase prompt; once that slot is wiped there is no fallback; - handles hibernation (
resumehook vs systemd's resume); - is recognised by migrations, so they leave it in place;
- has a matching remove command.
If #20208 lands, reusing its switch and adding only the FIDO2 enrolment would be the smaller change.
Why it matters
The threat model is theft of a powered-off laptop: the disk then needs a physical key plus PIN instead of a passphrase alone. #6997 is related (no account-password prompt after LUKS unlock, so the key PIN becomes the only gate).
A key alone does not stop boot-chain tampering (evil maid). That would need Secure Boot with a signed UKI (#10945, #15524) and TPM2 measured boot with a PIN (#15798, #15709). systemd v263-rc1 NEWS describes a combined tpm2+fido2 slot that requires both; I could not confirm it is in the final v263. On 262 the two are independent slots, so either unlocks. Out of scope either way: cold-boot/DMA on a running or suspended machine, and keyloggers.
Not verified
- Nothing here was tested on hardware.
- The built initramfs,
/boot,/etc/crypttaband the LUKS header were not inspected (root-only); theencryptconclusion is inferred from the drop-ins and command line. - Whether
rd.luks.options=suffices or a crypttab entry is needed (the #15798 comment found/etc/crypttab.initramfstakes priority; current mkinitcpio marks that file deprecated). - Whether the PIN/touch prompt is visible at the LUKS prompt on systemd 262 (v263-rc1 NEWS says requests are now shown via Plymouth).
- Snapshot boot entries (older ones keep the old command line, so they would only unlock by passphrase) and hibernate resume after the switch.
Environment
Omarchy 4.5.0-3, limine-mkinitcpio-hook 1.40.0-2, Limine + UKI, LUKS2 root with btrfs, systemd 262.2, cryptsetup 2.8.9, libfido2 1.17.0.
Happy to test a draft. Thank you for Omarchy.