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
56
57
//! # soliton
//!
//! Core cryptographic library for the LO protocol.
//!
//! Provides all cryptographic operations specified in Soliton Specification:
//! - Soliton composite key (X-Wing + Ed25519 + ML-DSA-65) generation and management
//! - Hybrid signatures (Ed25519 + ML-DSA-65)
//! - KEM-based authentication
//! - LO-KEX key agreement (session initiation and reception)
//! - LO-Ratchet (KEM ratchet + symmetric chain) message encryption
//! - Storage encryption (XChaCha20-Poly1305 + zstd)
//!
//! ## Backend
//!
//! Pure Rust on all targets (native and WASM):
//! - **RustCrypto**: ML-KEM-768, ML-DSA-65, XChaCha20-Poly1305, SHA3-256, HMAC, HKDF
//! - **curve25519-dalek / ed25519-dalek**: X25519, Ed25519
//! - **getrandom**: CSPRNG
// Prevent `test-utils` from being enabled in release builds.
// The feature gates test-only helpers (zeroed key constructors, state inspection)
// that must never be available outside of test/development contexts.
compile_error!;
/// Library version, matching the crate version from Cargo.toml.
pub const VERSION: &str = env!;
/// Protocol constants (key sizes, HKDF labels, version strings).
/// Error types for all soliton operations.
/// KEM-based authentication challenge/response (§4).
/// E2EE voice call key derivation (§6.12).
/// LO composite identity key and hybrid signature operations (§2, §3).
/// LO-KEX session key agreement (§5).
/// Low-level cryptographic primitives (AEAD, KEM, signatures, hashing, RNG).
/// LO-Ratchet and message encryption (§6, §7).
/// Server-side storage encryption with key rotation (§11).
/// Streaming/chunked AEAD for large payloads (§15).
/// Verification phrase generation for out-of-band identity verification (§9).