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
//! Legacy pqcrypto-backed cryptographic primitives, gated behind `legacy-pqclean`.
//!
//! This module houses the entire original Kyber (KEM), Falcon, and Dilithium (signature)
//! code path that relies on C-backed `pqcrypto-*` FFI wrappers. It was moved wholesale
//! from `src/core/kyber/` and `src/core/kdf.rs` in Phase 1 of the v2.0 modernisation.
//! No crypto logic was changed during the move.
//!
//! # Purpose
//! Preserving this code allows existing ciphertext produced with Kyber-r3 / Dilithium /
//! Falcon to be decrypted via the `legacy-pqclean` feature even after the primary path
//! migrates to FIPS-aligned `ml-kem` / `ml-dsa` / `slh-dsa` in Phase 2+.
//!
//! # Key types re-exported
//! - [`Kyber512`], [`Kyber768`], [`Kyber1024`] — legacy size markers (deprecated aliases)
//! - [`Falcon512`], [`Falcon1024`] — legacy Falcon signing keys
//! - [`Dilithium2`], [`Dilithium3`], [`Dilithium5`] — legacy Dilithium signing keys
//! - [`KeyControl`], [`KeyControKyber1024`], etc. — KEM key management
//!
//! # Feature gate
//! Compiled only when `cfg(feature = "legacy-pqclean")` is active.
//!
//! # Status
//! `legacy-pqclean` is no longer part of the default feature set. Enable it
//! explicitly when you need the legacy compatibility surface.
// Re-export size markers as #[deprecated] aliases at the crate root level.
// These point to the definitions in core::kyber so the same type identity is preserved.
pub use crateKyber1024;
pub use crateKyber512;
pub use crateKyber768;
// Falcon
pub use crateFalcon1024;
pub use crateFalcon512;
// Dilithium
pub use crateDilithium2;
pub use crateDilithium3;
pub use crateDilithium5;