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§

ACK_COALESCED_V1
Acknowledgement version advertised in KeyPackagePayload::ack_versions: the sender reads the ack_more metadata on a delivery ACK, so one ACK frame may answer several of its frames. Over a mesh link an ACK per frame was a third of the frames a phone sent, on a link already carrying less than it was offered.
ACK_UNDECRYPTABLE_V1
Acknowledgement version advertised in KeyPackagePayload::ack_versions: the sender reads ack_status = "undecryptable" on a delivery ACK as “the recipient can never decrypt this frame” rather than as a delivery.
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.
SVC_SEALED_V1
Sealed service frame version advertised in KeyPackagePayload::svc_versions: the sender routes a __SVC_REQ__ or __SVC_RESP__ it finds inside a decrypted 1:1 MLS plaintext into its service layer, with the MLS-authenticated sender as the requester.