Log date · Thu
Why does TEE attestation need reproducible builds?
Attestation checks a runtime measurement; reproducible builds help connect an artifact to source. We compare the effect of timestamps.
Why does TEE attestation need reproducible builds?
Remote attestation helps a verifier check a measurement of code running in a TEE; a reproducible build helps connect the measured artifact to the expected source. These are different steps. A 2026 study of 115 TEE deployments found 91% were not reproducible; about 80% supplied neither source code nor a reference build. [1]
We compiled our own small C sample with Apple clang. Changing only its embedded timestamp produced different object files; fixing the timestamp produced byte-identical objects. This is a same-machine illustration of the underlying issue, not a TEE test or a replication of the paper.
| Question | Finding |
|---|---|
| What did the study cover? | 115 SGX, TDX and SEV deployments; 91% were not reproducible. |
| What did a changed timestamp do in our sample? | The two object files differed. |
| With a fixed timestamp? | The two object files were byte-identical. |
| What do attestation and rebuilding establish? | They check a runtime measurement and the source-to-artifact link, respectively. |
What the paper studied
On 2026-09-10 UTC, Annika Wilde, Marco Gutfleisch, Felix Reichmann, Anirban Chakraborty, Yuval Yarom, M. Angela Sasse and Ghassan Karame submitted v1 of the paper. It covers Intel SGX, Intel TDX and AMD SEV. The authors contacted maintainers of 50 SGX projects and interviewed 12 developers; only one named reproducibility as a development priority. [1]
The paper distinguishes technical causes from organizational ones: timestamps can change artifacts, while a project with multiple stakeholders may lack control over its whole build environment. The percentages describe the deployments selected for the study, not every application. The paper concerns server-side TEEs; applying its reasoning to mobile or desktop releases is our analogy.
A controlled timestamp comparison
Our sample embeds BUILD_STAMP from a generated header in an object file. We used the same source, compiler flags and local compiler, with 10:00 in one header and 10:01 in the other; another pair used the same 10:00 value. The artifact compared is an object file, before linking, signing or deployment.
#include <stdio.h>
#include "build_stamp.h"
int main(void) { puts("build=" BUILD_STAMP); return 0; }We used cmp to compare bytes and strings to show the embedded values. The fixed pair also has matching SHA-256 hashes; the changed pair has different hashes. Identical outputs after fixing this input show that the timestamp accounts for this comparison, not that every source of variation in another build is resolved.
one vs two: different
fixed-a vs fixed-b: identical
== embedded timestamps ==
one: build=2026-09-10T10:00:00Z
two: build=2026-09-10T10:01:00Z
fixed-a: build=2026-09-10T10:00:00Z
fixed-b: build=2026-09-10T10:00:00ZFrom source to a trusted measurement
A reproducible build means that any party can recreate the specified artifacts bit for bit from the same source, build environment and instructions. [2] Two builds on one machine are a useful first screen; an independent environment is better at exposing machine paths, dependencies or toolchain differences. First define the artifact: an object, final executable, package or TEE image can involve different build and signing steps.
The verifier also needs a trustworthy expected measurement and must validate the attestation and its policy under the relevant platform protocol. A matching build hash alone does not establish that source is safe or that a remote machine is running that artifact now. Signing, notarization, App Attest and Play Integrity have different verification scopes; do not treat them as interchangeable TEE attestations.
SOURCE_DATE_EPOCH is a convention for supplying a fixed time as Unix seconds; it affects tools that actually consume it. [3] Our comparison wrote a fixed header directly and did not test that variable. Random seeds are also build inputs. Whether to fix or reuse one depends on the protection tool’s documentation and security requirements; it is not a universal rule.
Recommendations by situation
These are engineering recommendations, not benefits measured by our experiment. Decide who needs to verify what, then retain the evidence needed to rebuild and compare.
| Situation | Recommendation |
|---|---|
| TEE attestation depends on an expected measurement | Record the source revision, build inputs and artifact-to-measurement mapping; validate the platform attestation policy. |
| Two local builds differ | Compare intermediate outputs; inspect timestamps, paths, dependencies and generators. |
| Local builds match | Rebuild independently and compare the agreed final artifact. |
| Signing or protection introduces variation | Define the comparison boundary before and after signing; record configuration and seeds under the tool documentation. |
For each release, associate toolchain versions, dependency lockfiles, commands, configuration, seed policy, artifact hashes and signing details with the same version. Restrict access to sensitive build material. Keeping a hash does not replace retaining the dependencies needed to rebuild, or verifying signatures.
Run the check on your own project
Use your project’s release commands in two clean directories with the same recorded source revision and toolchain. Replace the paths below with your actual artifacts; do not overwrite release files in production directories.
cmp -s build-a/path/to/artifact build-b/path/to/artifact && echo identical || echo different
shasum -a 256 build-a/path/to/artifact build-b/path/to/artifactIf they differ, first confirm both files exist and the commands succeeded, then narrow the difference to the first build stage where it appears. Inspect generated times, absolute paths, archive metadata, dependency resolution and protection configuration; use format-appropriate tools where needed. Rebuild and retest after a fix, then have an independent builder verify the same inputs.
Finally connect the comparison to the release process: confirm that the archived artifact, signing information and expected measurement refer to the same release, and test how the server handles verification failure. A successful comparison is evidence for one version and scope; repeat it after toolchain or configuration changes.
Your checklist
- Record source revision, toolchain, dependencies and build configuration.
- Define the artifact and comparison boundary around signing.
- Rebuild in clean environments and compare bytes.
- Investigate timestamps, paths, metadata and random inputs.
- Associate release hashes and signing details with expected measurements.
- Test the server policy for failed attestation.
Primary sources
- arXiv: "They don't care about this": A Systematic Study of TEE Build Reproducibility in the Wild (2609.11411) · Source date 2026-09-10 · Checked 2026-10-12
- Reproducible Builds: Definitions · Checked 2026-11-11
- Reproducible Builds: SOURCE_DATE_EPOCH · Checked 2026-11-11
- Clang Compiler User’s Manual · Checked 2026-11-11