Skip to main content

Module keypackage

Module keypackage 

Source
Expand description

The key package payload, which is how a peer says who it is and what it can parse.

This is the body of a prefixes::KEY_PACKAGE frame, and it is the only channel in this protocol by which capabilities are advertised. A device with no key package to mint has no way to say it understands anything, so every frame sent to it falls to the protocol floor forever. That is the reason a leaf node runs MLS rather than something smaller: not the sealing, the advertising.

Both ends must agree on this shape, and they build it with different MLS implementations, so it lives here rather than in the engine.

Structs§

KeyPackagePayload
Payload for key package exchange.

Constants§

CTRL_SIGN_V2
Control-frame signing version advertised in KeyPackagePayload::ctrl_versions: the sender verifies signatures over control_signing_payload_v2, which binds the frame’s timestamp and so can be refused for being stale.
MLS_ENVELOPE_COMPACT_V1
Compact MLS envelope version advertised in KeyPackagePayload::env_versions: the prefixes::ENCRYPTED payload is base64 of EncryptedMessage::to_bytes instead of the legacy JSON form (whose ciphertext field renders as a roughly 3.6x integer array). Receivers distinguish the two by the byte after the prefix: { opens the JSON envelope and never occurs in base64.