Skip to main content

tenzro_tee/
lib.rs

1//! TEE (Trusted Execution Environment) abstraction layer for Tenzro Network.
2//!
3//! This crate provides a unified interface for working with different TEE technologies:
4//! - Intel TDX (Trust Domain Extensions)
5//! - AMD SEV-SNP (Secure Encrypted Virtualization - Secure Nested Paging)
6//! - AWS Nitro Enclaves
7//!
8//! The abstraction allows Tenzro Network to leverage confidential computing across
9//! different hardware platforms while maintaining a consistent API.
10
11pub mod attestation;
12pub mod certs;
13pub mod detection;
14pub mod enclave_crypto;
15pub mod enclave_keystore;
16pub mod error;
17pub mod registry;
18pub mod sealed_agent_keypair;
19pub mod sealed_secp256k1;
20pub mod traits;
21
22#[cfg(feature = "intel-tdx")]
23pub mod intel_tdx;
24
25#[cfg(feature = "amd-sev-snp")]
26pub mod amd_sev_snp;
27
28#[cfg(feature = "aws-nitro")]
29pub mod aws_nitro;
30
31#[cfg(feature = "nvidia-gpu")]
32pub mod nvidia_gpu;
33
34#[cfg(feature = "intel-tiber")]
35pub mod intel_tiber;
36
37// Re-export commonly used items
38pub use error::{TeeError, Result};
39pub use traits::TeeProvider;
40pub use detection::detect_tee;
41pub use registry::TeeRegistry;
42pub use attestation::{AttestationVerifier, ParsedCertificate, parse_x509_certificate, verify_certificate_signature};
43pub use sealed_agent_keypair::{
44    attest_agent_key, pack_user_data_for_vendor, rotate_agent_key, seal_agent_keypair,
45    AgentKeyAttestationPacket, AgentKeyHandle,
46};
47pub use sealed_secp256k1::SealedSecp256k1Key;
48
49// Re-export vendor implementations
50#[cfg(feature = "intel-tdx")]
51pub use intel_tdx::IntelTdxProvider;
52
53#[cfg(feature = "amd-sev-snp")]
54pub use amd_sev_snp::AmdSevSnpProvider;
55
56#[cfg(feature = "aws-nitro")]
57pub use aws_nitro::AwsNitroProvider;
58
59#[cfg(feature = "nvidia-gpu")]
60pub use nvidia_gpu::NvidiaGpuProvider;
61
62#[cfg(feature = "intel-tiber")]
63pub use intel_tiber::{
64    claims_to_attestation_result, AttestRequest as TiberAttestRequest, IntelTiberClient,
65    TiberClaims, TiberJwksPin, TokenSigningAlg as TiberTokenSigningAlg,
66    VerifierNonce as TiberVerifierNonce, ATTEST_PATH as TIBER_ATTEST_PATH,
67    NONCE_PATH as TIBER_NONCE_PATH, TIBER_API_URL_EU, TIBER_API_URL_US,
68};
69
70// Re-export types from tenzro-types
71pub use tenzro_types::tee::*;