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
//! MLS (Messaging Layer Security) group encryption for secure agent communication.
//!
//! Two planes live here:
//! - `group` wraps `saorsa_mls::MlsGroup` — the **legacy GSS** plane
//! (per-epoch shared secret; no forward secrecy / no post-compromise
//! security). Retained for grandfathered groups.
//! - `treekem` wraps `saorsa_mls::TreeKemGroup` — **real RFC-9420 TreeKEM**
//! (FS + PCS), the default for new `MlsEncrypted` groups.
//!
//! See ADR-0010 (GSS) and ADR-0012 (TreeKEM default) for the migration plan.
pub use MlsCipher;
pub use ;
pub use ;
pub use MlsKeySchedule;
pub use TreeKemMlsGroup;
pub use MlsWelcome;
use crateAgentId;
use ;
/// Which secure-group plane a group runs on. Persisted in group metadata so the
/// daemon can dispatch secure-content and membership operations to the right
/// implementation while the legacy GSS plane (`group`) and the real-TreeKEM
/// plane (`treekem`) coexist (ADR-0012). Lives here, not inside either plane,
/// because it is the neutral discriminator *between* them.
/// Deterministic legacy-GSS bridge from an x0x [`AgentId`] (32 bytes) to a
/// saorsa-mls `MemberId` (16 bytes): the first 16 bytes of the AgentId.
///
/// Real TreeKEM groups deliberately do **not** use this stable cross-group label;
/// they derive a per-group `MemberId` in `treekem` so one agent is unlinkable
/// across groups. Keep this helper scoped to the legacy GSS plane and migration
/// code that explicitly accepts that stable label.
///
/// Note: this truncates a 32-byte SHA-256-derived id to 16 bytes, so `MemberId`
/// is a stable *label*, not a collision-free unique key; do not rely on it for
/// agent uniqueness (the leaf's public keys are the cryptographic identity).
pub