Skip to main content

Module segment

Module segment 

Source
Expand description

OXSG sealed segment: the outer header and the chunk structure of the body.

Structs§

SealedSegment
A sealed segment: header and body. The body is chunks of ciphertext and tags, opaque here.
SegmentHeader
The unsealed header of a segment. Its bytes are the AEAD associated data’s input.

Constants§

CHUNK_PLAINTEXT_LEN
Plaintext bytes in a full chunk.
CHUNK_TAG_LEN
Length of the authentication tag that ends every chunk.
MIN_SEGMENT_LEN
Smallest segment: a header and one chunk holding the 14-byte plaintext header.
SEGMENT_HEADER_LEN
Length of the segment header.

Functions§

plaintext_len
Plaintext length of a body of body_len bytes: every chunk but the last is full and the last holds at least one plaintext byte.