BSides Cape Town 2025

Help, I lost my keys: Recoverable, monitored FDE at the Edge
2025-12-06 , Track 3

This talk presents a fully open-source framework to achieve full disk encryption (FDE) for TPM-equipped Edge devices, balancing strong security guarantees with practical maintainability at scale. We address key features including automated disk unlocking and recovery, monitoring and remote access. The talk will cover the following:

  • A fully verified boot chain, from EFI firmware through the initramfs. We'll cover which system components to verify and common pitfalls to avoid when setting up a secure boot chain.
  • A newly-developed, open-source TPM PCR prediction mechanism enabling seamless reboots after kernel or initramfs updates.
  • Automated disk encryption key onboarding and recovery using Tang and Clevis.
  • Secure remote access and fleet observability while disks remain locked - using WireGuard, SSH, and Prometheus.
  • Guidance on how to extend the initramfs (dracut) with your own tooling.
  • Discussion of shortfalls and potential security risks

Our aim with this talk is to help you make FDE convenient, recoverable and monitored to make large-scale rollouts possible.


This framework integrates several tools to address a key gap in deploying fully remote, distributed, and security-sensitive appliances

The currently available resources for deploying FDE usually focus on the discrete components of FDE and don’t provide information on how to fully integrate the key production requirements (recovery, monitoring, and auto-unlocking) needed to practically roll out FDE in a remote, distributed environment. We think we’re bringing a full-featured approach to the table (as well as some new tooling) that can help other community members get FDE deployed to their own fleets.

We’d be introducing the integration of the following tooling, as well as the reasoning behind our design choices:

  • Full disk encryption (LUKS)
  • PCR prediction and handling of TPM key resealing - more on this below
  • Key escrow and recovery (Tang & Clevis): Automated recovery and onboarding
  • Monitoring (Prometheus & Node Exporter): Alerting & monitoring of devices in recovery
  • Reliable networking in an pre-boot environment (netplan, NetworkManager & dracut integration)
  • Extension of your own initramfs (dracut)
  • VPN (Wireguard): Provides remote access in firewalled/NAT’ed environments
  • Remote management (SSH)

Reliably unlocking at the next boot: introduction of our PCR prediction solution

TPM-based unlocking requires predicting the state of several system components at the next boot. If this prediction fails, the TPM won’t unlock the disk decryption key, leaving the system unbootable. It follows then that a key feature of automated disk unlocking involves the prediction of the system state, before you reboot - this process is called PCR prediction.

Systemd is building the necessary components to solve this with projects such as systemd-boot and systemd-pcrlock. Unfortunately we couldn’t get around using Grub for our bootloader, and, outside of systemd, there are very few other options to perform the PCR prediction (and none that we could get to work in our setup).

We’d like to introduce our PCR prediction solution to the community and foster collaboration to make PCR prediction easier. It’s written in Python, well documented and can be easily extended.

Provides an easily extendable framework, allowing adaptation to various environments and use cases

Every environment is unique, and it’s unlikely that you’ll be able to use our setup as-is in yours. We’re hoping to not just outline the tools we’re using, but also outline a framework that you can use to set up FDE in your own environment. We’ll also show you how to customise your initramfs - a key way to change/swap out the various components we’re going to discuss in this talk.

See also: FDE - Kobus van Schoor - Bsides CPT 2025 (1.1 MB)

I’m a Tech Lead for the Edge team at DataProphet, a South-African company building a real-time data collection and analytics platform for manufacturers. Edge devices are fully remotely managed Linux-based factory appliances that collect data from a variety of datasources.

I’m a passionate supporter of open-source software and a Linux enthusiast.