Report format
One round carries three frames over the TLS connection (Verifier): the verifier's challenge, the agent's report and the verifier's result. The C side is include/attestation.h, serialized by src/agent/report.c; the Go side is src/verifier/types/report.go. The verifier reads and writes every integer little-endian, and the structs have no padding.
All three frames open with the same two words:
magic0x41544F4C,LOTAin little-endian (LOTA_MAGIC).versionThe report version,
major << 16 | minor << 8 | patch(LOTA_REPORT_VERSIONin include/lota.h). It is0x00010000, 1.0.0.
Challenge
48 bytes, sent by the verifier when the TLS handshake completes.
Offset |
Size |
Field |
Content |
|---|---|---|---|
0 |
4 |
|
|
4 |
4 |
|
|
8 |
32 |
|
Fresh random nonce. |
40 |
4 |
|
The PCRs to quote, bit n for PCR n. |
44 |
4 |
|
Bit 0, |
The agent refuses a challenge with another magic and does not check the version.
Report
A fixed part of 5324 bytes, then three sections of which two vary in length:
Offset |
Content |
|---|---|
0 |
Header, 16 bytes. |
16 |
TPM evidence, 4912 bytes. |
4928 |
System measurement, 396 bytes. |
5324 |
|
5328 |
The TPM event log, |
5328 + L |
ESRT entry, 28 bytes. |
5356 + L |
|
5360 + L |
The MOK list, |
L is event_log_size. Every section is present in every report, so the
smallest report is 5360 bytes. A host with nothing to put in a section says so
in it: an event log or a MOK list of size 0, an ESRT entry with present
0.
The event log holds at most 524288 bytes and the MOK list at most 32768, so the largest report is 562416 bytes. The agent sends a longer event log or MOK list as size 0.
Header
Offset |
Size |
Field |
Content |
|---|---|---|---|
0 |
4 |
|
|
4 |
4 |
|
|
8 |
4 |
|
The length of the whole report in bytes. |
12 |
4 |
|
The verifier reads the first 32 bytes, then report_size bytes in all.
Bytes past the end of the MOK list are read and ignored.
Report flags
Bit |
Flag |
Meaning |
|---|---|---|
0 |
|
The agent verified the IOMMU. |
1 |
|
The TPM quote succeeded. |
2 |
|
The boot measurement digest was captured. |
3 |
|
The agent has its LSM loaded. |
4 |
|
The kernel enforces module signatures. |
5 |
|
Kernel lockdown is on. |
6 |
|
Secure Boot is on, as the agent sees it. |
7 |
|
The agent enforces with its LSM. |
8 |
|
The agent extended its boot commitment into PCR 14. |
9 |
|
The initramfs extended its lock into PCR 14 before the agent ran. |
10 |
|
IMA appraises executables in a blocking mode. |
11 |
|
The agent runs with |
12 |
|
The agent applies this policy key. |
13 |
|
The agent applies this policy key. |
14 |
|
The agent applies this policy key. |
15 |
|
The agent applies this policy key. |
16 |
|
The agent applies this policy key. |
17 |
|
The kernel left events out of the agent's log. |
The C names carry the prefix LOTA_REPORT_FLAG_. Bits 12 to 16 are set
only with ENFORCE.
The verifier refuses a report without bits 8 and 9 with pcr_fail. Bits 4,
5, 7 and 10 meet the require_module_sig, require_lockdown,
require_enforce and require_ima_appraisal keys of the policy
(policies/README.rst). Bit 6 meets no key: require_secureboot
reads the event log. Bits 0, 6, 11 and 12 to 17 are logged and change no
verdict; bits 1 to 3 are not read.
TPM evidence
Offset |
Size |
Field |
Content |
|---|---|---|---|
16 |
768 |
|
24 SHA-256 PCR values, PCR 0 first. |
784 |
4 |
|
The quoted PCRs, bit n for PCR n. |
788 |
512 |
|
The quote signature. |
1300 |
2 |
|
Its length, at most 512. |
1302 |
1024 |
|
The |
2326 |
2 |
|
Its length, at most 1024. |
2328 |
512 |
|
The AIK public key, DER SPKI. |
2840 |
2 |
|
Its length, at most 512. |
2842 |
2048 |
|
The AIK certificate, DER X.509. |
4890 |
2 |
|
Its length, at most 2048. |
4892 |
32 |
|
The challenge nonce. |
4924 |
2 |
|
|
4926 |
2 |
|
|
The extraData in attest_data holds a binding nonce, which ties the
quote to the report fields it does not sign:
SHA-256(nonce || flags & ~TPM_QUOTE_OK || kernel_hash || agent_hash ||
iommu.vendor || iommu.flags || iommu.unit_count ||
iommu.cmdline_param)
TPM_QUOTE_OK is left out because the agent sets it after the quote
(src/verifier/verify/attest.go).
System measurement
Offset |
Size |
Field |
Content |
|---|---|---|---|
4928 |
32 |
|
The boot measurement digest, SHA-256. |
4960 |
32 |
|
SHA-256 of the agent binary. |
4992 |
256 |
|
The kernel image path, as text. The verifier does not read it. |
5248 |
4 |
|
0 none, 1 Intel VT-d, 2 AMD-Vi. |
5252 |
4 |
|
|
5256 |
4 |
|
The number of IOMMU units. |
5260 |
64 |
|
The IOMMU boot parameter, as text. |
IOMMU flags
Bit |
Flag |
Meaning |
|---|---|---|
0 |
|
|
1 |
|
The boot parameter is set. |
2 |
|
A device group is in a translating domain. |
3 |
|
An interrupt goes through interrupt remapping. |
4 |
|
Strict mode, no lazy unmap. |
The C names carry the prefix IOMMU_FLAG_
(include/iommu_types.h). require_iommu reads bit 2 alone and
refuses with iommu_fail when it is clear.
Event log
The TCG event log the firmware and boot chain wrote, read from
/sys/kernel/security/tpm0/binary_bios_measurements. The verifier replays
it against the quoted PCRs (Verifier); the agent's side is in
Boot evidence.
ESRT entry
Offset |
Size |
Field |
Content |
|---|---|---|---|
0 |
4 |
|
1 when the ESRT holds a System Firmware entry, else 0. |
4 |
4 |
|
Its |
8 |
4 |
|
Its |
12 |
16 |
|
Its |
Offsets are from the start of the entry. The agent reads it from
/sys/firmware/efi/esrt/entries. The firmware version guards a
self-service re-anchor against rollback. present 0 puts it on the
low-firmware-assurance path when the pinned baseline had no ESRT either, and
escalates it when the baseline had one ("Re-anchor" in Verifier).
MOK list
The data of the MokListRT EFI variable, a run of EFI_SIGNATURE_LIST
structures, without the 4 attribute bytes efivarfs prefixes. The verifier
compares it with the MokList events of PCR 14 when it re-pins on a Machine
Owner Key change.
Result
24 bytes, sent by the verifier once the report is checked.
Offset |
Size |
Field |
Content |
|---|---|---|---|
0 |
4 |
|
|
4 |
4 |
|
|
8 |
4 |
|
The verdict code ("Verdicts" in Verifier). |
12 |
4 |
|
|
16 |
8 |
|
For |
The agent reads exactly 24 bytes (struct verifier_result in
src/agent/net.h), refuses another magic and does not check the
version. It prints valid_until in verbose mode and sets the validity of
its tokens from its own interval (Tokens).
Refused reports
Report |
Verdict |
|---|---|
Another magic |
|
|
|
562416 bytes |
body is read. |
Shorter than 5360 bytes, in any version |
|
Another version |
|
A length field above its buffer, a |
|
section above its limit, or a section |
|
cut off |
Versions
The verifier accepts the one version it is built with. A layout change, a
field added, removed or moved or a section added, changes
LOTA_REPORT_VERSION and ReportVersion together, and agents and
verifiers cross it together (Protocol versions).
lota-verifier --print-versions prints the version a build speaks.
Layout checks
The serializer copies the packed C structs, and the parser walks offsets of its own, so no build links the two. Four checks hold them together:
src/agent/report.c pins the size of each report struct with
_Static_assert, and src/agent/net.c the challenge and the result.tests/integration/test_report_wire_sizes.sh compares the sizes compiled from the C headers with the constants in
report.go.TestParseReport_FieldOffsetsMatchCLayoutin src/verifier/types/report_test.go writes a marker at each offset and requires the parsed report to show it in the matching field.tests/cross_lang/report_gen.c serializes a report whose every field carries a pattern derived from its position, and tests/cross_lang/report_verify.go parses it with the verifier's parser and checks each field.
make test runs the shell check and the pair; the Go test runs with
go test ./... in src/verifier.