106 points · by ecliptik · 3y ago · 193 comments
Windows has this, and it permits booting without a passphrase being entered, but the disk will still be encrypted at rest.
https://github.com/01org/tpm2.0-tools http://trousers.sourceforge.net
You can also emulate a TPM in recent versions of QEMU...
https://tpm2-software.github.io/2020/10/19/TPM2-Device-Emula...
I wrote a couple of scripts meant to help me lock down a machine for colocation in this "BitLocker" type manner. And, as luck would have it, lol... I'll (again) shamelessly self-promote the Show HN I wrote just a short while ago:
A huge number of people and organizations run Unix based systems and TPM devices have been around for a pretty long time (at least by tech standards).
Might the world be a bigger place than you think?
https://access.redhat.com/documentation/en-us/red_hat_enterp...
Looks like clevis is gpl3 - so I expect it's not packaged as standard for any of the bsds?
https://github.com/latchset/clevis
See also:
Ed: and: https://github.com/kmille/cryptboot
https://security.stackexchange.com/questions/194081/use-tpm2...
https://security.stackexchange.com/questions/39329/how-does-...
https://superuser.com/questions/619721/can-i-use-the-tpm-on-...
That a thief opens your laptop and steal the harddrive instead of the complete machine?
Or is this just a solution that is meant to check a checkbox to make an auditor happy?
If you can insert a usb-plug and boot from that you could unlock the disk with the help of the tpm, or interrupt grub and set init=/bin/bash.
Or since the scenario is that the attacker have physical access, maybe desolder the tpm chip and move it to another computer where they have control over how the machine boots.
I guess modern gaming consoles are locked down in such a way so that this makes sense, but I have never seen a general purpose computer secured like this.
Thanks for explaining, I guess the above was mostly my stream of consciousness ranting.
This is deliberate as I protect my important stuff again with VeraCrypt.
The reason for the automatic login via TPM is have a windows guest account that automatically logs into a very restricted guest account (that can only use a locked down chrome and play movies from usb, nothing else) that can't be changed (not without resetting the bios or replacing/wiping the hdd).
Since the laptop is running prey, my hope is any thieves would be using it. Without an automatic login with a key obtained from TPM, I couldn't have the same setup.
The code is less, but there are fewer developers too. For example, basic support for disk encryption (an important security feature) has been added to the installer in 2023 in OpenBSD.
Perhaps people familiar with the software development process in both could chime in.
While might be more pre-oackaged containers available for linux, our OCI stack has nothing on BSD's Jails. ZFS was ported to linux from Solaris, and still runs better on the BSD's (at least in regards to license controversies, if not feature support or performance, which have mostly converged in OpenZFS). The linux-native option would be BTRFS (love them both :p).
One is the mandatory access control of SELinux, used extensively in Android (probably the most widely-used Linux distribution of them all). This has no OpenBSD equivalent, as far as I know.
Another is that the Linux kernel has some compiled-in exploit mitigations enabled that OpenBSD doesn't, such as automatic bounds checks on fixed-size array access (based on UBSan).
Besides this, it changes the perspective of who is the best person to configure the secure features. OpenBSD makes this a decision for the developer of the application, who should know better about it than a random sysadmin who most probably won't even open the source code to know better (this is the approach SELinux takes).
https://man.openbsd.org/pledge https://man.openbsd.org/unveil
https://www.openbsd.org/faq/faq14.html#softraidFDE
Above is the section of the FAQ about full disk encryption for OpenBSD 7.2 which is the most recent release.
PS: I agree fully with a parent comment that the OpenBSD installer is superb. It is like working your way through a checklist. Nice and straight forward once you have read the FAQ first.
Semantics doesn't change that.
Yes, I said theirs, because since then I want nothing to do with that.
"Unix grey beards are forged in suffering".
Yeah, well, suffer if you'd like, but I have better things to do with my time.
For example, couldn’t access the internet using WiFi and wired Ethernet at the same time - spent hours fiddling about, trying to make both adapters ‘egress’ - couldn’t do it. Then … remembered the FAQ:
Networking -> Wireless -> Trunking a Wireless Adapter
- there it was.
For a broader understanding there’s always:
https://www.openbsd.org/faq/faq14.html
It’s 3 commands to type in that are explained and that will work as is in most cases.
And then there are the other cases. Then you ask the community. And again, not welcoming etc.
What I'm saying is: it's probably a great OS with great documentation, but the community isn't welcoming at all.
You can always choose to not install all X* packages. In fact, for a server oftentimes you don’t need more than the base package (you barely need a compiler either or games).
https://www.openbsd.org/faq/faq4.html#FilesNeeded
> New users are recommended to install all of them.
> Some libraries from xbase72.tgz, like freetype or fontconfig, can be used outside of X by programs that manipulate text or graphics. Such programs will usually need fonts, either from xfont72.tgz or font packages. For the sake of simplicity, the developers decided against maintaining a minimal xbase72.tgz set that would allow most non-X ports to run.
On a server, you need x11 clients and xauth, if you want to run x11 programs via ssh x11 forwarding.
Disk encryption wasn't even part of the default install flow before. You had to go out of your way to find documentation, understand how to run it, find some more documentation, get "RTFM" replies on their IRC channel.
Doesn't seem very secure by default to me.
Can't hack anything if nothing is running, right? Only issue is it's not that useable either.
If you don't understand a system it's by definition not secure, keep your hands away or start learning your stuff, or at least don't call it secure (the big word that includes many different meanings)
The OpenBSD developers know that their users take security seriously, over convenience and just-works installers.
So it's a safe bet that OpenBSD users will take the few extra (well-documented) manual steps to encrypt their storage devices, leaving the developers to focus on things that are not easy for users to do for themselves.
Adding the convenience to the interactive installer is clearly a good thing, but it would not be at the tippy-top of the priority list if you have limited funding and developer time.
The OpenBSD mentality is the opposite - they will sacrifice convenience and disable all unnecessary services by default, in order to make the system as secure as possible, and you can go RTFM and knowingly increase your risk if you choose to.
That mentality would suggest, I think, disk encryption should be opt-out on the install. Of course, the first step to getting there is an opt-in system.
With Linux, crypsetup and lvm I wanted to kill myself.
With what, Linux from scratch or something? Eg: Debian has had "encrypt disk" in the installer for a long time. Granted, if you want a super custom setup - it's trickier - but then it kind of is inherently more complex.
If you're going to demote, don't take it off the main page index for casual browsers. Sometimes the fringe is very correct.
The current thread spent 9 hours on the front page, which is a lot. It did set off the flamewar detector but it looks like we switched that off. Other than that, moderators didn't touch it.
OpenBSD users know how to partition and encrypt their disks.
World domination was never on BSD's todo list!
Don't get me wrong -- the Linux way is also perfectly valid, and obviously more popular. But it's not the only way.
Currently and as far as I know, bioctl does only support user typed in passwords or key disks. You certainly want also encrypted disks on your server but requiring user typed in password is oftentimes a no-go (think of various firewall appliances doing a reboot and not having remote hands). A compensation can be the key disk but I don’t know how widely that is used.
Hardware bound encryption like with a TPM is not supported. Also Linux is still exploring here as far as I can tell (no installer offers that).
In sum: I think disk encryption in the current form is not a tradeoff many installations will take.
True, OTOH AFAIK you can add tpm unlock to a typical luks setup after installation, see my other comments:
https://news.ycombinator.com/item?id=35067375 (ed: fixed)
Also if secure-boot/tpm is not desired or not available systemd can now start openssh very early to allow user to type passphrase and for non systemd system one can use tinyssh-initramfs or dropbear-initramfs depending on keys requirements. Last option is dedicated kvm (which also work for openbsd).
Thank you Klemens Nanni and others for taking the time.
Besides, setting encryption manually and then installing openbsd with its very fast installer has always been faster than using the interactive debian installer so in the grand scheme of things it wasn't that big of a deal.