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
//! Hardware-anchored key material.
use crateResult;
/// A handle to key material that lives inside hardware.
///
/// The private key bytes never leave the bound device; implementations
/// MUST refuse any extraction primitive. Only the public key, an opaque
/// anchor identifier, signing, and verification are exposed.
///
/// Implementations are typically backed by:
///
/// - **TPM 2.0** with a non-migratable key under a sealing policy
/// - **YubiKey** PIV slot or PGP card
/// - **Secure Enclave** on Apple silicon
/// - **HSM** for datacenter deployments
///
/// The [`anchor_id`][Self::anchor_id] string is the stable identifier
/// the rest of the stack uses to reason about *which* hardware backed a
/// given signature. Recommended format: `tpm:sha256:<digest>` or
/// `yubikey:serial:<n>` or `se:keyid:<base64>`.