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
//! Stable, pairwise-disjoint domain-separation labels.
//!
//! Every `info` or `ad` argument that needs domain separation carries one of
//! these labels. Labels are byte-literal constants with the `sudp/v1/` prefix
//! to forbid cross-context replay.
/// Wrapping-key derivation label.
///
/// Used in `W_c = KDF(y_c; η_c, DS_wrap ‖ cid ‖ ver)`.
pub const DS_WRAP: & = b"sudp/v1/wrap";
/// Channel binding label.
///
/// Used in `β = H(DS_bind ‖ r ‖ H(o))`.
pub const DS_BIND: & = b"sudp/v1/bind";
/// Protected-state sealing label.
///
/// Used as the AEAD `ad` for `C = Enc_K(M; DS_seal ‖ ver)`.
pub const DS_SEAL: & = b"sudp/v1/seal";
/// HPKE delivery-key derivation label.
pub const DS_DELIVERY: & = b"sudp/v1/delivery";
/// Cross-device handshake AEAD label.
pub const DS_XD_ENC: & = b"sudp/v1/xd-enc";
/// Convenience enum surfacing labels at the public API.
///
/// Callers normally use the raw `&'static [u8]` constants above; this enum
/// exists so consumers can build domain labels typed at the API surface
/// (e.g. when implementing custom primitives that want to log which label
/// was used).