dcrypt_kem/kyber/
mod.rs

1// kem/src/kyber/mod.rs
2
3//! Kyber Key Encapsulation Mechanism (KEM).
4//!
5//! This module implements Kyber KEM, a lattice-based key encapsulation mechanism
6//! selected for standardization by NIST. It provides IND-CCA2 security.
7
8// Modules defining the Kyber KEM logic and parameters.
9mod cpa_pke; // Defines the core CPA-secure PKE scheme
10mod ind_cca; // Implements the Fujisaki-Okamoto transform for CCA security
11mod kem;
12mod params;
13mod polyvec; // Defines PolyVec and its operations
14mod serialize; // Serialization functions for Kyber data structures // Defines the KyberKem struct and implements api::Kem
15
16// Concrete Kyber variants
17mod kyber1024;
18mod kyber512;
19mod kyber768;
20
21// Re-export the primary KEM types for each security level.
22pub use self::kyber1024::Kyber1024;
23pub use self::kyber512::Kyber512;
24pub use self::kyber768::Kyber768;
25
26// Re-export common key/ciphertext types if users need to name them directly.
27// These are generic over the KyberParams, so usually users will interact
28// via the associated types of Kyber512, Kyber768, Kyber1024.
29pub use self::kem::{KyberCiphertext, KyberPublicKey, KyberSecretKey, KyberSharedSecret};
30
31// Re-export important constants that external modules might need
32pub use self::params::KYBER_SS_BYTES;
33
34#[cfg(test)]
35mod tests;