23 points speckx 2 days ago 32 comments

Velocifyer 2 hours ago | parent

phoronixrly 1 hour ago | parent

This is still vulnerable to evil maid. You need to be able to attest the system before you enter the PIN.

phoronixrly 1 hour ago | parent

tpm2totp used to do this, and it also eliminated the need to divulge the secret used to unlock the TPM, I now see that it has not seen a commit in 2 years.

I also hear mjg59 is looking into encrypted swap hibernation support, so there's a slim chance there will be some development on the system-attestation front.

bri3d 1 hour ago | parent

Sealing to a reasonable subset of PCRs (ie, not just 7 like the article) is reasonably strong against point-in-time evil maid, no?

Like, in Evil Maid Scenario 1, where the Evil Maid only has one-time access, if you've sealed to say 0,2,4,7,9 , or 7 and 15 with a reasonable setup for what gets extended into 15, the Evil Maid's Fake PIN Entry Software would _not_ validate in the secured boot configuration and couldn't actually unseal the TPM, only coerce you into entering your PIN. Then the Evil Maid would have to physically return to your "correct" boot state with the PIN to unseal the disk, no?

(this is all modulo firmware and early boot exploits, of course, since in that case the attestation could also be forged also)

bubblethink 1 hour ago | parent

The maid can just swap out the laptop for a diff one.

phoronixrly 1 hour ago | parent

Precisely, exfiltrate the pin, unlock the real one.

lakeviewterrace 1 hour ago | parent

A different one ... that you would notice immediately because the PIN would not unlock your disk?

You're in here shitting on TPM but don't seem to understand the threat model at all.

bubblethink 1 hour ago | parent

What does it matter if it doesn't unlock the disk? It's a different device with a logger. The purpose of the maid is to be evil and steal your pin. The maid has your real device. The only way to prevent this is by you authenticating the device before you enter anything. Look at the heads project (https://github.com/linuxboot/heads).

bri3d 59 minutes ago | parent

No, I think this is a valid threat model and a good rebuttal. The evil maid steals the original laptop, replaces it with a second laptop with a look-alike PIN entry screen without an attestation. You enter your PIN, it is transmitted to the evil maid with the first laptop, and your data is unlocked. You would notice, but your data would be exposed.

Now, to be clear, I don't think this negates TPM-sealed disk encryption or TPM-and-PIN sealed disk encryption; they're still meaningfully better than the alternatives (with a passphrase alone, your data is already compromised regardless in this invented scenario, and all scenarios are equally variable to the swiss-cheesiness of UEFI firmware unless it is replaced). But it is a valid model.

lakeviewterrace 1 hour ago | parent

Extraordinary how Linux continues to be 20 years behind Microsoft and Apple when it comes to FDE. This is a hilariously stupid level of complexity for something that should have a universal solution across distros by now.

This is literally a one click process in Windows (plus a couple shell commands to enable TPM+PIN).

I'm not disparaging the author in any way — he's merely documenting the stupidity.

Avamander 1 hour ago | parent

Fairly sure that if the correct GPOs are set, there is no need for any shell commands needed for a TPM PIN enrollment.

Windows and macOS both can do FDE with good UI/UX compared to Linux.

lakeviewterrace 1 hour ago | parent

This is 100% correct, my comment was referring to non-domain joined PCs with no policies set.

bubblethink 1 hour ago | parent

What problem is this solving though? The post says they're doing this to avoid typing passphrases. Why would you want the private key hidden in the tpm chip of that device? How will you decrypt if the laptop goes bust or if you move the drive elsewhere?

lakeviewterrace 1 hour ago | parent

The TPM generates a strong, non-exportable key in hardware that is far less susceptible to brute-force attacks.

As opposed to accidentally creating your own key of "4", for instance.

A PIN can be used to protect the TPM from unlocking. Even if you set a PIN of "1234" — it would still be far more secure if the disk and laptop were ever to become separated, because the TPM will have generated a strong key anyway.

The TPM is basically a smart card soldered to the motherboard.

> How will you decrypt if the laptop goes bust or if you move the drive elsewhere

Windows and Apple both generate a recovery key as part of the enrollment process which you can store offline.

hparadiz 1 hour ago | parent

When you format LUKS you can add multiple decryption keys in case the TPM is hosed for some reason like the mobo failing. Can even use a Yubikey instead of a TPM. Or both. Or none. It's really up to you.

bubblethink 48 minutes ago | parent

That's a minor convenience to not type passphrases and a fairly high risk of you losing the backup key. Not to mention, the entirely separate problem of storing the backup key securely. It doesn't pass the xkcd "correct horse battery staple" test for me.

lakeviewterrace 31 minutes ago | parent

All your arguments amount to "i don't understand why smart cards/yubikeys/etc exist when you can just use passwords"

bubblethink 25 minutes ago | parent

No, yubikey in the fido/webauthn form protects against phishing/TOTP snooping and replay over the web. TPMs for luks don't. See the other thread about evil maid.

drdexebtjl 8 minutes ago | parent

[delayed]

rlpb 7 minutes ago | parent

Fedora uses LUKS where your backup key can just be a regular passphrase. A key derivation function is used internally to help with mitigating brute force attacks.

setopt 1 hour ago | parent

On both my Fedora laptop and on my MacBook, I have to enter a password at boot to unlock the hard drive, and both had similar complexity to set it up (in Fedora I clicked a button and entered a password during the install, on Mac I clicked a button and wrote down a backup key after the install).

I think this is specifically for the TPM2 integration, which isn’t required for FDE. But I assume it makes it smoother. System updates that requires multiple reboots for example are more annoying on Fedora, since every reboot requires re-entering the password, while on Mac I just login after the final reboot.

hparadiz 55 minutes ago | parent

Has nothing to do with distros. This is you encrypting your disk for the kernel to open during boot. It literally prompts you normally when it hits the step where it attempts to mount the main partition. The way Linux does it is far more flexible and secure because the keys aren't sent to some third party and no one can unlock it without your keys. You are free to use anything to sign the LUKS partition besides a TPM or some silly pin like a Yubikey or whatever the hell you want.

lakeviewterrace 28 minutes ago | parent

It has EVERYTHING to do with distros.

The process is wholly dependent on bootloaders, systemd versions, and a bunch of other version-specific tooling.

Which none of the distros can ever agree on, so there are 50 variations of implementing disk encryption.

michaelt 18 minutes ago | parent

I mean, Linux has perfectly good FDE - just the user has to type in their password at boot, no TPM involved.

And it's been possible to get Windows-style self-unlocking FDE for 10+ years, such as by using Ubuntu Core - it just costs a bit, and most users aren't willing to pay $$$ to type one less password.

The design of the TPM makes much more sense for a closed-source operating system, where making it impossible to run a non-microsoft-signed OS protects you against rootkits. Open source OSes don't get that benefit, and the remaining benefits are very minor (and come with big downsides) so I can see why open source developers weren't in a hurry.

izacus 1 hour ago | parent

Does this still prevent hibernation from working?

kanbankaren 53 minutes ago | parent

If you are worried about privacy, do a FDE, but don't enroll with TPM.

You have no idea what is inside the TPM chip and its vulnerabilities.

sscaryterry 48 minutes ago | parent

Who in their right mind would do this?

zx8080 47 minutes ago | parent

For your own safety, don't use TPM! It's most probably like a Trojan horse.

sscaryterry 16 minutes ago | parent

Amen.

Grimeton 41 minutes ago | parent

I use my tv card and my printer to encrypt/decrypt my harddrives. Best hardware keys ever.

davb 25 minutes ago | parent

This works equally well on Debian 13, but I found that installing Dracut (which will be the default from Debian 14 onwards) made the whole process smoother.

davb 11 minutes ago | parent

To counter some of the (valid) privacy concerns around TPM unlocked FDE, one big benefit is when it comes to decommissioning physically secure machines. If you aren’t concerned about the evil maid scenario and have reason to avoid network based unlocking, TPM unlocked FDE keeps your machines remotely rebootable while still allowing you pull a disk and send it for secure shredding at server EOL. That is to say, if your scenario is “encrypted at rest on a physically secure and trusted server” (more concerned with the storage medium alone), it’s a good fit. It means you’re not reliant on the OEMs opaque secure erase functionality.

tryauuum 10 minutes ago | parent

I always struggle to understand the point of using disk encryption with TPM, as opposed to the disk encryption with LUKS + passphrase which you remember

With TPM you depend on it so much. What if it breaks? Should I backup the recovery key beforehand? My life has enough keys already Moving the disk to a new laptop also becomes pain