I have setup my fedora to use LUKS encryoted partitions. But entering two passwords gets quite tiring, as I shutdown my laptop quite often to get the benefit of LUKS (I am assuming nothing is encrypted when in suspend, please correctme if I am wrong)
I am thinking about setting up TPM autodecrypt. However, I was wondering does the decryption happen on boot or after I login?
If it happens on boot, then it seems like the benefit is pretty limited compare to a unencrypted drive. Since the attacker can simply boot my laptop and get the unecrypted drive.
Am I missing something here? I was wondering is there a way for me to enter my password once and unlock everything, from disk to gnome keyring?
The idea behind TPM-locked boot is that you can boot into your system unattended, but it stops booting into any other system. Typically no password is needed, but you can also assign an additional (non-user) password if you want.
This is nice if you trust your system to be basically secure. Nothing else can access its filesystems, so no external tool can be used to break into it. Rescue disks can not access any data without knowing a special rescue key -- so make sure to set one up! A nice side effiect is that the key is only available while setting up disks in the initrd and totally inaccessible at any other time. That makes it very hard to extract the password once the system is running.
You can encrypt the home directories of users using other services like systemd-homed. That will prevent anyone from accessing any data in the user's directory while that user is logged out. Homed will basically use your password to unlock your disk and if that works, then the password is accepted. So you do not need that user to be listed in the traditional /etc/passwd file, which is useful as you can just copy the users homedir image file onto another system to move a user account over.
The TPM releases the key to the OS at boot time. Without that, there would be no way for the OS to load (assuming the root FS is encrypted).
The key is bound to PCRs in the TPM, which control under what conditions the key can be released. For example, it can be tied to secure boot, bios settings, etc.
I see your decryption key extraction and offer you a 5 dollar wrench.
The wrench also comes with DMA (direct mechanical assault), RDMA (remote direct mechanical assault via throwing), and DDIO (deals damage if opposing) capabilities. It's a real NSA bargain!
on my laptop I have tpm to decrypt my drive and I've also enabled secure boot and set a bios password, so if someone steals my laptop it's basically bricked,
secure boots there to prevent any potential tampering if someone were to take the drive out then put it back in
I feel this setup is secure enough for me, if you've got some nation state after you, or some guy with a wrench theres probably nothing you can do
I was wondering what security does the TPM password provides. If I understand correctly, it will prevent attacker from getting the data on the disk.
However, theoretically, attacker can boot the laptop and disconnect the disk to get a decrypted disk. Realistically, I think my laptop will shutdown when the chasis is opened (unless configured otherwise in the bios). So it should be safe?
However, theoretically, attacker can boot the laptop and disconnect the disk to get a decrypted disk.
This is not how this works. The bits are never decrypted on your disk / partition. If that was the case, a power loss would leave your device decrypted as well, and that is something a potential attacker might have control over.
What actually happens is that encrypted data is read from disk by the CPU, decrypted by the CPU and then written to RAM unencrypted. Unencrypted data should NEVER be written to non-volatile memory (the necessary exceptions, like the boot image, apply).
I'm assuming the two passwords are the LUKS one and then your login, which you can remove by just configuring your login manager to do auto-login (no attacker will be able to access your data anyway if it's encrypted, logged in or not).