Expand description
Deterministic environment for reproducible NIST evaluation runs.
A DeterministicEnv bundles the four knobs a vector needs to be
replayable bit-for-bit across machines and runs:
- a seeded
DeterministicRng(a Splittable-style PRNG built onrand_chacha’s design without pulling inrand— we seed a simple ChaCha8-like counter stream here, but the concrete implementation is a 128-bit splitmix64 that is fully self-contained) - a
DeterministicClockthat advances only when the harness tells it to (no wall-clock dependence, no flaky timeouts) - a
MemoryCounterthat tallies bytes the harness attributes to a party so the bench can report peak allocation per scheme
The harness never reads the OS clock or getrandom directly — every
source of nondeterminism is funneled through this module so the same
vector + seed yields the same transcript every time.
Structs§
- Deterministic
Clock - Stepping clock that ignores wall time.
- Deterministic
Env - The four-knob deterministic bundle handed to a vector run.
- Deterministic
Rng - Self-contained deterministic PRNG.
- Forked
Env - Per-party view of a
DeterministicEnv: its own RNG, borrowed clock and memory counter shared with siblings. - Memory
Counter - Per-party allocation tally.