quantaegis_drbg/lib.rs
1//! From-scratch, pure-Rust, `#![no_std]`, `#![forbid(unsafe_code)]`, zero-external-dependency
2//! FIPS 140-3 DRBG and integrity-hash primitives for the `quantaegis-*` workspace.
3//!
4//! # Provided Primitives
5//! - **[`Sha256`]** (**NIST FIPS 180-4**): 256-bit streaming & one-shot hash function.
6//! - **[`HmacSha256`]** (**NIST FIPS 198-1**): 256-bit keyed-hash MAC shared by `HMAC_DRBG` and
7//! FIPS 140-3 software integrity verification.
8//! - **[`HmacDrbgSha256`]** (**NIST SP 800-90A Rev. 1** + **SP 800-90C**): 256-bit security
9//! strength `HMAC_DRBG(SHA-256)` enforcing 384-bit RBG2 initialization min-entropy, 256-bit
10//! reseed entropy, `2^17`-bit (`16,384`-byte) cumulative output reseed threshold, prediction
11//! resistance, and Section 11.3 self-tests.
12//! - **[`health`]** (**NIST SP 800-90B Section 4.4**): Repetition Count Test (RCT), Adaptive
13//! Proportion Test (APT), and 1,024-sample startup/on-demand test strictly for unconditioned raw
14//! noise sources.
15//!
16//! # Security & Engineering Invariants
17//! - `#![no_std]` (no `alloc`), `#![forbid(unsafe_code)]`, zero external runtime dependencies.
18//! - Division-free arithmetic audited across `x86_64`, `aarch64`, `wasm32`, and `thumbv7em`.
19//! - Automatic zeroization on drop and redacted `Debug` formatting for all secret state.
20
21#![no_std]
22#![forbid(unsafe_code)]
23
24#[cfg(feature = "std")]
25extern crate std;
26
27pub mod health;
28pub mod hmac;
29pub mod hmac_drbg;
30pub mod sha256;
31
32pub use hmac::HmacSha256;
33pub use hmac_drbg::HmacDrbgSha256;
34pub use sha256::Sha256;