How does TEE remote attestation work? Verify an execution environment with measurements
Remote attestation for a trusted execution environment (TEE) is more than checking a label that says “confidential VM.” It verifies hardware-rooted measurements and signatures to judge whether a specific environment meets an approved boot state and security policy. That decision can gate release of a secret key or sensitive data. Attestation supports claims about a defined environment state; it does not prove that an application is correct or that its output contains no secrets.
Remote attestation for a trusted execution environment (TEE) is more than checking a label that says “confidential VM.” It verifies hardware-rooted measurements and signatures to judge whether a specific environment meets an approved boot state and security policy. That decision can gate release of a secret key or sensitive data. Attestation supports claims about a defined environment state; it does not prove that an application is correct or that its output contains no secrets.
What does remote attestation verify?
A TEE is an environment in which hardware isolates memory and execution state. Remote attestation lets software inside it cryptographically show an external verifier which hardware and boot/software state it is running with. The verifier checks the evidence signer and issuer, then compares measurements with trusted reference values and policy. A relying party, such as a secret store, can use the result to decide whether to allow key use or data access.
The IETF RATS architecture describes three roles. An attester produces evidence about its state; a verifier evaluates that evidence against reference values and policy; and a relying party uses the appraisal result to control access. A product component may perform more than one role. “The evidence is valid” and “this request is authorized on that evidence” are separate decisions.
How are boot measurements and event logs produced?
During boot, components such as firmware, bootloader, kernel and user space load in sequence. Supported TEEs measure components and record the measurements in protected registers. TPM-style registers are called PCRs (Platform Configuration Registers). When an event is added, the register is extended by hashing its previous value together with the new measurement, binding the final value to the events and their order.
A register alone is hard for a person to interpret. A system may also record event names and measurements in an event log. A verifier can replay the events in order, check that the resulting hash matches the protected register, and then compare individual events with policy. This links the log to the measurement, but the log should not be trusted alone: it must be checked against protected measurements and signed evidence.
Why do signed evidence and a nonce matter?
If measurements are sent without freshness, an attacker could replay an old valid response. The verifier therefore sends a new, one-time random value called a nonce for each request. The attester includes it in signed evidence; the verifier checks that it matches the value it just issued and has not already been used. This makes reuse of evidence from an earlier session harder.
The verifier must also establish that the signing key is linked to genuine TEE hardware or an approved virtual TPM. It checks manufacturer certificates or a cloud endorsement chain and validates the report signature. Finally, it evaluates the technology, firmware security version, Secure Boot state and boot measurements required by policy. A valid signature is not enough if measurements are stale or unexpected.
How can evidence gate key release?
Consider this illustrative scenario: a service should let only a specific approved code use a customer-data decryption key.
A relying party, such as a secret-management service, gives the attester a fresh nonce and requests TEE evidence.
The hardware root of trust creates a signed report containing boot measurements and the nonce. The attester sends the report and any required measurement log to a verifier.
The verifier checks the trust certificate chain and signature, verifies nonce freshness, reconciles the log with protected registers, and compares firmware, boot state and workload measurements with approved values.
If the conditions pass, the verifier returns a signed appraisal result. The relying party validates its issuer and policy, then permits key use only for that TEE. It withholds the key if evidence is stale or a condition fails.
Approved code uses the key inside the TEE. A separate output policy governs decrypted data or results that leave the boundary.
This example explains roles, not a product-specific API. In Azure, a guest attestation library can send a platform report to Microsoft Azure Attestation, and a relying party such as a secret service can evaluate the resulting token. In AWS Nitro Enclaves, a request can include a signed document containing enclave measurements, which AWS KMS can compare with PCR conditions in a key policy.
What do different products measure and attest?
Measurement scope and roots of trust vary by TEE. Google Cloud documents the initial execution measurement for AMD SEV-SNP and measurement registers for Intel TDX as hardware roots of trust; guest boot components can be checked through vTPM event logs and PCRs. Azure’s guest-attestation design combines a TPM quote, hardware report and certificate chains. In that design, guest OS measurements are in the TPM quote, while UEFI and the guest paravisor are covered by the hardware report.
AWS Nitro Enclaves exposes PCR measurements for the image, Linux kernel/bootstrap, application, parent-instance role and identity, and image-signing certificate. KMS can compare image hashes or PCR conditions in a policy to restrict operations to an approved image or parent role. An enclave launched in debug mode or with console access produces an attestation document whose PCR values are all zero; that document must not authorize cryptographic access.
These measurement names and sets are not interchangeable. Do not apply PCR numbers or reference values from one implementation to another; consult the provider’s current measurement documentation and support matrix.
How should approval policy be maintained?
A policy is more than “allow if this measurement equals this value.” Define acceptable TEE technology, secure-boot state, firmware and OS security versions, workload image, and permitted key use. Then establish how new measurements are validated and approved when updates change them, and how old values are retired. A policy that is too broad can admit unintended code; one pinned too narrowly can interrupt service after a legitimate update.
A practical review sequence is:
Check provider documentation to confirm the VM type uses the intended TEE and measures the components you care about.
Confirm that the verifier checks signatures, certificate/endorsement chains, nonce freshness, measurement logs and policy.
Exercise rejection of stale nonces, invalid signatures, unexpected Secure Boot state and unapproved images, alongside a valid case.
Ensure the relying party reads only necessary claims from a verified result and limits key permissions.
Document measurement changes, revoked certificates, security updates, key rotation and recovery.
These are design checks, not results of testing a cloud account. For example, on supported Google Cloud configurations, this command can inspect the VM’s selected Confidential Computing type:
gcloud compute instances describe INSTANCE_NAME \\
--zone=ZONE_NAME \
--format="yaml(confidentialInstanceConfig)"That query checks configuration; it does not verify a nonce-bearing remote report or prove that a key policy works. Do not release a secret based only on a log or console label.
What does remote attestation not guarantee?
Attestation provides evidence about hardware, boot and software state within a defined scope and measurement point. It does not guarantee that the application has no vulnerabilities, approved code behaves as intended, input data is correct, or output contains no sensitive information. It does not automatically attest runtime behavior omitted from the measurement set.
Use the result as a scoped, time-bounded access decision. The key-release party must trust the verifier; the verifier must trust the hardware vendor’s certificate chain and reference values; and someone must manage measurements and policy changes. Event-log replay checks consistency with protected registers, not that every logged event is safe. TEE implementation flaws, side channels, application vulnerabilities, policy errors and data-output risks require separate controls.
References
[IETF RFC 9334: Remote ATtestation procedureS (RATS) Architecture](https://www.rfc-editor.org/rfc/rfc9334.html)
[Google Cloud: Remote attestation overview and measurement chain](https://docs.cloud.google.com/confidential-computing/confidential-vm/docs/attestation-overview)
[Google Cloud: Requesting and validating Confidential VM attestation reports](https://docs.cloud.google.com/confidential-computing/confidential-vm/docs/attestation)
[Microsoft: Azure Confidential VM vTPM attestation design](https://learn.microsoft.com/en-us/azure/confidential-computing/guest-attestation-confidential-virtual-machines-design)
[Microsoft: Confidential VM guest attestation flow](https://learn.microsoft.com/en-us/azure/confidential-computing/guest-attestation-confidential-vms)
[AWS: Nitro Enclaves cryptographic attestation and PCRs](https://docs.aws.amazon.com/enclaves/latest/user/set-up-attestation.html)
[AWS: KMS attestation-based key policies](https://docs.aws.amazon.com/enclaves/latest/user/kms.html)