OpenMLS is designed with a modular architecture that separates the core MLS protocol logic from platform-specific implementations. This design allows you to use OpenMLS across different environments, from standard servers to WebAssembly and secure enclaves.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.
Provider-based architecture
OpenMLS defines several traits that abstract platform-specific functionality. Applications provide implementations of these traits through a unifiedOpenMlsProvider.
Core provider traits
OpenMlsCrypto
Cryptographic primitives for signatures, HPKE, hashing, and AEAD
OpenMlsRand
Random number generation for key creation and nonces
StorageProvider
Persistent storage for key packages, group state, and secrets
The OpenMlsProvider trait
All OpenMLS operations require a provider implementing theOpenMlsProvider trait:
Available provider implementations
OpenMLS includes two production-ready providers:openmls_rust_crypto
The Rust crypto provider uses pure Rust cryptographic libraries:- Standard server and desktop applications
- Environments where Rust toolchain is available
- Development and testing
openmls_libcrux_crypto
The libcrux provider uses formally verified cryptographic primitives:- High-assurance applications requiring verified cryptography
- Safety-critical systems
- Compliance-focused deployments
Cryptographic provider interface
TheOpenMlsCrypto trait defines operations for all cryptographic primitives:
Storage provider interface
TheStorageProvider trait manages persistent state:
Storage operations
OpenMLS stores:- Key packages: Pre-published key material with private keys
- Group state: Current group configuration and ratchet tree
- Epoch secrets: Cryptographic material for past epochs (configurable retention)
- Signature keys: Long-term signing keys for credentials
Example: Storing a key package
Random number generation
TheOpenMlsRand trait provides cryptographically secure randomness:
- Generating HPKE and signature keys
- Creating random group IDs
- Generating nonces for encryption
- Deriving fresh key material
Separation of concerns
OpenMLS’s architecture cleanly separates:- Protocol logic
- Cryptographic operations
- Storage and persistence
- Application logic
The core library implements MLS protocol operations:
- Message processing and validation
- Ratchet tree operations (TreeSync)
- Key derivation and scheduling
- Proposal and commit handling
Custom provider implementations
You can create custom providers for specialized environments:Custom providers enable OpenMLS to run in specialized environments like WebAssembly (using WebCrypto), secure enclaves (using enclave-specific crypto), or embedded systems with hardware security modules.
Signature key management
OpenMLS separates signature key management from the core library. Theopenmls_basic_credential crate provides a reference implementation:
Platform support
OpenMLS’s architecture supports multiple platforms:- Native (Linux, macOS, Windows): Full support with Rust crypto providers
- WebAssembly: Compile with the
jsfeature for browser environments - Mobile (iOS, Android): Build for ARM architectures
- Embedded systems: 32-bit and above platforms supported
Related concepts
Ciphersuites
Learn about supported cryptographic algorithm combinations
Storage
Explore storage provider implementations