Skip to main content

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.

Overview

Ciphersuites define the cryptographic algorithms used in MLS protocol operations. Each ciphersuite specifies a combination of:
  • HPKE KEM (Key Encapsulation Mechanism)
  • AEAD (Authenticated Encryption with Associated Data)
  • Hash algorithm
  • Signature scheme

Supported Ciphersuites

OpenMLS supports the following ciphersuites:
  • MLS_128_DHKEMX25519_AES128GCM_SHA256_Ed25519 (MTI - Mandatory to Implement)
  • MLS_128_DHKEMP256_AES128GCM_SHA256_P256
  • MLS_128_DHKEMX25519_CHACHA20POLY1305_SHA256_Ed25519

Ciphersuite

The main ciphersuite enum defining all supported cryptographic configurations.
Ciphersuite
enum
MLS ciphersuite enumeration

Methods

Algorithm Accessors

hash_algorithm
fn(&self) -> HashType
Returns the hash algorithm for this ciphersuite
pub const fn hash_algorithm(&self) -> HashType
signature_algorithm
fn(&self) -> SignatureScheme
Returns the signature scheme for this ciphersuite
pub const fn signature_algorithm(&self) -> SignatureScheme
aead_algorithm
fn(&self) -> AeadType
Returns the AEAD algorithm for this ciphersuite
pub const fn aead_algorithm(&self) -> AeadType
hpke_kdf_algorithm
fn(&self) -> HpkeKdfType
Returns the HPKE KDF algorithm for this ciphersuite
pub const fn hpke_kdf_algorithm(&self) -> HpkeKdfType
hpke_kem_algorithm
fn(&self) -> HpkeKemType
Returns the HPKE KEM algorithm for this ciphersuite
pub const fn hpke_kem_algorithm(&self) -> HpkeKemType
hpke_aead_algorithm
fn(&self) -> HpkeAeadType
Returns the HPKE AEAD algorithm for this ciphersuite
pub const fn hpke_aead_algorithm(&self) -> HpkeAeadType
hpke_config
fn(&self) -> HpkeConfig
Returns the complete HPKE configuration (KEM, KDF, AEAD) for this ciphersuite
pub const fn hpke_config(&self) -> HpkeConfig

Length Accessors

hash_length
fn(&self) -> usize
Returns the output length of the hash algorithm in bytes
pub const fn hash_length(&self) -> usize
mac_length
fn(&self) -> usize
Returns the length of the AEAD tag in bytes
pub const fn mac_length(&self) -> usize
aead_key_length
fn(&self) -> usize
Returns the key size of the AEAD in bytes
pub const fn aead_key_length(&self) -> usize
aead_nonce_length
fn(&self) -> usize
Returns the nonce length of the AEAD in bytes
pub const fn aead_nonce_length(&self) -> usize

Supporting Types

HashType

HashType
enum
Hash algorithm types

AeadType

AeadType
enum
AEAD algorithm types

HpkeKemType

HpkeKemType
enum
HPKE Key Encapsulation Mechanism types

HpkeKdfType

HpkeKdfType
enum
HPKE Key Derivation Function types

HpkeAeadType

HpkeAeadType
enum
HPKE AEAD types

Usage Example

use openmls::prelude::*;

let ciphersuite = Ciphersuite::MLS_128_DHKEMX25519_AES128GCM_SHA256_Ed25519;

// Get cryptographic components
let hash_alg = ciphersuite.hash_algorithm();
let sig_scheme = ciphersuite.signature_algorithm();
let aead_alg = ciphersuite.aead_algorithm();

// Get algorithm lengths
let hash_len = ciphersuite.hash_length(); // 32 bytes for SHA-256
let mac_len = ciphersuite.mac_length();   // 16 bytes for AES-GCM

// Get HPKE configuration
let hpke_config = ciphersuite.hpke_config();

Build docs developers (and LLMs) love