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
//! KEM (Key Encapsulation Mechanism) backend trait and ML-KEM implementations.
//!
//! # Responsibility scope
//! This module owns the abstract [`KemBackend`] trait, the stable [`KemId`] identifier enum,
//! and the concrete ML-KEM-512/768/1024 implementations backed by the RustCrypto `ml-kem`
//! crate (FIPS 203). Typed newtypes for key material live in [`types`].
//!
//! Size markers and KEM-specific newtypes are NOT re-exported through `crate::*`; callers
//! import them directly from `crypt_guard::kem`.
//!
//! # Key types exported
//! - [`KemBackend`] — core trait
//! - [`KemId`] — algorithm identifier
//! - [`types::MlKemPublicKey`], [`types::MlKemSecretKey`], [`types::KemCiphertext`],
//! [`types::KemSharedSecret`]
//! - (behind `ml-kem-backend`) [`ml_kem::MlKem512Impl`], [`ml_kem::MlKem768Impl`],
//! [`ml_kem::MlKem1024Impl`]
//!
//! # Concurrency
//! All types are `Send + Sync`. The trait requires `Send + Sync + 'static` on implementors.
//!
//! # Errors
//! See [`crate::error::CryptError`]: `EncapsulationError`, `DecapsulationError`,
//! `InvalidKemPublicKey`, `InvalidKemSecretKey`, `InvalidKemCiphertext`.
//!
//! # Examples
//! ```rust,no_run
//! #[cfg(feature = "ml-kem-backend")]
//! {
//! use crypt_guard::kem::{KemBackend, backend::KemId, ml_kem::MlKem768Impl};
//! }
//! ```
pub use ;
pub use ;