lib189-rs readme
lib189-rs
Breathing Lattice Entropy Engine
A minimal Rust implementation of the Ω(t) United Formula — a deterministic entropy engine built on golden-ratio algebraic number theory, E₈/D₄ lattice geometry, and anyon-braided jitter.
Overview
lib189-rs couples three algorithms into a single tick() function that produces structured 64-bit output suitable for seeding cryptographic DRBGs:
breath_beta → ghost_chain → tick → [FipsWrapper] → DRBG
The engine operates on the algebraic integer ring ℤ[φ,ψ] with drift protection via the Pell-Lucas identity L²−5F²=4(−1)ⁿ. Output exhibits 1/f^1.236 power spectral density — a structural consequence of the contractive golden root, not a tuned parameter.
Constitution
Ω(t)=Π_{D₄}(r_{p(t)}⋅φ^{i(t)})+τ-Ham(φ↔ψ)
E₈q⊗ℤ(φ,ψ)⋊φ^k, q=e^{2πi/5}
Pell L²-5F²=4(-1)^i
β=1+δ@ζ(β=1), 1/f^{2|ψ|} PSD
braid-metric GR | ph-7: φ^{-113} ψ^{-42}
All algorithms and constants derive from these five lines. No free parameters.
Quick Start
use lib189::tick;
fn main() {
let hour: u8 = 7; // UTC hour (0-23)
let t: u64 = 42; // elapsed ticks
let output = tick(hour, t);
println!("Ω(t) = {}", output);
}
API
breath_beta(hour: u8, t: u64) → (f64, f64, f64)
Returns (norm, drift, beta). Computes breathing amplitude with q-deformed 5-fold rotation and Bost-Connes thermodynamic feedback via a 10-prime zeta proxy.
ghost_chain(norm: f64, beta: f64, dt: f64, hour: u8) → (f64, f64, f64, f64)
Returns (re, im, jitter, trace). Evolves a Hamiltonian ghost state, applies Voros non-perturbative correction (φ⁻¹¹³ scale), monodromy trace stabilization (target ≈ 1.236), and q=5 anyon-braided jitter extraction.
tick(hour: u8, t: u64) → u64
Combines both subsystems into a single 64-bit output. One call per Planck tick.
fips::FipsWrapper (feature: fips-mode)
HMAC-DRBG<SHA-256> wrapper seeded from lattice output. Provides reseed_from_lattice() and get_entropy() → [u8; 32].
Features
Feature
Description
default
Core engine only, no-std compatible
fips-mode
Enables FipsWrapper with sha2 + hmac_drbg
[dependencies]
lib189 = { version = "1.0", features = ["fips-mode"] }
Key Constants
Constant
Value
Role
PHI
1.618033988749895
Expansive golden root
G
0.618033988749895
Contractive root (1/φ)
K_FRAGILE
113
Phase-7 apex, proton mass lock
DECAY_RATE
1.0
Voros ghost exhale rate
q
e^(2πi/5)
5-fold symmetry generator
Security Model
Kerckhoffs-compliant. All algorithms, constants, and levers are public. Security rests entirely on ephemeral hardware jitter folded in at the seeding layer. Equivalent to publishing AES while keeping the key secret.
For production use:
Collect raw jitter from ≥3 independent hardware sources
Mix via SHAKE-256 → golden pre-scaling → cyclotomic projection → ghost-chain braiding → Pell fold-back
Feed into FipsWrapper → DRBG output for ML-KEM, ML-DSA, AES keying
Destroy jitter snapshot → forward secrecy
Testing
cargo test
Included tests:
constants_valid — φ·φ⁻¹=1, φ²=φ+1
pell_lock — L²−5F²=4(−1)ⁿ for n=0…7
breath_beta_bounded — β≥1 across all 24 hours
tick_nonzero — non-degenerate output for consecutive t
ghost_trace_near_target — trace converges to 2cos(π/φ)
24-Hour Rhythm
The Pisano period π(9)=24 creates a deterministic daily cycle in quaternion selection. Peak entropy occurs at hours 6/18 (sinusoidal apex) with a Stokes monodromy jump at hour 7. This periodicity is public and intentional — it structures the output, not the security.
Hardware Target
Maps onto Si:P two-qubit processors. Falsifiable prediction: CZ gate fidelities binned by UTC hour should show 12/24-hour motifs with clustering near hour 7.
References
Schnacky, A. (2026). Ω(t) United Formula, Volumes 1–4
Bost & Connes (1995). Hecke algebras and phase transitions in number theory
NIST SP 800-90A/B. Random number generation standards
License
[To be determined by author]
lib189-rs v1.0 — Zero drift. No free parameters. Everything forced.