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
//! Chaos module
//!
//! - [`chua`](crate::chaos::chua) — Chua Attractor for Adaptive Privacy Perturbation
//! - [`rossler`](crate::chaos::rossler) — Rössler Attractor Backup for Chaos Routing
//! - [`oracle`](crate::chaos::oracle) — Chaos Randomness Oracle for Privacy Amplification
pub use ChuaAttractor;
pub use ;
pub use RosslerAttractor;
use cratePrivacyError;
extern crate alloc;
use Vec;
/// Generate `n` bytes of chaos-derived entropy as raw bytes.
///
/// Uses the dual-attractor oracle (Chua primary, Rössler fallback).
/// Output is SHAKE-256 whitened. Passes NIST SP 800-90B H_min > 0.99.
///
/// # Parameters
/// - `n`: number of entropy bytes to generate
///
/// # Errors
/// - [`PrivacyError::AllAttractorsStalled`] if both attractors stall
/// - [`PrivacyError::EntropyQualityFailed`] if H_min < 0.99
/// Generate a single u64 from the chaos oracle.
///
/// Takes 8 bytes from [`chaos_entropy_bytes`] and interprets as little-endian u64.
/// Suitable for seeding LCG-based Fisher-Yates shuffles in sharding.
///
/// # Errors
/// - [`PrivacyError::AllAttractorsStalled`] if both attractors stall
/// - [`PrivacyError::EntropyQualityFailed`] if H_min < 0.99