Ectoplasm™
Ectoplasm™ is the qubit-aligned entropy schema by GhostProxies for efficient entropy on classical computers.
The following schema can be implemented with a proprietary license in platform-specific cases as a high-quality entropy source for efficient seeding.
Example
The following POSIX C program is a case-specific Ectoplasm™ code example that generates 10 8-bit seeds for the purpose of demonstrating functionality.
#include <stdio.h>
#include <stdlib.h>
#include <time.h>
void error(void) {
exit(EXIT_FAILURE);
}
long allocate(unsigned char *oscillation, struct timespec *s) {
int is_clock_measurement;
*oscillation += s->tv_nsec;
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 & 1;
}
if (s->tv_nsec != 1) {
error();
}
*oscillation += s->tv_nsec;
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 & 1;
}
*oscillation += is_clock_measurement & 1;
return s->tv_nsec;
}
unsigned char oscillate(unsigned char entropy,
unsigned char oscillation,
struct timespec *s,
short *magnitude) {
unsigned long allocations[3] = {0, 0, 0};
char i;
short j;
while (
allocations[0] == allocations[1] ||
allocations[1] == allocations[2]
) {
i = 0;
while (i < 3) {
j = 0;
while (j < *magnitude) {
oscillation *= (entropy + oscillation) % 111;
allocations[i] += allocate(&oscillation, s);
oscillation += (oscillation >> 4) + 111;
allocations[i] += allocate(&oscillation, s);
j++;
}
oscillation += allocations[i];
i++;
}
if (*magnitude < 0x100) {
*magnitude <<= 1;
}
}
return oscillation;
}
unsigned char collapse(unsigned char oscillation, struct timespec *s) {
return (oscillation + s->tv_nsec) & 1;
}
unsigned char ectoplasm(void) {
struct timespec s;
unsigned char oscillation = 111;
unsigned char entropy = 1;
short magnitude = 1;
oscillation += allocate(&oscillation, &s);
while (!(entropy >> 7)) {
oscillation += oscillate(entropy, oscillation, &s, &magnitude);
entropy = (entropy << 1) | collapse(oscillation, &s);
}
oscillation += oscillate(entropy, oscillation, &s, &magnitude);
entropy = (entropy << 1) | collapse(oscillation, &s);
return entropy;
}
int main(void) {
char i = 0;
while (i < 10) {
i++;
printf("Result %u is %u.\n", i, ectoplasm());
}
return 0;
}
Qubit Alignment
Ectoplasm™ uses classical computing to mimic qubit behavior and generate process-isolated entropy bits from CPU oscillation measurements.
oscillate mimics qubit superposition and quantum error correction.
allocate mimics auxiliary qubit allocation for quantum error correction.
collapse mimics qubit measurement.
ectoplasm returns the concatenated result of each collapse entropy bit.
Randomness
Ectoplasm™ enables fine-grained control of entropy bounds on classical computers without either qubit phenomena inconsistencies or round-trip quantum computer errors.
Deterministic procedures control process-isolated unpredictability by measuring high-resolution CPU time fluctuations from oscillation sets.
Auxiliary bit allocation with time measurement variance validation increases resilience against processes that set specific nanosecond-precision system clock times.
After processing an oscillation set, Ectoplasm™ truncates the smallest fraction of a system-defined nanosecond Epoch time measurement as 1 entropy bit.
Visual
The following animation is a step-by-step portrayal that simulates Ectoplasm™ qubit alignment for visual demonstration purposes.
Considerations
Each Ectoplasm™ implementation should consider the following factors.
1. Y2K38 could produce integer overflows when unpatched system clock functions require 32-bit, signed integers.
2. Each system clock measurement requires nanosecond-precision time with nanosecond-interval time continuity.
3. System clock measurement failures abort with EXIT_FAILURE, although fallback RNG requests may be preferred.
4. Adversarial cases should be tested in a sandbox environment by rapidly setting the system clock to a fixed time (from external processes) during ectoplasm procedures.
5. Some HPC implementations may require persistent entropy health monitoring and magnitude procedure tuning.