Crate tdx_workload_attestation

Crate tdx_workload_attestation 

Source
Expand description

§Intel TDX Workload Attestation Library

This module provides a library for retrieving and verifying the attestations of Intel TDX (Trust Domain Extensions) VM workloads.

The library provides the following functionality:

  • error: Custom error types
  • gcp: Google Cloud Platform (GCP) host interface for TDX guests (when compiled with the host-gcp-tdx feature)
  • host: Host interface for VM-based trusted execution environment (TEE) guests (when compiled with the host-verification feature)
  • provider: Trusted execution environment (TEE) attestation interface
  • tdx: Intel TDX guest attestation interface (when compiled with the tdx-linux feature)
  • verification: Workload attestation verification utilities (when compiled with the host-verification feature)

§Example Usage

use tdx_workload_attestation::tdx::LinuxTdxProvider;
use tdx_workload_attestation::provider::AttestationProvider;
use tdx_workload_attestation::get_platform_name;

// Get the platform name
let platform = get_platform_name().unwrap();

// Create a new provider instance
match platform.as_str() {
    "tdx-linux" => {
        let provider = LinuxTdxProvider::new();

        // Get the attestation report
        let report = provider.get_attestation_report().unwrap();

        // Get the launch measurement
        let measurement = provider.get_launch_measurement().unwrap();

        // Do something else
    },
    // Can also throw an error here
    _ => println!("This platform does not support TDX"),
}

Modules§

error
TDX Workload Attestation Errors
provider
Trusted Execution Environment (TEE) Attestation Interface
tdx
Intel TDX Guest Attestation Interface

Functions§

get_platform_name
Retrieves the platform name for the current compute environment.