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_attr(not(feature = "std"), no_std)]
8
9#[cfg(feature = "alloc")]
10extern crate alloc;
11
12// FIX: Add the new fft module
13pub mod fft;
14pub mod ntt;
15pub mod params;
16pub mod polynomial;
17pub mod sampling;
18pub mod serialize;
19
20/// Prelude for easy importing of common polynomial types and traits.
21pub mod prelude {
22    // FIX: Add fft and ifft to the prelude
23    pub use super::fft::{fft, ifft};
24    pub use super::ntt::{montgomery_reduce, InverseNttOperator, NttOperator};
25    pub use super::params::{Modulus, NttModulus};
26    pub use super::polynomial::{Polynomial, PolynomialNttExt};
27    pub use super::sampling::{CbdSampler, GaussianSampler, UniformSampler};
28    pub use super::serialize::{CoefficientPacker, CoefficientUnpacker};
29}
30
31// Helper functions or common constants might be added here later.