feat(tdx-attest): Rewrite TDX attestation in pure Rust #466
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
tdx-attestin pure Rust, eliminating C code dependencytdx-attest-sysdependency fromtdx-attestChanges
tdx-attest/src/linux.rs: Complete rewrite with:
/dev/tdx_guest(legacy)tdx-attest/src/dummy.rs: Simplified stub implementation
tdx-attest/Cargo.toml: Replace
tdx-attest-syswithlibc+vsocktdx-attest/examples/test_tdx.rs: Test program with dcap-qvl verification
API
The public API:
get_quote(report_data: &[u8; 64]) -> Result<Vec<u8>>get_report(report_data: &[u8; 64]) -> Result<TdxReport>extend_rtmr(index: u32, event_type: u32, digest: [u8; 48]) -> Result<()>Test Results
dstack 0.6.0 (kernel 6.17.6-dstack)
dstack 0.5.4 (kernel 6.9.0-dstack)
Build Verification
cargo build -p tdx-attestcargo build --target x86_64-unknown-linux-musl -p tdx-attestdstack-attest,dstack-utilcargo clippy -p tdx-attest