TeeProviderBase<T>

Base Classes · AiDotNet.FederatedLearning.TEE

Base class for TEE providers with common enclave lifecycle, sealing, and attestation logic.

Inheritance: FederatedLearningComponentBase<T> → TeeProviderBase<T>

Implements: ITeeProvider<T>

Known derived types: AmdSevSnpTeeProvider<T>, ArmCcaTeeProvider<T>, IntelSgxTeeProvider<T>, IntelTdxTeeProvider<T>, SimulatedTeeProvider<T>

For Beginners

All TEE providers share common patterns — initializing an enclave, sealing/unsealing data, generating attestation quotes. This base class implements those patterns so that each hardware-specific provider (SGX, TDX, SEV-SNP, etc.) only needs to implement the platform-specific parts.

How It Works

Data sealing uses AES-256-GCM with a key derived from the enclave identity. In simulation mode the key is derived from HKDF; in production the hardware provides a sealing key bound to the enclave measurement.

Properties

Property Summary
TeeProviderType ProviderType { get; }
bool IsInitialized { get; }

Methods

Method Summary
byte[] GenerateAttestationQuote(byte[] reportData)
byte[] SealData(byte[] plaintext)
byte[] UnsealData(byte[] sealedData)
long GetMaxEnclaveMemory()
string GetMeasurementHash()
void Destroy()
void Initialize(TeeOptions options)