Skip to content

Latest commit

 

History

History
67 lines (45 loc) · 3.21 KB

message-body-aad.md

File metadata and controls

67 lines (45 loc) · 3.21 KB

Message Body AAD

Version

See Message Version.

Implementations

Overview

The message body AAD is the serialization of the AAD to be used as input to encryption of the message body.

Structure

The following describes the fields that form the message body AAD. The bytes are appended in the order shown.

Field Length (bytes) Interpreted as
Message ID 16 Bytes
Body AAD Content Variable. UTF-8 Bytes
Sequence Number 4 Uint32
Content Length 8 Uint64

Message ID

An identifier for the message this message body AAD is associated with.

Body AAD Content

An identifier for the content type of the data this message body AAD is associated with.

This value depends on the content type of the message:

Sequence Number

The sequence number of the data this message body AAD belongs to. For framed data, the value of this field MUST be the frame sequence number. For non-framed data, the value of this field MUST be 1.

Content Length

The length, in bytes, of the plaintext data being encrypted that this message body AAD is associated with.

More specifically, depending on the content type of the message:

  • For non-framed data, this value MUST equal the length, in bytes, of the plaintext data provided to the algorithm for encryption.
  • For framed data, this value MUST equal the length, in bytes, of the plaintext being encrypted in this frame.
    • For regular frames, this value MUST equal the value of the frame length field in the message header.
    • For the final frame, this value MUST be greater than or equal to 0 and less than or equal to the value of the frame length field in the message header.