Skip to main content

dcrypt_algorithms/poly/
mod.rs

1// Path: crates/algorithms/src/poly/mod.rs
2//! Generic Polynomial Engine
3//!
4//! This module provides foundational elements for polynomial arithmetic over rings,
5//! designed to be reusable by various lattice-based cryptographic schemes.
6
7#[cfg(feature = "alloc")]
8extern crate alloc;
9
10// FIX: Add the new fft module
11pub mod fft;
12pub mod ntt;
13pub mod params;
14pub mod polynomial;
15pub mod sampling;
16pub mod serialize;
17
18/// Prelude for easy importing of common polynomial types and traits.
19pub mod prelude {
20    // FIX: Add fft and ifft to the prelude
21    pub use super::fft::{fft, ifft};
22    pub use super::ntt::{montgomery_reduce, InverseNttOperator, NttOperator};
23    pub use super::params::{Modulus, NttModulus};
24    pub use super::polynomial::{Polynomial, PolynomialNttExt};
25    pub use super::sampling::{CbdSampler, UniformSampler};
26    pub use super::serialize::{CoefficientPacker, CoefficientUnpacker};
27}
28
29// Helper functions or common constants might be added here later.