network_protocol/utils/
mod.rs

1//! # Utility Modules
2//!
3//! Supporting utilities for cryptography, compression, logging, and timing.
4//!
5//! This module provides reusable utilities used throughout the protocol implementation.
6//!
7//! ## Components
8//! - **Crypto**: ChaCha20-Poly1305 AEAD encryption
9//! - **Compression**: LZ4 and Zstd with size limits and thresholds
10//! - **Logging**: Structured logging configuration
11//! - **Time**: Timestamp utilities for timeout and expiry checks
12//! - **Timeout**: Async timeout wrappers
13//!
14//! ## Security
15//! - Cryptographically secure RNG (getrandom)
16//! - Decompression bomb protection (16MB limit)
17//! - Memory zeroing for sensitive data (zeroize crate)
18
19pub mod compression;
20pub mod crypto;
21pub mod logging;
22pub mod time;
23pub mod timeout;
24
25/// Optional runtime configuration (may be expanded to struct later)
26pub struct RuntimeConfig;