Repository navigation
attest: add derive subcommand for PCR-bound key derivation - #11
Merged
Merged
Conversation
Split the CLI into subcommands: vaportpm-attest attest [NONCE_HEX] vaportpm-attest derive <LABEL> <LEN> [--exclude <PCRS>] `derive` exposes DeriveOps::derive_pcr_bound, bound to PCRs 0-23 less any --exclude'd (comma-separated, validated 0-23, no repeats) -- e.g. PCR5, which moves when a loader rewrites the GPT on first boot. Output is hex. Breaking: the bare `vaportpm-attest [NONCE_HEX]` form is gone; callers must use `vaportpm-attest attest [NONCE_HEX]`. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
stage0 now builds its Secure Boot varstores with tools/mkvarstore.py (stdlib only), so nothing runs virt-fw-vars, and pip was installed only for it. Synced from stage0's canonical copy (workspace `make sync-harness`). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
vaportpm-attestCLI intoattest [NONCE_HEX]andderive <LABEL> <LEN> [--exclude <PCRS>].derivecallsDeriveOps::derive_pcr_boundover PCRs 0-23 minus any excluded set, and prints hex. The same TPM at the same bound PCR state reproduces identical bytes; any change to a bound PCR changes the output.--excludeexists for PCRs that move while the platform is unchanged (e.g. PCR5 after a loader rewrites the GPT on first boot), or that the caller does not want keys to follow. Excluding a PCR removes it from the binding, so keys survive changes to it -- choose deliberately.Breaking change
The bare
vaportpm-attest [NONCE_HEX]form is removed; usevaportpm-attest attest [NONCE_HEX]. Stdin and random-nonce fallbacks are unchanged.Test plan
make ciderivetwice at the same PCR state -> identical output; extend a bound PCR -> different output; extend an excluded PCR -> unchanged🤖 Generated with Claude Code