Expand description
Key Material message — draft-sharabayko-srt-01 §3.2.2, Figures 10-11.
Carried either as a Handshake Extension (§3.2.1.2, Extension Type
SRT_CMD_KMREQ/SRT_CMD_KMRSP) or as the CIF of a User-Defined control
packet (Subtype SRT_CMD_KMREQ/SRT_CMD_KMRSP, §3.2.2).
word0 S(1) V(3) PT(4) | Sign(16) | Resv1(6) KK(2)
word1 KEKI(32)
word2 Cipher(8) Auth(8) SE(8) Resv2(8)
word3 Resv3(16) SLen/4(8) KLen/4(8)
.. Salt (SLen bytes)
.. ICV (8 bytes) | xSEK (KLen bytes) | [oSEK (KLen bytes)]S, V, PT, Sign, Resv1, Resv2, Resv3 are fixed-value fields
(the spec gives each a mandated value = {..}); they are validated on
parse and not stored (matching the crate’s reserved-bit policy — see the
crate root docs), except PT, which acts as this struct’s discriminating
magic number (must be 2, “Keying Material Message”).
This module only carries the wrapped-key bytes — it performs no AES key-wrap/unwrap. Actual encryption/decryption is an explicit follow-up (see the crate root docs).
Structs§
- KeyMaterial
- Key Material message (
draft-sharabayko-srt-01§3.2.2, Figures 10-11).
Enums§
- Cipher
Cipher: encryption cipher and mode (draft-sharabayko-srt-01§3.2.2).- KmAuth
Authentication: message authentication code algorithm (draft-sharabayko-srt-01§3.2.2).- KmKey
Flag KK: which SEK(s) (odd/even) this Key Material message provides (draft-sharabayko-srt-01§3.2.2).- Stream
Encapsulation SE: stream encapsulation (draft-sharabayko-srt-01§3.2.2).
Constants§
- CIPHER_
AES_ CTR - AES-CTR.
- CIPHER_
NONE Cipherwire values (§3.2.2).- KM_
AUTH_ NONE Authenticationwire values (§3.2.2).- KM_
KK_ BOTH - Both keys provided.
- KM_
KK_ EVEN - Even key provided.
- KM_
KK_ NO_ SEK KKwire values of the Key Material message (§3.2.2). Distinct from the data-packetKKfield (super::EncryptionKeyField) — same 2-bit shape, different meaning.- KM_
KK_ ODD - Odd key provided.
- STREAM_
ENCAP_ MPEG_ TS_ SRT - MPEG-TS/SRT.
- STREAM_
ENCAP_ MPEG_ TS_ UDP - MPEG-TS/UDP.
- STREAM_
ENCAP_ UNSPECIFIED SE(Stream Encapsulation) wire values (§3.2.2).