Skip to main content

Crate hsm_crypto_service

Crate hsm_crypto_service 

Source
Expand description

Crypto business logic for the mini-HSM.

This crate sits between the low-level [atecc608b] driver and the USB protocol layer. It owns the slot conventions, the PIN session state, and the orchestration of the multi-step signing workflow (Nonce passthrough followed by Sign external).

Re-exportsยง

pub use error::CryptoServiceError;
pub use session::Clock;
pub use session::Session;
pub use session::SESSION_TIMEOUT_MS;

Modulesยง

encrypted_write ๐Ÿ”’
Host-side cryptography for the ATECCโ€™s encrypted write flow.
error
Error type returned by the crypto service.
pin ๐Ÿ”’
PIN / PUK hashing and CheckMac MAC computation.
service ๐Ÿ”’
High-level crypto service exposed to the USB layer.
session
PIN session bookkeeping.
slots ๐Ÿ”’
Slot-mapping convention used by this firmware.

Structsยง

CryptoService
High-level crypto orchestrator.