1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
//! MLS cryptographic operations for DE-MLS.
//!
//! Each `OpenMlsService` instance is scoped to a single MLS group. The
//! `MlsService` trait defines the per-conversation surface; constructors for the
//! OpenMLS impl live as inherent methods on `OpenMlsService`.
//!
//! Identity and MLS credentials are split: [`crate::identity::Identity`]
//! is the user-level abstraction (just `identity_bytes` + display);
//! `MlsCredentials` (re-exported here) holds the MLS-specific signing keypair and
//! credential, built from an `Identity` at User init and shared across
//! every per-conversation service.
//!
//! # Quick Start
//!
//! ```ignore
//! use std::sync::Arc;
//! use de_mls::mls_crypto::{
//! MemoryDeMlsStorage, MlsCredentials, MlsService, OpenMlsService,
//! };
//!
//! // `identity` is any type implementing `de_mls::identity::Identity`.
//! let credentials = Arc::new(MlsCredentials::from_identity(&identity)?);
//! let storage = MemoryDeMlsStorage::new();
//!
//! // Create a fresh group as its sole initial member.
//! let mls = OpenMlsService::new_as_creator(
//! "my-chat".into(),
//! storage,
//! Arc::clone(&credentials),
//! )?;
//!
//! // Encrypt a message.
//! let ciphertext = mls.encrypt(b"Hello!")?;
//! ```
//!
//! # Storage
//!
//! Each service requires a storage backend implementing `DeMlsStorage`.
//! Use `MemoryDeMlsStorage` for development or implement your own for
//! persistence. Storage may be shared across services via `Arc<S>`.
pub use MlsCredentials;
pub use MlsError;
pub use ;
pub use DeMlsStorage;
pub use ;