A ciphersuite is a combination of cryptographic algorithms that MLS uses for all its operations. OpenMLS supports the mandatory ciphersuite from the MLS specification plus additional recommended options.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.
Supported ciphersuites
OpenMLS currently supports three ciphersuites:MLS_128_DHKEMX25519_AES128GCM_SHA256_Ed25519
Mandatory-to-implement (MTI) ciphersuite using Curve25519 and Ed25519
- HPKE KEM: X25519 Diffie-Hellman
- HPKE KDF: HKDF-SHA256
- HPKE AEAD: AES-128-GCM
- Hash: SHA-256
- Signature: Ed25519
MLS_128_DHKEMP256_AES128GCM_SHA256_P256
NIST P-256 based ciphersuite
- HPKE KEM: P-256 Diffie-Hellman
- HPKE KDF: HKDF-SHA256
- HPKE AEAD: AES-128-GCM
- Hash: SHA-256
- Signature: ECDSA with P-256
MLS_128_DHKEMX25519_CHACHA20POLY1305_SHA256_Ed25519
ChaCha20-Poly1305 variant for platforms without AES acceleration
- HPKE KEM: X25519 Diffie-Hellman
- HPKE KDF: HKDF-SHA256
- HPKE AEAD: ChaCha20-Poly1305
- Hash: SHA-256
- Signature: Ed25519
Using ciphersuites
Ciphersuites are represented by theCiphersuite enum from the openmls_traits crate:
Choosing a ciphersuite
When creating a key package or group, you must specify a ciphersuite:Ciphersuite properties
Each ciphersuite provides methods to query its algorithms:Cryptographic components
HPKE (Hybrid Public Key Encryption)
HPKE is used for encrypting group secrets to individual members. Each ciphersuite specifies:- KEM (Key Encapsulation Mechanism): How ephemeral shared secrets are established
- KDF (Key Derivation Function): How keys are derived from shared secrets
- AEAD: How data is encrypted with the derived keys
Signature schemes
Signature schemes authenticate MLS messages and key packages:- Ed25519: Edwards-curve Digital Signature Algorithm (EdDSA) with Curve25519
- ECDSA P-256: Elliptic Curve Digital Signature Algorithm with NIST P-256
Hash functions
Hash functions are used throughout MLS for:- Key derivation (in the KDF)
- Transcript hashing for message ordering
- Creating key package references
- Deriving confirmation tags
AEAD algorithms
AEAD (Authenticated Encryption with Associated Data) protects message confidentiality and integrity:- AES-128-GCM: Hardware-accelerated on most modern platforms
- ChaCha20-Poly1305: Software-efficient alternative for platforms without AES acceleration
Multi-ciphersuite support
Clients can support multiple ciphersuites by publishing separate key packages:Ciphersuite negotiation
When creating a group, the creator chooses the ciphersuite. All members must support it:- The group creator selects a ciphersuite
- Members are added using key packages that match that ciphersuite
- All group operations use the same ciphersuite
- The ciphersuite cannot be changed after group creation
Capabilities and ciphersuites
Clients advertise supported ciphersuites in their key package capabilities:Security considerations
Choosing the MTI ciphersuite
For maximum interoperability, use the mandatory-to-implement ciphersuite:Performance considerations
- X25519/Ed25519: Excellent performance on most platforms
- P-256: Required for some compliance frameworks (e.g., FIPS)
- ChaCha20-Poly1305: Better performance than AES-GCM on platforms without hardware AES acceleration
Security level
All supported ciphersuites provide 128-bit security, which is appropriate for most applications and expected to remain secure for the foreseeable future.Related concepts
Key packages
Learn how ciphersuites are specified in key packages
Architecture
Understand how cryptographic providers implement ciphersuite operations