Closed jiazhang0 closed 8 months ago
I think we may need two different mode for td-payload-reference-calculator. 1) Non-UEFI based, such as Td-shim 2) UEFI based, such as TDVF/OVMF
NOTE: This tool can only calculate the one measured by the TDVF or td-shim. If a component is measured in Linux (such as initrd by Grub or Linux EFI-stub), then it is not calculated here.
I will check this one
td-payload-reference-calculator is a common tool to calculate the typical artifacts for TDX.
Currently, kernel, cmdline and initrd eventlog digests are required to be calculated and verified when using TDVF + QEMU Kernel Direct Boot for CoCo.
Note that kernel eventlog digest is pre-processed by QEMU Kernel Direct Boot logic prior to PE authenticode. Here is the pseudocode and qemu source code references:
where
p
is the pointer to the base address of kernel image. There is a demo program https://github.com/jiazhang0/sbsigntools to calculate the kernel eventlog digest with 2 modes: