<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Chitra Jasuja</title>
    <description>The latest articles on DEV Community by Chitra Jasuja (@chitra_jasuja_ba6f1bd29ac).</description>
    <link>https://dev.to/chitra_jasuja_ba6f1bd29ac</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F4070149%2F8c5ddf6d-a840-47f5-b624-1e7340f64335.jpg</url>
      <title>DEV Community: Chitra Jasuja</title>
      <link>https://dev.to/chitra_jasuja_ba6f1bd29ac</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/chitra_jasuja_ba6f1bd29ac"/>
    <language>en</language>
    <item>
      <title>What actually happens when someone steals your LUKS-encrypted disk</title>
      <dc:creator>Chitra Jasuja</dc:creator>
      <pubDate>Sun, 09 Aug 2026 18:31:08 +0000</pubDate>
      <link>https://dev.to/chitra_jasuja_ba6f1bd29ac/what-actually-happens-when-someone-steals-your-luks-encrypted-disk-4923</link>
      <guid>https://dev.to/chitra_jasuja_ba6f1bd29ac/what-actually-happens-when-someone-steals-your-luks-encrypted-disk-4923</guid>
      <description>&lt;p&gt;I set up TPM auto-unlock on my laptop a while back — &lt;code&gt;systemd-cryptenroll&lt;/code&gt;,&lt;br&gt;
bind to a couple of PCRs, disk unlocks silently on boot, no more typing a&lt;br&gt;
passphrase every morning. Nice quality-of-life win.&lt;/p&gt;

&lt;p&gt;Then a friend asked me a question I didn't have a great answer to: &lt;em&gt;"okay but&lt;br&gt;
if someone actually steals the laptop, doesn't the TPM just... hand over the&lt;br&gt;
key for them too?"&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;I didn't like that I had to go verify the answer instead of just knowing it.&lt;br&gt;
So I did, and it's worth writing down because the mental model most people&lt;br&gt;
(including past me) have of "TPM-bound disk encryption" is slightly wrong in&lt;br&gt;
a way that matters.&lt;/p&gt;
&lt;h2&gt;
  
  
  The setup
&lt;/h2&gt;

&lt;p&gt;Quick background for anyone not knee-deep in this already: LUKS doesn't&lt;br&gt;
encrypt your disk with your passphrase directly. There's one randomly&lt;br&gt;
generated master key that does the actual encrypting, and your passphrase&lt;br&gt;
(or a TPM-released secret, or a recovery key) only ever wraps and unwraps&lt;br&gt;
&lt;em&gt;that&lt;/em&gt; key. You can have several of these "doors" into the same master key&lt;br&gt;
at once — a daily passphrase, a TPM-sealed slot, a recovery key on paper —&lt;br&gt;
and disabling one doesn't touch the others.&lt;/p&gt;

&lt;p&gt;The TPM slot works by &lt;em&gt;sealing&lt;/em&gt; a secret: the TPM will only decrypt it back&lt;br&gt;
if the machine's current boot-time measurements (PCRs — Platform&lt;br&gt;
Configuration Registers) match what they were when you sealed it. Those&lt;br&gt;
measurements are a hash-chain of everything that ran during boot — firmware,&lt;br&gt;
bootloader, kernel. Change any of it, the hash changes, the TPM won't unseal.&lt;/p&gt;
&lt;h2&gt;
  
  
  So what does an attacker actually get?
&lt;/h2&gt;

&lt;p&gt;Say the laptop gets stolen and someone pulls the drive, plugs it into their&lt;br&gt;
own machine via a USB adapter. What do they have?&lt;/p&gt;

&lt;p&gt;The full LUKS2 header, including the TPM-sealed keyslot's blob. That blob&lt;br&gt;
isn't secret in the sense of being hidden — &lt;code&gt;cryptsetup luksDump&lt;/code&gt; on the&lt;br&gt;
stolen disk will happily show them that a TPM2 token exists. What they don't&lt;br&gt;
have is a way to &lt;em&gt;use&lt;/em&gt; it, because unsealing requires the original TPM chip's&lt;br&gt;
Storage Root Key — an asymmetric key that's generated inside that specific&lt;br&gt;
chip and is designed by the TPM 2.0 spec to never leave it in plaintext form.&lt;/p&gt;

&lt;p&gt;Plug the disk into a different machine, and you have the sealed blob sitting&lt;br&gt;
next to a completely different TPM that has zero record of the key that&lt;br&gt;
sealed it. The unseal operation just fails. Not "fails because of a wrong&lt;br&gt;
guess" — fails because the cryptographic material needed doesn't exist&lt;br&gt;
anywhere outside the original chip.&lt;/p&gt;

&lt;p&gt;I tested this directly: took a LUKS2 volume with a TPM2 token enrolled,&lt;br&gt;
tried opening it against a different machine's TPM.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight console"&gt;&lt;code&gt;&lt;span class="gp"&gt;$&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nb"&gt;sudo &lt;/span&gt;cryptsetup open &lt;span class="nt"&gt;--type&lt;/span&gt; luks2 &lt;span class="nt"&gt;--token-id&lt;/span&gt; 1 /dev/sdX victim_disk
&lt;span class="go"&gt;Failed to activate using token 1.
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Exactly as expected. The metadata is visible, the mechanism is not&lt;br&gt;
exploitable.&lt;/p&gt;

&lt;h2&gt;
  
  
  Okay, so TPM-binding solves everything?
&lt;/h2&gt;

&lt;p&gt;No — and this is the part that actually matters. TPM-binding solves a&lt;br&gt;
&lt;em&gt;specific&lt;/em&gt; threat: a cold, powered-off, stolen drive. It does basically&lt;br&gt;
nothing against a different, much more common threat: &lt;strong&gt;someone getting&lt;br&gt;
access to your running or suspended session.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;If your laptop is asleep (not powered off) and someone gets past your lock&lt;br&gt;
screen — guessed password, shoulder-surfed PIN, whatever — the TPM will&lt;br&gt;
unseal the key for &lt;em&gt;them&lt;/em&gt; just as happily as it does for you every morning.&lt;br&gt;
That's not a bug, that's the entire feature. The TPM doesn't know who's&lt;br&gt;
asking, it only checks whether the boot state matches. A logged-in session&lt;br&gt;
on a stolen-but-running machine has already crossed that boundary.&lt;/p&gt;

&lt;p&gt;So the actual protection story is:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Cold stolen disk, no login&lt;/strong&gt; → TPM-binding does its job, drive is
inert without the original chip&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Warm/suspended machine, attacker has your login&lt;/strong&gt; → TPM-binding buys
you nothing, session lock and login strength are what's actually carrying
the weight&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Offline brute-force of a weak passphrase slot&lt;/strong&gt; → TPM-binding doesn't
strengthen this either, it's a completely separate keyslot&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;None of this means TPM auto-unlock is a bad idea — it's genuinely useful&lt;br&gt;
convenience with a real security property attached to a real threat model.&lt;br&gt;
It just isn't the blanket "my disk is safe now" button it's easy to assume&lt;br&gt;
it is. The actual thing doing the heavy lifting against a stolen-but-running&lt;br&gt;
machine is still your login screen and however aggressively your machine&lt;br&gt;
locks/suspends.&lt;/p&gt;

&lt;h2&gt;
  
  
  What I'd actually recommend if you're setting this up
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Keep at least one strong passphrase keyslot that doesn't depend on the
TPM at all — if the chip gets cleared or a firmware update shifts your
PCRs, this is what saves you&lt;/li&gt;
&lt;li&gt;Bind to a sane, minimal PCR set (I use PCR 0 + 7 — firmware and Secure
Boot policy) rather than pinning to every possible measurement, or you'll
be re-enrolling after every kernel update&lt;/li&gt;
&lt;li&gt;Configure actual suspend-to-RAM or hibernate on lid close, not just a
screen dim — if the session never sleeps, TPM-binding's threat model
doesn't really apply to your actual usage pattern&lt;/li&gt;
&lt;li&gt;Keep an offline recovery key somewhere that isn't "a file on the same
laptop"&lt;/li&gt;
&lt;/ul&gt;




&lt;p&gt;*I ended up writing a longer, illustrated version of this covering the full&lt;br&gt;
chain — UEFI Secure Boot, TPM PCRs, Intel vs AMD implementations, and the&lt;br&gt;
LUKS2 keyslot internals — as &lt;a href="https://linuxpulse.gumroad.com/l/secure-boot-luks-handbook" rel="noopener noreferrer"&gt;The Linux Secure Boot &amp;amp; Full-Disk Encryption&lt;br&gt;
Handbook&lt;/a&gt;. &lt;/p&gt;

&lt;p&gt;This post is the short version of chapter 7.&lt;br&gt;
Happy to answer questions about any of this in the comments.*&lt;/p&gt;

</description>
      <category>cybersecurity</category>
      <category>linux</category>
      <category>privacy</category>
      <category>security</category>
    </item>
  </channel>
</rss>
