Documentation Index
Fetch the complete documentation index at: https://mintlify.com/openmls/openmls/llms.txt
Use this file to discover all available pages before exploring further.
PublicGroup holds all public values of an MLS group and enables tracking of group membership and state based on PublicMessages, without requiring private key material. This is useful for delivery services and observers.
Overview
ThePublicGroup struct allows tracking an MLS group’s public state, including:
- Group membership and the ratchet tree
- Proposal store for pending proposals
- Group context and configuration
- Validation of commits and proposals
MlsGroup relies on a PublicGroup for its public state management.
Creating a public group
from_external
Creates aPublicGroup instance to start tracking an existing MLS group from external information.
Cryptographic provider for validation
Storage provider for persisting the group state
The ratchet tree to initialize from
Group info for initializing the group context
Initial proposal store (typically empty)
Returns the public group and verified group info, or an error if validation fails
- Leaf node validation (ValSem1407)
- Signature key uniqueness (ValSem0111)
- Encryption key uniqueness (ValSem0112)
- Tree hash verification (ValSem1405)
- Group info signature validation (ValSem1402)
Group information
group_id
Returns the group ID.Reference to the group ID
group_context
Returns the group context containing epoch, tree hash, and extensions.Reference to the group context
ciphersuite
Returns the ciphersuite used by the group.The group’s ciphersuite
version
Returns the MLS protocol version.The protocol version
confirmation_tag
Returns the most recent confirmation tag.Reference to the confirmation tag
Membership
members
Returns an iterator over all members of the group.Iterator over group members, each containing index, credential, encryption key, and signature key
leaf
Returns the leaf node at a given index.The index of the leaf to retrieve
The leaf node if present,
None if the leaf is blanktreesync
Returns the current tree state.Reference to the tree sync state
export_ratchet_tree
Exports the nodes of the public tree.The exported ratchet tree
Proposal management
add_proposal
Adds a queued proposal to the internal proposal store.Storage provider
The proposal to add
Returns
() on successremove_proposal
Removes a proposal from the internal proposal store.Storage provider
Reference to the proposal to remove
Returns
() on successqueued_proposals
Returns all queued proposals from storage.Storage provider
Vector of proposal references and their corresponding proposals
Commit processing
merge_commit
Merges a staged commit into the public group state.Storage provider
The staged commit to merge
Returns
() on success- Applies the commit’s changes to the tree
- Updates the group context
- Clears the proposal store
- Persists the new state
Storage operations
load
Loads aPublicGroup from storage.
Storage provider
ID of the group to load
Returns the group if found,
None if not founddelete
Deletes aPublicGroup from storage.
Storage provider
ID of the group to delete
Returns
() on successAdvanced operations
derive_path_secrets
Derives encryption keypairs for nodes in the shared direct path between two leaves.Cryptographic provider
The ciphersuite to use
The path secret to derive from
Index of the sender
Index of the target leaf
Returns the derived keypairs and commit secret, or an error if the derived keys don’t match existing ones
ext_commit_sender_index
Returns the index of the sender of a staged external commit.The staged commit
The sender’s leaf index
required_capabilities
Returns the required capabilities extension if present in the group context.Optional reference to the required capabilities
Use cases
ThePublicGroup API is designed for: