SeedFlurry
SeedFlurry extracts secure IID entropy bytes from reliable onboard hardware.
Pricing
SeedFlurry is only $10 (payable with BTC) per GB of seedflurry output.
Implementation
SeedFlurry requires x86_64 (x86intrin.h) and __rdtsc timestamps (with nanosecond-precision measurements and nanosecond-interval continuity).
Furthermore, SeedFlurry requires C99-compliant stdint.h bit widths (for uint8_t and uint64_t).
#include <stdint.h>
#include <stdio.h>
#include <x86intrin.h>
uint8_t seedflurry(void) {
uint64_t a = 0;
uint64_t b = 0;
uint64_t c;
uint8_t i = 0;
while (i < 6) {
if (a) {
c = __rdtsc();
} else {
c = 0;
}
a ^= c;
while (!(c >> 27)) {
a += a << 17;
a ^= a >> 13;
if (a) {
c = __rdtsc();
} else {
c = 1;
}
b += c;
a += (a >> 8) + b;
}
b += (c & 0xFFFFFF) + 111111111;
a += (a >> 8) + b;
a += a << 17;
a ^= a >> 13;
i++;
}
return a;
}
Independence
Each seedflurry procedure entangles measurements of independent CPU time fluctuations within a pool of system-wide CPU time fluctuations.
The insignificance of system-wide CPU time fluctuations to an IID seedflurry byte is similar to the insignificance of physical rain drops to a physical IID coin toss.
Therefore, each seedflurry byte is independent.
Randomness Test Results
seedflurry returns 8 bits (with near-perfect entropy) as a conditioned result from entangling at least 140 bits of CPU time measurements.
SeedFlurry randomness tests were performed on an AMD A4-9120C with gcc -O3 (using pthread.h with 16 parallel seedflurry threads).
SeedFlurry yields excellent test results among several NIST SP 800-90B IID entropy assessment runs that each generated 1 million seedflurry output results (8MB).
In ea_iid and ea_restart, SeedFlurry had an H_original of 7.87+ (out of 8), an H_bitstring of 0.998+ (out of 1) and no statistical test failures.
Furthermore, SeedFlurry yields excellent results in statistical test suites (such as PractRand 0.96) without post-processing seedflurry output.
Speed
seedflurry uses fast PRNG mixing procedures for simultaneously generating CPU fluctuations and conditioning sequential CPU time measurements.
Furthermore, seedflurry code is structured defensively against aggressive -O3 compiler liberties.
SeedFlurry speed tests were performed on an AMD A4-9120C with gcc -O3 in a #pragma GCC unroll 0 loop.
30 milliseconds was the fastest process execution speed among several test runs that generate (and hash) 1 million seedflurry output bits sequentially.
SeedFlurry speed (compared to CSPRNGs) is suitable for quickly generating small sequences of high-entropy bytes (to seed deterministic algorithms securely).
Parallel seedflurry function invocations can increase speed in application-specific cases (within hardware capacity).
Stability
SeedFlurry virtually eliminates the marginal risk of error that every entropy source attempts to reduce.
SeedFlurry leverages the already-vetted hardware reliability of CPUs and system clocks (to eliminate file descriptor error risk from I/O /dev/ interfaces).
I/O failures, VM constraints, entropy pool starvation and environmental noise interference are irrelevant to the stability of SeedFlurry.
seedflurry returns PQC-ready entropy that's non-depletable (within processing capacity).
SeedFlurry hasn't experienced any system clock measurement failures through substantial stress testing.
Open Source
SeedFlurry contributes to relevant open-source innovation by creating (and maintaining) the following hyper-efficient pseudorandom number generators.