Expand description
tf-embedded-hal — TrustForge embedded HAL traits (Phase K8).
These traits are the abstraction surface that downstream embedded
crates (LoRa drivers, BLE stacks, ATECC608 driver shims, ESP32
HW-RNG bindings, etc.) implement. The tf-core-no-std crate
consumes these traits to do its job — sign, verify, send, receive
— without taking a hard dependency on any specific transport or
crypto-store backend.
All traits are object-safe-friendly and #![no_std]-clean. Each
has an associated Error type so a driver can surface its own
transport-specific failure modes without forcing a single global
error enum.
Mock implementations live in adapters for unit tests and for use
by host-side simulators.
Modules§
- adapters
- In-memory adapters for unit tests and host-side simulators. None of these touch real hardware; they exist so the trait surface is exercisable end-to-end without bring-up of a board.
Traits§
- BleAdvertiser
- BLE advertiser, used by TrustForge’s BLE-bridge profile to push short signed packets via advertising payloads.
- Entropy
- Hardware random number generator. Used by
tf-core-no-stdcallers that need fresh nonces / packet IDs without pulling ingetrandom(which lacks a default backend on bare metal). - Lora
Radio - LoRa-style packet radio. Send/receive are independent so a half- duplex driver implements both methods.
- NfcReader
- NFC reader / receiver — a one-shot tap-to-pair transport for constrained-mode capability handover.
- Secure
Element - A hardware-backed signing key (e.g. ATECC608 / SE050 / Nitrokey).
The private material never leaves the device; signing happens via
sign(msg).