Meshline
English translationDownload Markdown

The Simplified Chinese text is authoritative.

Group Hosting Protocol

Client–relay protocol

Group hosting is an optional client–relay module. Users create groups and select a fixed hosting relay; clients connect directly to it, without account route DHT or relay RPC. Relays offering this capability MUST implement the entire module and declare group.host.v1 in a valid RelayDescriptor.

Purpose and Trust Boundaries

The host verifies devices, membership, and roles, maintains current group state, orders events and key epochs, and distributes relay secrets to authorized devices. Current members share a client group secret. Group message keys MUST derive from both client and relay secrets, so the relay alone cannot decrypt messages.

Clients verify members and public keys through the permanently retained administration chain. They reconstruct membership locally and MUST complete administration verification before wrapping secrets.

Collusion between the relay and a party holding the client secret may decrypt corresponding messages. This protocol claims neither forward secrecy nor post-compromise security. See Security boundaries for collusion, disclosure, and rotation limits.

Protocol Contents

Concepts and Core Objects

Section Contents
Group model and keys Fixed hosting, roles, separate secrets, commitments, key boxes, and group application secret derivation
Membership and access control Invitations, applications, membership changes, member key reset, and device access intervals
Group timeline and synchronization Timeline, retention and access, initial loading, and reconnection
Account-internal group state and secret synchronization Private-state requests, member private keys, and historical application-secret synchronization among same-account devices
Group messaging and encryption Envelopes, message key derivation and encryption/decryption, business objects, and nickname updates
Core objects Group ID, GroupState, GroupEvent, and administration chain

Methods and Notifications

Section Contents
Common method conventions Transport, authorization, signing, list pagination, validation, and errors
Lifecycle and synchronization methods Creation, state queries, event synchronization, and closure
Admission methods Invitations, join applications, and approval
Property and role management Properties, roles, and ownership transfers
Member and ban management Leaving, removal, banning, and unbanning
Member key reset methods Reset request submission, listing, approval, and rejection
Key methods Key synchronization and client-secret rotation
Message methods Sending and idempotent retries
Subscription methods Set replacement, limits, access checks, and post-subscription synchronization
Notifications Hints for event, application, and member-reset list changes

Method Index

All methods below use device sessions.

Method HTTP WebSocket
group.create POST JSON-RPC
group.resolve GET JSON-RPC
group.sync GET JSON-RPC
group.close DELETE JSON-RPC
group.invite.create POST JSON-RPC
group.invite.resolve GET JSON-RPC
group.invite.list GET JSON-RPC
group.invite.revoke DELETE JSON-RPC
group.application.submit POST JSON-RPC
group.application.list GET JSON-RPC
group.application.approve POST JSON-RPC
group.application.reject DELETE JSON-RPC
group.update PATCH JSON-RPC
group.role.update PUT JSON-RPC
group.owner.transfer POST JSON-RPC
group.member.leave DELETE JSON-RPC
group.member.remove DELETE JSON-RPC
group.member.ban PUT JSON-RPC
group.member.unban DELETE JSON-RPC
group.member.recovery.submit POST JSON-RPC
group.member.recovery.list GET JSON-RPC
group.member.recovery.approve POST JSON-RPC
group.member.recovery.reject DELETE JSON-RPC
group.key.sync GET JSON-RPC
group.secret.rotation.prepare PATCH JSON-RPC
group.secret.rotation.commit POST JSON-RPC
group.message.send POST JSON-RPC
group.subscribe N/A JSON-RPC

HTTP/WSS mapping and errors follow Common group method conventions.

Notification Index

Envelopes follow Client–relay notification conventions.

Conformance Requirements

Conforming implementations MUST follow Conformance testing boundaries and Common client method conventions, covering:

  • Requests and commits: verify complete requests, device signatures and account binding, independent approver verification, field/resource boundaries, HTTP/WSS error mapping and disclosure boundaries under Common group conventions. Concurrency and failure MUST NOT leave partial state, events, keys, access intervals, or invitation counts.
  • Administration state: verify creation, property/role updates, transfers, leaving, removal, banning/unbanning, capacity limits, and member projections under the Administration chain and Membership and access control, including same-value updates, old-head replay, unknown administration types, and suspension after failed verification.
  • Invitations and approval: verify sharing, viewing, usage permissions, application retries/replacement, key resets, expiry, and dependent deletion under Admission and Member key reset. List pagination must cover cursors, empty pages, list/permission changes, complete traversal of unchanged lists, and list results not substituting for current-state checks at submission.
  • Secrets and rotation: verify separate secrets, commitments, both box types and derivation, two-phase client rotation and relay rotation under Key model and Key methods, including batches/replacement, late retries, non-refreshing deadlines, member changes, complete coverage, owner key changes, and activating candidate material only after verification.
  • Key and private-state recovery: verify staging independently arriving material, private-key selection and revision confirmation from verified history, historical/current box recovery, and cross-page/adjacent box omission under Account-internal synchronization and group.key.sync. Missing historical keys do not block administration verification or current-epoch recovery.
  • Events and access: verify new-device entry, boundaries and multiple intervals, differing management/message visibility, nonconsecutive sequences and epochs, message authentication, and chain reconstruction under Device access intervals and group.sync. Snapshots, notifications, and private material cannot advance verified state or cursors.
  • Messages and nicknames: verify complete envelopes, random nonces, AAD, current permissions, result retention, bodies/attachments, replies, and local nickname ordering, clearing, and rejoin boundaries under Group messaging and encryption and Idempotent retries. Handle business plaintext errors separately from administration-event errors.
  • Subscriptions and notifications: verify replacement, clearing, reduced limits, failure details, and preservation of device access intervals under Subscriptions and Notifications, including event-hint coalescing, unversioned list refresh, and notifications after request expiry/deletion.
  • Retention and closure: verify message/old-key pruning, current-key recovery, permanent retention of administration events and verification certificates, and irreversible closure under Retention and access and group.close. After closure, reads and message/key retention are not guaranteed.