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
74
75
76
77
78
79
80
/// Matter 1.3 Secure Channel — PASE and CASE session establishment.
///
/// Implements Matter Core Specification §4.13 (CASE/SIGMA) and §4.14 (PASE).
///
/// # Session establishment flow
///
/// ```text
/// PASE (commissioning, password-based):
/// Commissioner ──PBKDFParamRequest──> Commissionee
/// Commissioner <─PBKDFParamResponse── Commissionee
/// Commissioner ──Pake1─────────────> Commissionee
/// Commissioner <─Pake2────────────── Commissionee
/// Commissioner ──Pake3─────────────> Commissionee
/// (both derive session keys from SPAKE2+ Ke)
///
/// CASE (operational, certificate-based):
/// Initiator ──Sigma1──> Responder
/// Initiator <─Sigma2─── Responder
/// Initiator ──Sigma3──> Responder
/// (both derive session keys via ECDH + HKDF)
/// ```
// ── Protocol constants ────────────────────────────────────────────────────────
/// Secure Channel protocol identifier (used in Exchange header).
pub const SECURE_CHANNEL_PROTOCOL_ID: u16 = 0x0000;
// ── Protocol opcodes ──────────────────────────────────────────────────────────
/// Opcodes for Secure Channel protocol messages.
// ── Established session ───────────────────────────────────────────────────────
/// A fully established Matter session with symmetric keys ready for use.
///
/// After a successful PASE or CASE handshake, both sides hold an
/// `EstablishedSession` with:
/// - A session ID pair (local ↔ peer).
/// - Symmetric AES-128 keys: `encrypt_key` (outbound) and `decrypt_key` (inbound).
/// - A 32-byte attestation challenge.
/// - (CASE only) The authenticated peer Node ID.
// ── Re-exports ────────────────────────────────────────────────────────────────
pub use ;
pub use ;