Skip to main content

Module sealbox_wire

Module sealbox_wire 

Source
Expand description

The sealed box’s version-1 framing: version, ephemeral P-384 point, nonce, ciphertext and tag.

Structs§

BlobParts
The fields of a parsed sealed blob.

Constants§

EPHEMERAL_KEY_LEN
The length of the uncompressed ephemeral P-384 point.
HEADER_LEN
The length of the version, ephemeral point and nonce that precede the ciphertext.
MIN_BLOB_LEN
The shortest valid blob: a header, one ciphertext byte and a tag.
NONCE_LEN
The AES-GCM nonce length in a sealed blob.
TAG_LEN
The AES-GCM tag length in a sealed blob.
VERSION
The sealed-blob format version byte.

Functions§

parse_blob
Splits a blob into its parts, refusing a short blob, another version or a non-uncompressed point.
sealed_len
The blob length for a plaintext of plaintext_len bytes.