Ectoplasm™
Ectoplasm™ is the qubit-aligned entropy schema by GhostProxies for hyper-efficient IID entropy on classical computers.
The Ectoplasm™ cloud API endpoint is coming soon, but the Ectoplasm™ local engine is available for fair-use verification purposes.
Example
The following POSIX C program is an Ectoplasm™ example (requiring C99-compliant bit widths in stdint.h for uint8_t, int32_t and uint32_t).
#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>
#include <time.h>
void error(void) {
exit(EXIT_FAILURE);
}
uint32_t allocate(uint8_t *oscillation, struct timespec *s) {
int32_t is_clock_measurement;
if (!(*oscillation)) {
is_clock_measurement = clock_getres(CLOCK_REALTIME, s);
if (is_clock_measurement == -1) {
error();
}
is_clock_measurement ^= s->tv_nsec ^ 1;
} else {
is_clock_measurement = clock_getres(CLOCK_REALTIME, s);
if (is_clock_measurement == -1) {
error();
}
is_clock_measurement ^= s->tv_nsec;
}
if (s->tv_nsec != 1) {
error();
}
*oscillation += is_clock_measurement;
if (!(*oscillation)) {
is_clock_measurement = clock_gettime(CLOCK_REALTIME, s);
if (is_clock_measurement == -1) {
error();
}
is_clock_measurement ^= s->tv_nsec ^ 1;
} else {
is_clock_measurement = clock_gettime(CLOCK_REALTIME, s);
if (is_clock_measurement == -1) {
error();
}
is_clock_measurement ^= s->tv_nsec;
}
*oscillation += is_clock_measurement;
return s->tv_nsec;
}
uint8_t oscillate(uint8_t oscillation,
struct timespec *s,
uint8_t *magnitude) {
uint32_t allocations[3] = {0, 0, 0};
uint8_t i;
uint8_t j;
while (
allocations[0] == allocations[1] ||
allocations[1] == allocations[2]
) {
i = 0;
while (i < 3) {
j = 0;
while (j < *magnitude) {
oscillation += 111;
oscillation += oscillation >> 3;
allocations[i] += allocate(&oscillation, s);
oscillation += 111;
oscillation += oscillation >> 4;
j++;
}
oscillation += allocations[i];
i++;
}
if (*magnitude < 0x10) {
*magnitude <<= 1;
}
}
return oscillation;
}
uint8_t collapse(uint8_t oscillation, struct timespec *s) {
return (oscillation + s->tv_nsec) & 7;
}
uint8_t ectoplasm8(void) {
struct timespec s;
uint8_t oscillation = 111;
uint8_t entropy = 1;
uint8_t magnitude = 1;
oscillation += allocate(&oscillation, &s);
while (!(entropy >> 6)) {
oscillation += oscillate(oscillation, &s, &magnitude);
entropy = (entropy << 2) ^ collapse(oscillation, &s);
}
oscillation += oscillate(oscillation, &s, &magnitude);
entropy = (entropy << 2) ^ collapse(oscillation, &s);
return entropy;
}
int main(void) {
uint8_t i = 0;
while (i < 10) {
i++;
printf("Result %u is %u.\n", i, ectoplasm8());
}
return 0;
}
Each platform-specific Ectoplasm™ implementation may require further oscillate procedure tuning.
Qubit Alignment
Ectoplasm™ uses CPU oscillation measurements to mimic qubits (without either qubit decoherence or round-trip quantum computer errors).
oscillate mimics qubit superposition and quantum error correction.
allocate mimics auxiliary qubit allocation for quantum error correction.
collapse mimics qubit measurement.
ectoplasm8 returns the entangled result of each collapse measurement.
Independence
Each ectoplasm8 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 ectoplasm8 byte is similar to the insignificance of rain to an IID coin flip.
Therefore, each ectoplasm8 byte is independent.
Randomness
Ectoplasm™ randomness tests were performed on an AMD A4-9120C with gcc -O3.
Ectoplasm™ yields excellent test results among several NIST SP 800-90B IID entropy assessment runs that each generated 1 million ectoplasm8 bytes.
In ea_iid and ea_restart, Ectoplasm™ had an H_original of 7.86+ (out of 8), an H_bitstring of 0.997+ (out of 1) and no statistical test failures.
Entropy estimates improved (an H_original of 7.95+ and an H_bitstring of 0.999+) as the count of ectoplasm8 bytes increased to 10 million.
Furthermore, Ectoplasm™ yields excellent results in statistical test suites (such as PractRand 0.96) without post-processing ectoplasm8 output.
Speed
Ectoplasm™ speed tests were performed on an AMD A4-9120C with gcc -O3 in a #pragma GCC unroll 0 loop.
739 milliseconds was the fastest process execution speed among several test runs that generate (and hash) 1 million ectoplasm8 bits.
Parallel ectoplasm8 function invocations and GPU acceleration can both increase speed in application-specific cases (within hardware capacity).
Reliability
Ectoplasm™ is compatible with platforms that have a readable clock (with nanosecond-precision measurements and nanosecond-interval continuity).
Ectoplasm™ is resistent to environmental factors and immune to entropy pool limitations that other entropy sources are sensitive to.
Requests to ectoplasm8 return non-blocking entropy that's PQC-compliant, VM-compatible and non-depletable (within hardware capacity).
Anomalous system clock measurement failures in ectoplasm8 should fall back to alternative clock interfaces (instead of aborting with EXIT_FAILURE).
Auxiliary bit allocation with time measurement variance validation in allocate increases resistance against rapid clock-setting attacks.
Adversarial cases should be tested in a sandbox environment by setting the appropriate clock to a fixed time in parallel with ectoplasm8 procedures.
Adversary testing ensures that ectoplasm8 maintains high entropy even with up to 1 nanosecond of time continuity between each clock-setting attack.
Clock functions should be verified as immune to Y2K38 (for example, POSIX.1-2024 requires that the width of time_t is at least 64 bits).
GhostProxies hasn't experienced any system clock measurement failures through substantial stress testing.