Skip to main content

TpmBackend

Trait TpmBackend 

Source
pub trait TpmBackend: Backend {
    // Required methods
    fn tpm_info(&mut self) -> Result<TpmInfo, BackendError>;
    fn read_pcrs(
        &mut self,
        pcrs: &[u8],
    ) -> Result<BTreeMap<u8, PcrValue>, BackendError>;
    fn extend_pcr(&mut self, pcr: u8, data: &[u8]) -> Result<(), BackendError>;
    fn generate_quote(
        &mut self,
        pcrs: &[u8],
        nonce: &[u8],
    ) -> Result<Attestation, BackendError>;
}
Expand description

TPM 2.0 operations.

Provides TPM-specific functionality: device info, PCR operations, and quote generation.

Required Methods§

Source

fn tpm_info(&mut self) -> Result<TpmInfo, BackendError>

Get TPM information (version, manufacturer, firmware).

Source

fn read_pcrs( &mut self, pcrs: &[u8], ) -> Result<BTreeMap<u8, PcrValue>, BackendError>

Read PCR (Platform Configuration Register) values for the given PCR indices.

Returns a BTreeMap keyed by PCR index for deterministic ordering in transcripts.

Source

fn extend_pcr(&mut self, pcr: u8, data: &[u8]) -> Result<(), BackendError>

Extend a PCR register with new data.

Source

fn generate_quote( &mut self, pcrs: &[u8], nonce: &[u8], ) -> Result<Attestation, BackendError>

Generate a TPM quote (signed attestation over PCR values).

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§