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
73
//! User-custody API — typed keystores, key schemes, and unlocked signer handles.
//!
//! Everything in this module deals with a *user's* long-lived key material: the
//! typed [`Keystore<K>`](keystore::Keystore) container, the
//! [`KeyScheme`](scheme::KeyScheme) implementations that pin each scheme's
//! secret length and public-key derivation, and the
//! [`SignerHandle<K>`](signer::SignerHandle) returned by unlocking one.
//!
//! # Why this is a separate, non-default module
//!
//! The crate's *core* — [`crate::opaque`] sealing, [`crate::backend`],
//! [`crate::format`], [`crate::cipher`], [`crate::kdf`] — is machine-key
//! plumbing: seal these bytes under this password, store them, read them back.
//! It has no notion of whose key it is. The custody API is the opposite: it
//! models a user's identity key and hands out a signer for it.
//!
//! Consumers that only need machine-key sealing (notably the DIG node engine,
//! which is deliberately identity-agnostic) build without the `custody`
//! feature, so the custody types are not nameable in their dependency closure.
//! See `SPEC.md` §18 for the feature tiers and for the honest limits of that
//! guarantee under Cargo feature unification.
//!
//! The module boundary is a hard one: nothing under `custody/` is referenced by
//! the core modules. That is what keeps a future extraction into its own crate
//! a file move rather than a redesign.
pub
pub