Skip to content

Conversation

@liuw1
Copy link
Contributor

@liuw1 liuw1 commented Nov 20, 2025

fix #598

These tool can be used to automatically generate policy with corresponding td info measurement.

Example Usage:

Generate new key pair for policy signing

bash sh_script/key_gen.sh

build migtd with existing policy

cargo clean
cargo image --no-default-features --features stack-guard,virtio-serial,spdm_attestation --policy-v2 --policy config/templates/policy_v2_signed.json --policy-issuer-chain key/migtd_issuer_chain.pem --debug

Build migtd-hash tool

pushd tools/migtd-hash
cargo build
popd

Generate new measurement with updated TCB mapping

./target/debug/migtd-hash --manifest config/servtd_info.json --image target/debug/migtd.bin --policy-v2 --update-tcb-mapping config/templates/tcb_mapping.json

Resign policy with generated keys

bash sh_script/build_policy_v2.sh preprod

Rebuild migtd with new policy

cargo clean
cargo image --no-default-features --features stack-guard,virtio-serial,spdm_attestation --policy-v2 --policy config/templates/policy_v2_signed.json --policy-issuer-chain key/migtd_issuer_chain.pem --debug

@liuw1 liuw1 requested a review from jyao1 as a code owner November 20, 2025 06:53
@liuw1 liuw1 force-pushed the 1120/tools branch 3 times, most recently from 02c5090 to 6df192a Compare November 20, 2025 07:36
@liuw1 liuw1 marked this pull request as draft November 20, 2025 07:47
@liuw1 liuw1 marked this pull request as ready for review November 20, 2025 15:02
@jyao1 jyao1 merged commit 3e4dc09 into intel:main Nov 21, 2025
50 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add script to auto calculate td info & update tcb_mapping.json and resign all components

2 participants