Skip to main content

Module authority

Module authority 

Source
Expand description

The album authorization seam — exactly what verify_asset needs to learn from MLS about an album, behind a trait so the real OpenMLS group state can drop in later.

verify_asset needs only three facts about an album, and the authority on all three is the album’s admin-signed MLS commit chain — never the server:

  1. the monotonic epoch ceiling (the highest amk_version the chain attests),
  2. the write-tier public key for a given epoch (only writers at that epoch held the private half), and
  3. whether the AMK content key for an epoch is locally held (to tell a key still in flight apart from a forged epoch).

Two backends implement this seam:

  • ReferenceAuthority — the deterministic, admin-signature-backed offline/test authority. It preserves every property verify_asset tests for with no MLS dependency, and remains available on every build (including the wasm sealing build).
  • OpenMlsAuthority — the design-target backend over a live OpenMLS group pinned to the X-Wing ciphersuite 0x004D. Host-only, behind the mls feature (implied by native, excluded from wasm since its libcrux provider does not target wasm32).

Because verify_asset consumes only &dyn AlbumAuthority, the two are interchangeable; the Authority enum lets a caller store either without naming a concrete backend.

SSoT for the rules this seam encodes: Keys — Write Authorization.

Re-exports§

pub use openmls_authority::DEFAULT_UPGRADE_DEADLINE;
pub use openmls_authority::SignedUpgradeIntent;
pub use openmls_authority::UpgradeIntent;
pub use openmls_authority::UpgradeLineage;

Structs§

AddOutcome
The outcome of an add_member ceremony: the artifacts the caller relays over the (out-of-scope, server-side) delivery service.
AlbumHistoryBundle
The join-time history batch a committer sends a newly-added member: the prior epochs the album’s HistoryPolicy entitles them to, current epoch excluded (the joiner derives that from the group state delivered in its Welcome).
AlbumKeyDistribution
The doc-named steady-state AMK broadcast for one epoch: read capability delivered to all members over an MLS application message. Its shape is fixed by MLS § History Delivery.
AlbumStateSummary
The caller-supplied facts about an album’s full state that the frozen_state_hash is computed over, alongside the MLS-derived sorted member list. Owned by the application/library layer (this authority has no view of manifests or the provenance log), so the caller assembles it from its own accepted state; a member whose view diverges yields a different hash and aborts the tombstone (each member independently).
AmkHistoryEntry
One prior-epoch record in a join-time AlbumHistoryBundle. Carries both halves a joiner needs but cannot re-derive for a pre-join epoch: the AMK (to decrypt) and the write-tier public key (to authorization-check the epoch’s manifests through verify_asset).
BlockOutcome
The outcome of a block_user ceremony.
CommitHash
The content hash of an MLS commit message — its identity on the server-authoritative chain. Suite-fixed SHA-256 over the commit’s wire bytes; two applications of the same commit share a hash (the idempotency identity).
LedgerEntry
One epoch’s signed attestation within a SignedEpochLedger.
LostCommitTracker
The lost-commit detection + backoff schedule (mls-resilience.md § Lost commit): a device that doesn’t see its committed epoch on the chain within the detection timeout re-submits, backing off on each attempt, and after the budget is exhausted surfaces the change to the user (never silently abandoned). Re-submission is idempotent — OpenMLS rejects a duplicate, so a retry that did land is harmless.
MlsDeviceIdentity
One device’s MLS participation identity: the owned OpenMLS provider (CapsuleMlsProvider) (crypto + rand + serializable storage), the device’s MLS Ed25519 leaf signer, and the device’s hybrid DSK identity key used to attest the leaf binding.
OpenMlsAuthority
An AlbumAuthority backed by a live OpenMLS group pinned to PINNED_CIPHERSUITE.
ReferenceAuthority
A reference album authority backed by an admin-signed epoch ledger.
RekeyOutcome
The artifacts a completed re-key produces, for delivery over the (out-of-scope) transport.
RemoveOutcome
The outcome of a remove_member ceremony.
SignedEpochLedger
The portable, admin-signed epoch ledger: every attested (epoch, write_tier_pub) with its admin signature. amk_present is local-only state and deliberately is not part of this signed artifact — on reload it is restored from the epochs a device actually holds AMKs for.
TombstoneOutcome
The artifacts a commit_tombstone call produces.
UpgradeProposal
The artifacts a propose_upgrade call produces.
WriteTierDistribution
The per-epoch write capability delivery: the private half of the write-tier signing keypair the committer minted for amk_version, sent over an MLS application message to the epoch’s writers (SSoT: Keys — AMKs, “distributed via MLS to writers only”). The public half is attested by the epoch’s commit (authenticated AAD), so this message is the only way a member obtains signing capability — it is never derivable from group secrets.

Enums§

Authority
A concrete album authority behind the AlbumAuthority seam, so a holder (e.g. Workspace) can store either backend without naming a concrete type. Reference is the offline/test default present on every build; OpenMls is the live MLS backend, available only under the mls feature (host-only). The enum itself implements AlbumAuthority, so &Authority coerces to &dyn AlbumAuthority at every verify_asset call site.
HistoryPolicy
How much history a new joiner may decrypt, fixed per album at creation and read from the album’s MLS metadata on every add — never chosen per-add, so a member’s history visibility never depends on which device added them or in what order (SSoT: MLS § History Delivery). Changing it is an album upgrade ceremony, never an ad-hoc per-add decision.
OpenMlsAuthorityError
Errors from constructing, advancing, or running a membership ceremony on an OpenMlsAuthority. OpenMLS/libcrux error details are captured as English strings (server-internal diagnostics, not user-facing).
ReconcileOutcome
The single “bring-me-current” reconciliation outcome (mls-resilience.md § Contract Skeleton). Reconciliation is one entry point, not a per-failure-mode call; this enum reports which path was taken, including the two that escalate to user action or re-bootstrap.
RekeyReason
Why a group re-key was triggered (mls-resilience.md § Group re-keying ceremony).
ServerChainView
The server’s authoritative commit chain as seen relative to this member — the classification the real delivery service computes by comparing the member’s head against its persisted chain. This is the mock boundary: this module makes no server changes, so the caller supplies the comparison result rather than this module querying a live server.

Constants§

PINNED_CIPHERSUITE_ID
The wire codepoint of PINNED_CIPHERSUITE. Asserted in tests so an upstream re-pin can never silently change the suite Capsule negotiates.

Traits§

AlbumAuthority
One album’s MLS-attested authorization state, as needed by verify_asset.