Short of a physically sealed path from the chip to all components that benefit from its knowledge (impossible on a desktop?), that can only be destructively accessed (triggering an alarm; like case-open switches) - I don't see how this can be defended against.
Newer CPUs (since about 5 years ago) have the TPM embedded in the CPU. Intel calls this PTT and AMD calls it fTPM.
You can also use a shared secret, but storing a secret on the host side is even harder than storing a write-once (at factory), read-only PK.
0: Know the public key of a fixedTPM+fixedParent primary key (e.g., the "endorsement key") on the TPM ahead of time[0].
1: call TPM2_CreatePrimary() in the clear to "create" that key (this is deterministic given a public template and factory seed secret to the TPM) -- you need the "handle" for this key
2: call TPM2_StartAuthSession() with that handle as the bindKey, and various other parameters
3: use that session in all subsequent commands.
Note: only one parameter of every command can be encrypted: the first parameter (command or response parameter) of type TPM2B_PRIVATE. The rest can be authenticated but are otherwise exchanged in plaintext. This is mostly just fine.
[0] Well, you could validate the EK's certificate, and then you only need to know the trust anchors for the TPM's vendor. It's roughly the same thing, but with more steps, and it lets you replace the TPM w/o having to re-learn a public key for it (which might be important).
What’s preventing an attacker from changing that key? Or is this just to change the attack from passive to active?
You can read the public key from the TPM. If you're using the endorsement key, it comes with a certificate issued by the vendor.
That would make it much harder as you'd have to MITM the communication, not just sniff it. Maybe impossible to decrypt if both the TPM and the chip it's communicating with use keys signed by the manufacturer.
Sounds pretty similar to TLS to me, in my non-expert opinion.
I don’t really see how it is possible to defend against that. But I don’t quite understand how the TPM checks what the CPU is doing either.
I don't think it checks what the CPU is doing at all. It just makes software able to check if the platform is signed by the manufacturer.
The way I understand it is that the keys are burned into the TPM at time of manufacture, and there is no way to extract those keys, software can only ask the TPM to encrypt/decrypt/sign/verify certain data using the keys.
The TPM can then be used to verify certain operations, eg to retrieve the key for an encrypted hard drive.
But it's all a trojan horse because the manufacturer is the one who controls the keys, not the user.
It's "trusted" in the sense that the platform is "trusted" by the manufacturer, not the user.
You can also pair the chip and the CPU at the factory or on initial powerup and have them communicate encrypted from thereon. This is a bit like the iPhone 13 display having some FaceID chip on it where a replacement with a wholly new display will leave FaceID non-functioning.
People will find a way. In the end, if a target gets big enough, someone will do it.
For the T2, at least macOS uses a key derived from useryou need both chip control _and_ user password to get in)
Windows does not, relying instead on TPM only in a default BitLocker configuration. (with a PIN option via Group Policy, not part of the regular flow)
As of why that's bad: https://msrc.microsoft.com/update-guide/vulnerability/CVE-20...
https://scholar.google.com/scholar?as_q=%22Differential+Powe...