1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
//! `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.
use Debug;
/// LoRa-style packet radio. Send/receive are independent so a half-
/// duplex driver implements both methods.
/// BLE advertiser, used by TrustForge's BLE-bridge profile to push
/// short signed packets via advertising payloads.
/// NFC reader / receiver — a one-shot tap-to-pair transport for
/// constrained-mode capability handover.
/// A hardware-backed signing key (e.g. ATECC608 / SE050 / Nitrokey).
/// The private material never leaves the device; signing happens via
/// `sign(msg)`.
/// Hardware random number generator. Used by `tf-core-no-std`
/// callers that need fresh nonces / packet IDs without pulling in
/// `getrandom` (which lacks a default backend on bare metal).