What Is a TPM? Trusted Platform Module Explained
A TPM is a dedicated chip that generates and stores cryptographic keys in hardware, isolated from the operating system. Here's what it actually does.
A TPM, or Trusted Platform Module, is a dedicated chip — either a separate component or a functional block inside a larger processor — that generates, stores, and uses cryptographic keys entirely in hardware, isolated from the operating system and any software running on it. Its job is to answer questions like “has this device’s boot process been tampered with?” and “prove this key belongs to this exact machine” in a way that malware running on the main CPU can’t fake or extract.
What problem it solves
Software-based key storage has an inherent weakness: if a key lives in a file on disk, or even in regular memory, anything with sufficient privilege on that machine — malware, a compromised process, a determined attacker with physical access — can potentially read it. Once a private key is exposed, every guarantee built on it (identity, encryption, integrity) collapses.
A TPM keeps keys from ever leaving the chip in usable form. Operations like signing or decrypting happen inside the TPM itself; the private key never gets copied into system memory or handed to the operating system. Even if the OS is fully compromised, an attacker can send requests to the TPM but can’t extract the key material to use elsewhere.
What a TPM actually does
A TPM’s core capabilities fall into a few categories:
- Secure key generation and storage. It can generate an asymmetric key pair internally and keep the private half sealed inside the chip permanently.
- Platform Configuration Registers (PCRs). These store cryptographic hashes that represent the state of the boot process — firmware, bootloader, OS kernel — measured in sequence as the machine starts up. Each stage hashes the next before handing off control, forming a chain of measurements.
- Sealing. Data (often an encryption key) can be sealed to a specific set of PCR values, meaning it only unseals if the machine boots into the exact same, unmodified state it was sealed under. Change the bootloader or kernel, and the seal breaks — the TPM refuses to release the key.
- Attestation. A TPM can cryptographically prove, to a remote party, what PCR values a machine has — effectively proving “this device booted into an unmodified, known-good state” without exposing what’s actually in memory.
- Random number generation. A hardware source of entropy, useful for key generation across the whole system, not just TPM-internal operations.
Where you already run into a TPM
Full-disk encryption tools commonly seal the disk’s decryption key to the TPM rather than requiring a password typed at every boot. The machine boots, the TPM verifies the boot chain matches its sealed PCR values, and releases the key automatically — but only if nothing in that chain was tampered with. Swap in a modified bootloader to try to bypass a login screen, and the PCR values change, the seal breaks, and the TPM won’t release the disk key.
TPMs also underpin certain passkey implementations and platform authenticators: the private key behind a passkey can be generated inside the TPM and never leave it, so the credential is bound to that specific piece of hardware. This is a stronger guarantee than a software-stored key, which is one reason platform-bound passkeys are considered resistant to key theft, not just phishing.
TPM vs. software-based key storage
| TPM (hardware) | Software key storage | |
|---|---|---|
| Where the private key lives | Sealed inside the chip | Disk, memory, or an OS-managed keystore |
| Extractable by a compromised OS | No — operations happen on-chip | Potentially, depending on protections |
| Tied to specific hardware | Yes, by design | Not inherently |
| Proves boot integrity | Yes, via PCR measurements | No |
| Performance | Slower for bulk crypto operations | Faster, uses the main CPU |
Because TPM operations are comparatively slow, a TPM typically isn’t used for bulk encryption of large amounts of data — it’s used to protect the keys that a faster, software-based cipher then uses for the actual encryption work. This complements rather than replaces the hashing and encryption that happens elsewhere in the system.
TPM 2.0 and where it sits in the trust chain
A TPM is a hardware root of trust, but it’s not the entire security model on its own. It’s one piece that works alongside zero trust architectures and multi-factor authentication — a TPM can attest that a device is in a known-good state, which is exactly the kind of signal a zero-trust policy engine wants before granting access, independent of whether the user also proves their identity through MFA.
It’s also distinct from a general-purpose secure element or a system-on-chip’s security enclave, though the concepts overlap: all of them isolate sensitive operations from the general-purpose CPU, but a TPM specifically follows a standardized specification (TPM 2.0 is the current major version) so that operating systems and software can rely on consistent behavior across different hardware vendors.
The takeaway
A TPM is a small, isolated piece of hardware whose entire purpose is to keep cryptographic keys usable but unextractable, and to measure whether a machine booted into a state it can vouch for. It doesn’t replace encryption, authentication, or endpoint security — it strengthens the weakest link in all three: where the keys actually live. If your disk encryption, passkeys, or device attestation depend on a TPM, that dependency is what stops a compromised OS from being able to walk off with the keys.
Tagged
Keep reading
Chisato · · 5 min read What Is Session Fixation?
Session fixation tricks a victim into using an attacker-known session ID, so logging in hands the attacker an authenticated session too.
Chisato · · 4 min read What Is IDOR? Insecure Direct Object References Explained
IDOR is an access control flaw where an app trusts a user-supplied ID to fetch a record without checking the requester actually owns it.
Chisato · · 5 min read What Is Confidential Computing? Encrypting Data in Use
Confidential computing uses hardware-isolated enclaves to keep data encrypted even while it's being processed, not just at rest or in transit.