AirPlay 2 encrypted RTSP control/event channel framing.
Plain RTSP bytes are split into 1024-byte chunks. Each encrypted chunk is:
uint16_le(length) <> ciphertext <> tag, with the length prefix as AAD and a
monotonically increasing little-endian counter in the ChaCha20-Poly1305 nonce.
Summary
Functions
Create a client-side secure control channel from the SRP shared secret.
Decrypt AP2 secure-channel chunks, buffering an incomplete trailing chunk.
Decrypt as many complete chunks as are available.
Encrypt plaintext into AP2 secure-channel chunks.
Create a control secure channel from a shared secret.
Create a secure channel for :control or :events.
Types
Functions
Create a client-side secure control channel from the SRP shared secret.
Decrypt AP2 secure-channel chunks, buffering an incomplete trailing chunk.
Decrypt as many complete chunks as are available.
Encrypt plaintext into AP2 secure-channel chunks.
Create a control secure channel from a shared secret.
Create a secure channel for :control or :events.