There is a recently merged RFC in Cerberus that adds tables to the effect of
message AttestationLogFormat
Type
Name
Description
0x0b
header_format
Header format version.
b16
entry_length
Total length of the entry.
b32
unique_id
A unique identifier for the entry.
b32
tcg_type
The associated TCG event type.
b8
measurement_index
Index of the measurement within the PMR.
b8
pmr_index
Index of the PMR being extended.
0x0000
_
Reserved.
b8
digest_count
Number of digests.
0x0000
_
Reserved.
0x0b
digest_algo_id
Digest algorithm ID, fixed to SHA-256.
b256
digest
SHA-256 digest used to extend the measurement.
[b32]
measurement
The measurement value.
I designed these tables on the assertion I wanted them to be machine-parseable; this PR is intended to make well on that promise.
Currently, I can only parse things and pretty-print them. Testing this kind of parser is... a pain, so I'm open to suggestions for parsing strategies. I'm not sure if unit tests will be terrifically useful but I can definitely give them a shot.
A followup will add a mode for emitting naive std-using Rust code, and from there we can work on writing a real parser generator.
There is a recently merged RFC in Cerberus that adds tables to the effect of
message AttestationLogFormat
0x0b
header_format
b16
entry_length
b32
unique_id
b32
tcg_type
b8
measurement_index
b8
pmr_index
0x0000
_
b8
digest_count
0x0000
_
0x0b
digest_algo_id
b256
digest
[b32]
measurement
I designed these tables on the assertion I wanted them to be machine-parseable; this PR is intended to make well on that promise.
Currently, I can only parse things and pretty-print them. Testing this kind of parser is... a pain, so I'm open to suggestions for parsing strategies. I'm not sure if unit tests will be terrifically useful but I can definitely give them a shot.
A followup will add a mode for emitting naive
std
-using Rust code, and from there we can work on writing a real parser generator.