-
Notifications
You must be signed in to change notification settings - Fork 83
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
verifier: verify init_data in az-*-vtpm verifiers
This is in preperation for the upcoming init_data feature. On the attester equivalent we have settled for PCR8 to measure init_data into. This register is usually occupied by GRUB, since we use UKI images for peerpods this is vacant. We cannot merely compare the hash entries, since PCR registers are extend-only. PCR8 will be filled with 0s initially and extended with the init_data digest. For a given init_data the PCR will contain: ```bash sha256sum -b <(cat \ <(dd if=/dev/zero of=/dev/stdout bs=32 count=1) \ <(xxd -r -ps < /run/peerpod/initdata.digest) \ ) 1+0 records in 1+0 records out 32 bytes copied, 4.7e-05 s, 681 kB/s bddaccb9c52249e97a31baea61b7d91be8221a16e703d92148d04fb8e9c1dfdd */dev/fd/63 ``` `bdda...` is the value we want to verify. We cannot perform a simple equality check, but have to replay the extend operation. that's also why the checks have to be somewhat local to a TEE verifier implementation. An option would be an overrideable default on the Verifier Trait. If we later move the init_data verification to a more generic place, we would call a verifier's `verify_init_data()` impl. Signed-off-by: Magnus Kulke <[email protected]>
- Loading branch information
Showing
2 changed files
with
90 additions
and
24 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters