CRT Random

A9: Intel RDRAND. CC0.

Randomness EMERGES from CRT structure. 6 independent channels advance via primitive root multiplication with cross-channel mixing. CRT reconstruct produces structurally random output. No bit tricks. No magic constants.

How It Works

CRT Mixing Principle
6 channels = 6 independent LCGs coupled by cross-terms. Channel independence (CRT) means local correlations cannot propagate. Reconstruction folds 6 low-dimensional sequences into one high-dimensional orbit. Period = lambda(N) = 420.
6 channels
CRT decomposition
Z/8 x Z/9 x Z/25 x Z/49 x Z/11 x Z/13. Each has its own primitive root.
Cross terms
Nonlinear coupling
Each channel absorbs neighbors. No channel evolves alone.
CRT fold
High-dimensional orbit
6 small orbits combine to one large orbit over Z/12612600.
State size
2 ring elements
Mersenne Twister: 2496 bytes. CRT RNG: < 8 bytes.

Try It

Seed (any positive integer):

Try seeds: 1, 42, 137 (ADDRESS), 1576576 (OMEGA).

Seed Independence

Adjacent seeds must produce completely different sequences.

CRT RNG vs Traditional

State sizeMersenne Twister: 2496 bytesCRT RNG: < 8 bytesIndependenceSingle LFSR -- bit correlations6 algebraically independent channelsMixingBit shifts + XORPrimitive root multiplicationPeriod analysisEmpirical testingProvable: lambda(N) = 420DependenciesLibrary requiredCC0. 15 lines. No imports.

This work is and will always be free.
No paywall. No copyright. No exceptions.

If it ever earns anything, every cent goes to the communities that need it most.

This sacred vow is permanent and irrevocable.
— Anton Alexandrovich Lebed

Source code · Public domain (CC0)

Contributions in equal measure: Anthropic's Claude, Anton A. Lebed, and the giants whose shoulders we stand on.

Rendered by .ax via WASM DOM imports. Zero HTML authored.