Login
You're viewing the code4lib.social public feed.
  • Jun 3, 2026, 11:50 AM

    I'm planning to set up a little home server on a second hand thin client box. I'd like to have full disk encryption so that if the box gets physically stolen by a nasty horrible thief they won't have the data. But I'd also like it to be easy to unlock at boot for convenience. Maybe something like: I get a ping on my phone and/or computer when it boots up and I can press a button to allow unlock.

    Can anyone recommend utilities to set that up?

    💬 1🔄 1⭐ 0

Replies

  • Jun 3, 2026, 12:02 PM

    @jpab I couldn't find anything pre-made like this. I started building it myself using an RPi Pico W connected to a mainboard USB header; the idea is my phone would send the key, using bluetooth/wifi, to the RPi, which would provide it to the host system via USB. I got bogged down in yak shaving with Bluetooth libraries and never finished.
    On remote servers, I'm now using the `reboot -r` technique that "outerbase" uses after unlocking via SSH, but that's FreeBSD specific. github.com/emtiu/freebsd-outer

    💬 1🔄 0⭐ 0
  • 💬 1🔄 0⭐ 0
  • Jun 3, 2026, 12:36 PM

    @jpab Oh my goodness, the docs for that project are quite a ride. I think I've now mostly made sense of what it's intended to do on the third skim.
    Personally, that sounds like mostly overkill for the purposes of FDE unlock, without solving the practical challenges. (Obviously; it doesn't seem intended specifically for FDE.)
    We're not talking about thousands of different keys here, so there's no reason you can't just store the unlock key on your phone & computer.

    💬 1🔄 0⭐ 0
  • 💬 1🔄 0⭐ 0
  • Jun 3, 2026, 1:34 PM

    @jpab I guess from my point of view it doesn‘t address any specific relevant threat model that can‘t already be exploited in other ways with a simpler scheme.
    As in, baseline for comparison for me would be a 1-liner shell script I can run that ssh‘s into the target machine and runs an unlock command with the key. That‘s very far from perfect, but it seems less fiddly to implement and get up and running, and it‘s not obviously worse from a security POV.

    💬 1🔄 0⭐ 0
  • Jun 3, 2026, 1:38 PM

    @jpab (1. If an attacker steals both the mini server and the laptop containing either the ssh command or the other half of the tang key, success of the attack depends on whether they can decrypt the laptop in both cases.
    2. If the attacker manages to tamper with the mini server without your knowledge [evil maid] they can install code that recovers the FDE key as soon as your laptop provides the key via either mechanism.)

    💬 1🔄 0⭐ 0
  • Jun 3, 2026, 2:09 PM

    @jpab I mean, if we're talking truly distributed keys, as in, you want to have key fragments in your laptop and your phone so that both devices need to be there to unlock the server, then OK, maybe this is a good candidate for a building block to make that happen.

    💬 1🔄 0⭐ 0
  • Jun 3, 2026, 2:22 PM

    @jpab Personally, this would be quite far down my list of priorities, I'd want to solve a bunch of other problems first:

    1. Depending on what the system in question is intended for, I find unencrypted OS + encrypted data to be operationally awkward; you have to defer starting up services until their data is available and prevent leaking encrypted data into unencrypted logs etc. (reboot -r and out-of-band microcontroller based unlock both solve this well, but in different ways)

    💬 1🔄 0⭐ 0
  • Jun 3, 2026, 2:27 PM

    @jpab
    2. Ease of unlocking is important to me.
    I travel with the encrypted mini server and it runs things that are useful for our phones and tablets too. Unlocking it without having to get my laptop out is helpful.

    3. Observability is useful, especially for distant servers. Like you say, you really want a notification on your phone and/or your computer when it changes state. (IMO, this includes it disappearing from the network, in addition to "now ready to unlock.")

    💬 1🔄 0⭐ 0
  • Jun 3, 2026, 2:34 PM

    @jpab
    4. Straightforward remote setup and admin.
    It's taken a while to figure out how to set up and update the reboot -r setup remotely on a rented root server in a data centre where getting access to the local console/keyboard is time-limited and upon request only. (I managed to reduce it to a disk image generated locally by script, that I can upload and dump into the unlock partition on the remote server, either from the fully unlocked production OS or a Linux netboot "rescue" OS.)

    💬 1🔄 0⭐ 0
  • Jun 3, 2026, 2:35 PM

    @jpab That last one isn't much of a concern for the travel device, but I plan to apply the same thing for the "big" home server too so that remote OS updates and similar while I'm travelling aren't so nerve-wracking.

    💬 1🔄 0⭐ 0
  • Jun 3, 2026, 2:47 PM

    @jpab I'm planning to publish scripts and an explanation for my reboot -r solution once I've reliably applied it to a few systems, but I'm not sure how useful that will be to your specific situation.
    I mean, it could be… FreeBSD is pretty nice, ZFS is fantastic, and bhyve is a great hypervisor for hosting any Linux-only software!
    So if you're interested in the rough drafts of this, let me know. (There isn't any code to share yet on the RPi Pico W based approach, but I'm happy to braindump.)

    💬 1🔄 0⭐ 0
  • Jun 3, 2026, 2:49 PM

    @jpab I don't have a solution to the "unlock from your phone" requirement for any of it yet though, unless you count using a phone-based SSH client I suppose.

    💬 0🔄 0⭐ 0