Module tpm

Module tpm 

Source
Expand description

TPM/HSM support for rust-bottle.

This module provides an interface for using Trusted Platform Modules (TPM) and Hardware Security Modules (HSM) with rust-bottle’s ECDH operations.

§Example

use rust_bottle::tpm::ECDHHandler;
use rust_bottle::ecdh::ecdh_encrypt_with_handler;
use rand::rngs::OsRng;

// Create a TPM handler (implementation depends on your TPM library)
// let tpm_handler = TpmHandler::new()?;

// Use it for encryption
// let ciphertext = ecdh_encrypt_with_handler(
//     &mut OsRng,
//     b"Secret message",
//     &public_key_bytes,
//     Some(&tpm_handler),
// )?;

Traits§

ECDHHandler
Trait for ECDH operations that can be performed by TPM/HSM backends.