96
submitted 9 months ago by j4k3@lemmy.world to c/linux@lemmy.ml

I'm curious about the possible uses of the hardware Trusted Protection Module for automatic login or transfer encryption. I'm not really looking to solve anything or pry. I'm just curious about the use cases as I'm exploring network attached storage and to a lesser extent self hosting. I see a lot of places where public private keys are generated and wonder why I don't see people mention generating the public key from TPM where the private key is never accessible at all.

all 26 comments
sorted by: hot top controversial new old
[-] Static_Rocket@lemmy.world 12 points 9 months ago

I use it for Data-at-rest Encryption. Not much else though.

[-] library_napper@monyet.cc 8 points 9 months ago

Usually because its not portable. A USB security key costs more than the TPM you already have, but you can make a backup and store it in a safe

[-] ArbiterXero@lemmy.world 8 points 9 months ago

The problem with this is that the key would be “machine based” and not “person”

So it’s better for “service accounts”

[-] NekkoDroid@programming.dev 4 points 9 months ago* (last edited 9 months ago)

Having read poetterings blog posts a bit and he explains that the TPM2 based encryption is entirely just for system resources (basically everything under / with exception of /home). For home he still "envisions" (its already possible and not really hard with sd-homed) that the encryption is based on the users passphrase/key/whatever and not unlockable by anyone else than the users passphrase/...

So user specific stuff is tied to user keys while system stuff is tied to the system & OS.
If you wanna read the post: https://0pointer.net/blog/fitting-everything-together.html

[-] barkdoor@infosec.pub 8 points 9 months ago

100% Yes

  • Currently using systemd-creds to displace any secrets in env

  • Spending time getting to grips with Keylime

[-] richardisaguy@lemmy.world 7 points 9 months ago

I use it for storing luks credentials, so every time I boot I get dropped at my login manager. It leaves my system vunerable to attacks to it, but its quite convenient.

Besides, if anyone tries to boot any other OS which is not mine, the keys are erased.

[-] baseless_discourse@mander.xyz 1 points 9 months ago

Can you explain a bit on how the key erasure works? AFAIK TPM only refuse to release the key when certain PCR dont match, is there a setting to let it erase key?

[-] richardisaguy@lemmy.world 1 points 9 months ago

https://fedoramagazine.org/automatically-decrypt-your-disk-using-tpm2/

I've read this article to make my setup, but its very informative about the function of TPM too

[-] baseless_discourse@mander.xyz 1 points 9 months ago

I have read that article, it doesn't seem to mention that TPM will erase key if a different OS is loaded, maybe I missed something?

[-] richardisaguy@lemmy.world 1 points 8 months ago

It talsk about pcr, every time another OS is booted some pcsrs are changed, and if the keys are installed on the correct ones, this will lead to it being erased

[-] SpaceCadet@feddit.nl 0 points 9 months ago

Besides, if anyone tries to boot any other OS which is not mine, the keys are erased.

There are forensic tools that can capture the contents of RAM, and so access your decrypted LUKS encryption key.

I guess it depends on who you are protecting against, but if for example law enforcement wants evidence against you for what they think is a serious enough crime, they just may go through the trouble to do it.

[-] astray@lemm.ee 2 points 8 months ago

A security module or a key fob/smart card processes the key internally using its own dedicated ram and cpu without any debugging support. This way, even something will full ram and cpu access or a compromise of your machine, there is no way to export or access the key. Data is passed to the module and it returns the scrambled or unscrambled result based on the key which no body knows or has ever seen. A key locked with no way to access can’t be hacked without physically stealing the module, which is where your pin comes in to save you. The TPM is a very important part of a secure boot chain. If you want to secure other things I wouldn’t blame you for using a separate module or fob that isn’t always connected util it’s actually needed and it should only be activated with a physical button or something so you have to be present to engage with it. This adds even more security. So you could use the TPM for boot chain security and a separate fob or data privacy for example.

[-] penquin@lemm.ee 2 points 9 months ago

It scares me. What if the chip dies? How am I gonna be able to get my stuff? I don't fully understand how it works, but where is the encryption saved? On the chip itself or somewhere else?

[-] ipha@lemm.ee 1 points 9 months ago

What if the chip dies? How am I gonna be able to get my stuff?

You can have backup keys, but if you don't have that then your data is gone.

I don’t fully understand how it works, but where is the encryption saved? On the chip itself or somewhere else?

Encryption key is stored in the TPM chip.

[-] penquin@lemm.ee 1 points 9 months ago

Ok this is scary. Lol Unless you have those backup keys then it's a bit better.

[-] gregorum@lemm.ee 2 points 9 months ago

Outside of Microsoft and Windows, what’s the application for it? Does Linux or UNIX have much use for TPM? Pardon, my ignorance, but I bet this is a good place to ask!

[-] Kidplayer_666@lemm.ee 0 points 9 months ago

Hardware accelerated disk encryption if I’m not mistaken

[-] savvywolf@pawb.social 0 points 9 months ago

Personally, I don't see how a TPM module is more useful than full disk encryption with a password you enter on boot.

I struggle to see how it makes automatic login safer given it does nothing to protect against the really common threat of someone physically stealing your laptop or desktop.

I don't trust any encryption or authentication system that I don't have access to the keys for. Microsoft has also kinda made me feel it's more for vendor lock in, like they did with secure boot.

Still, I'm probably being unreasonably pessimistic about it though - be interested to see any practical use cases of it.

[-] monk@lemmy.unboiled.info 0 points 9 months ago* (last edited 9 months ago)

You can use insecure boot and not enter the password. It can't make stuff meaningfully more secure though, it just plain doesn't add any protection against evil maid.

[-] wildbus8979@sh.itjust.works 0 points 9 months ago

In theory, the TPM can be used to verify that the bootloader, kernel and injtamfs haven't been tampered with, which is very very useful as FDE (in the running machine) is only good if that remains true.

[-] savvywolf@pawb.social 0 points 9 months ago

I've heard that before, but there are two main problems that stick out to me:

  • A lot of the marketing for TPM (at least when I was setting up bitlocker on Windows) suggests that it's used to support decrypting drives without a password on boot. But that doesn't seem to offer any protection from the devices being stolen. The bootloader may be safe but it's not actually verifying that I'm the one booting the device.
  • I can't think of a situation where someone would be able to actually modify the bootloader without also having full access to the files and secrets. Especially in a single-boot environment where every time the system is running, the device is decrypted.

I'm not saying that it's all just a scam or anything like that, but it really feels like I'm missing something important and obvious.

[-] Discover5164@lemm.ee 0 points 9 months ago

i use it to auto unlock luks. if someone messed with the hardware/ bios, it will ask for the password next boot.

this post was submitted on 25 Dec 2023
96 points (98.0% liked)

Linux

47371 readers
978 users here now

From Wikipedia, the free encyclopedia

Linux is a family of open source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991 by Linus Torvalds. Linux is typically packaged in a Linux distribution (or distro for short).

Distributions include the Linux kernel and supporting system software and libraries, many of which are provided by the GNU Project. Many Linux distributions use the word "Linux" in their name, but the Free Software Foundation uses the name GNU/Linux to emphasize the importance of GNU software, causing some controversy.

Rules

Related Communities

Community icon by Alpár-Etele Méder, licensed under CC BY 3.0

founded 5 years ago
MODERATORS