---
title: 'IID-based QPP-RNG: Quantum Permutation Pad RNG'
url: https://www.emergentmind.com/topics/iid-based-qpp-rng
type: topic
---

# IID-based QPP-RNG: Quantum Permutation Pad RNG

An IID-based QPP-RNG (Quantum Permutation Pad Random Number Generator) is a cryptographically robust random number generator achieving independent and identically distributed (IID), provably uniform random outputs by synthesizing combinatorial complexity via random permutation sorting and harnessing microarchitectural system jitter as an entropy source. This class of generators formalizes a quantum-inspired paradigm in which algorithmically deterministic structures and irreducible hardware unpredictability are mathematically unified. The operating principle centers on (i) two conjugate observables—permutation count and sorting time—whose raw, heavy-tailed distributions are mapped to uniform outputs via modular reduction, and (ii) dynamic seed evolution, where system jitter continually re-randomizes the internal generator state, decoupling output sequences from initial conditions [2509.10174, 2502.18609, 2508.01051].

## 1. Theoretical Foundations: Conjugate Observables and Quantum Permutation Pads

The QPP-RNG exploits the quantum-inspired Random Permutation Sorting System (RPSS), whose state is specified by a pair of non-commuting observables:

- **Permutation count ($N_p$):** Number of random permutations applied until a target configuration is achieved (specifically, the $m$-th “success” wherein applied permutations invert the unknown target permutation).
- **Elapsed sorting time ($T$):** Wall-clock time to perform the $N_p$ permutations, accumulating system jitter effects.

The distributions governing these observables are:

- $N_p$ follows a negative-binomial law,
  \[
  \Pr[N_p = k] = \binom{k-1}{m-1} (1-p)^{k-m} p^m, \text{ with } p = 1/M, M = m\cdot N!
  \]
  In the $M \gg 1$ regime, this approaches an exponential distribution, $E[N_p] \sim M$.
- $T$ is a sum of $N_p$ i.i.d. samples of permutation execution times ($X_j$), capturing system-dependent microarchitectural noise:
  \[
  T = \sum_{j=1}^{N_p} X_j.
  \]

The joint state-vector exhibits a formal analogy to quantum superposition, with the marginals $N_p$ and $T$ linked via an uncertainty-like tradeoff—fixing one maximizes variance in the other [2509.10174, 2508.01051].

The Quantum Permutation Pad (QPP) leverages the combinatorial entropy inherent in the symmetric group $S_{2^n}$ of $2^n!$ distinct $n$-bit permutation matrices, yielding entropy $H_n = \log_2 (2^n!)$ [2303.01315]. This ensures extremely high entropy for moderate $n$.

## 2. Modular Reduction: From Heavy-Tailed to Uniform Distributions

Both $N_p$ and $T$ possess right-skewed, heavy-tailed distributions due to the underlying combinatorial landscape and stochasticity of system execution. Uniform output is achieved via modular reduction:

- $f(N_p) = N_p \bmod R$, $g(T) = T \bmod R$, with $R = 2^n$.
- The composite extractor outputs $U = [f(N_p) + g(T)] \bmod R$.

Uniformity arises from the degeneracy of the modular map: each raw value $k$ is folded modulo $R$, with the number of preimages of each residue guaranteed to be nearly equal for $M \gg R$ by theorems:

- **Theorem 1:** For $N_p$ with mean $M \gg R$, $\Pr[N_p \bmod R = r] = 1/R + O(1/M)$.
- **Theorem 2:** If $T$ is a sum of i.i.d. nonlattice times and $E[T] \gg R$, $\Pr[T \bmod R = t] = 1/R + O(1/E[T])$.

Thus, $U$ is within $O(1/M + 1/E[T])$ of being uniform [2509.10174]. Internal degeneracies from the factorial search space ensure effective flattening of output histograms [2508.01051].

## 3. Proof of IID Uniformity and Empirical Validation

The IID-based QPP-RNG achieves strict independence and identical distribution via two mechanisms:

- **Per-cycle uniformity:** The modular reduction of heavy-tailed observables yields outputs indistinguishable from uniform. For each cycle $i$, $U_i \sim \mathrm{Uniform}(\{0, \dots, R-1\})$ up to negligible discrepancies ($O(1/M)$).
- **Inter-cycle decorrelation:** Each round, the LCG/QPP-GEN seed is refreshed using jitter-derived residues (typically $T \bmod R$ or $\Delta_i \bmod 256$), rapidly washing out memory of any initial state. The design accommodates both software-only cycling and integration with true or hardware-based entropy [2509.10174, 2502.18609].

Empirical benchmarks, including NIST SP 800-90B min-entropy and Shannon entropy assessments, demonstrate output qualities:

| Mode                 | Shannon Entropy (bits/byte) | Min-Entropy (bits/byte) | $\chi^2$ Statistic (ideal 256) |
|----------------------|-----------------------------|-------------------------|-------------------------------|
| QPP-RNG ($n=8$)      | $7.9998$–$7.9999$           | $7.85$–$7.95$           | $\approx$ 250–280             |
| ID Quantique QRNG    | —                           | $7.157042$              | —                             |

IID-based QPP-RNG passes all NIST SP 800-90B/22 and ENT suites under desktop and mobile environments, with autocorrelation and spectral coefficients vanishing ($<0.01$), confirming no detectable statistical dependencies [2502.18609, 2508.01051].

## 4. Implementation Protocols and System Jitter Integration

Practical realization is fully software-based:

1. **Initialization:** Seed an LCG (or fast PRNG) using a pool (e.g., $64$ bits) of measured system jitter bytes, such as $\Delta_i \bmod 256$ for eight consecutive sorting cycles [2502.18609].
2. **Ephemeral QPP Pad Generation:** Use the seeded LCG to drive Fisher–Yates shuffles on $n$-element arrays, producing secret permutations per round.
3. **Sorting and Output Extraction:** In each round, permutation sorting is repeated $m$ times (searching for $m$-th inverse success). The permutation count $N$ is taken, and the output is $d = N \bmod 256$.
4. **Dynamic Jitter Reseeding:** Each round, the observed $\Delta_j \bmod 256$ is incorporated into the seed via
   \[
   \mathrm{seed}_{i+1} = (\mathrm{seed}_i \ll 8) + (\Delta_j \bmod 256)
   \]
   ensuring fresh entropy injection.

The architecture is robust to adversarial attempts at seed prediction and attacks exploiting initial deterministic bias, as the re-randomization protocol ensures rapid loss of seed state memory and forward secrecy [2502.18609].

Microarchitectural jitter contributions originate from sources such as CPU pipeline turbulence, cache and DRAM accesses, frequency scaling, IRQs, context switches, and are measured at nanosecond (or finer) granularity [2509.10174, 2502.18609].

## 5. Statistical and Security Properties

The entropy bottleneck is eliminated by (i) the factorial scaling of QPP pad space ($2^n!$), (ii) the uniformization properties of modular reduction, and (iii) continuous hardware entropy injection. Distinct advantages include:

- **Fast entropy convergence:** Empirical uniformity is attained once $M \gg R=2^n$; e.g., $N=6, m=2 \implies M=1,440 \gg 256$ [2509.10174, 2508.01051].
- **High entropy per byte:** Empirical min-entropy ($H_\infty\approx7.85$–$7.95$ bits) exceeds that of commercial quantum RNGs, with Shannon entropy ($H\approx7.9999$) near theoretical maximality.
- **Platform independence:** Uniformity and independence properties are verified on multiple x86 and ARM platforms, including different OS and timing granularities.
- **Post-quantum security:** An $n$-bit QPP pad provides a key space of $(2^n)!$; Grover-type quantum search does not apply due to the combinatorial explosion of possible pads, and permutation-pad recovery is intractable for Shor-class algorithms [2502.18609, 2303.01315].

IID-based QPP-RNG is suitable for session key generation, quantum-safe nonce construction, seeding of higher-level CSPRNGs, and entropy boosting or whitening for hardware or quantum RNGs [2303.01315].

## 6. Design Recommendations and Typical Performance

Implementation guidelines to ensure provable IID uniformity:

- Select $N$ and $m$ such that $M=m\cdot N! \gg 2^n$.
- Employ high-resolution timers capable of capturing low-level jitter.
- Use modular reduction for both $N_p$ and $T$; their combination further boosts output flatness.
- Maintain dynamic seed evolution by incorporating observed jitter into PRNG seeds each cycle.

Achievable throughput is high—modern CPUs exceed $1$ GB/s, as each output byte requires only a shuffle, modulo computation, and a seed update.

The unique use of permutation group structure and dynamic system noise establishes a new class of software-only, physics-grounded RNGs, bridging quantum-mechanical concepts and practical entropy extraction without the need for dedicated quantum hardware [2509.10174, 2502.18609, 2508.01051, 2303.01315].

Source: https://www.emergentmind.com/topics/iid-based-qpp-rng