dtls13RecordAad
fn
ubyte[13] dtls13RecordAad(ubyte contentType, ushort epoch,
ulong sequenceNumber, ushort payloadLength) pure nothrow @safe @nogcBuilds the AEAD additional data for a DTLS 1.3 record.
Per RFC 9147 §4, the entire record header is used as the AEAD additional data. The header (and thus the AAD) is 13 bytes in wire order:
content_type (1) || version (2) || epoch (2) || sequence_number (6) || length (2)
Parameters
contentType | The record content type. |
epoch | The record epoch. |
sequenceNumber | The 48-bit record sequence number. |
payloadLength | The encrypted payload length (ciphertext + tag). |
Returns
The 13-byte additional data.