*** EST. 1999 — RESTORED & BACK ONLINE ***

NEUROPROSTHESIS.ORG

Research notes on science, new technologies, artificial intelligence, startups & the Web


How Computers Fake Randomness, and Why True Randomness Is So Hard

August 10, 2026 — by sysop_gray — filed under The Wired World


How Computers Fake Randomness, and Why True Randomness Is So Hard

Ask a computer to pick a random number and it will happily oblige. Ask how it did it, and you uncover one of the quiet paradoxes at the heart of computing: a computer is a deterministic machine, built to do exactly the same thing every time given the same input, and determinism is the precise opposite of randomness. A device engineered to be perfectly predictable is being asked to produce the perfectly unpredictable, and the tension between those two things is not a trivial engineering footnote. It shapes the security of your bank login, the fairness of games, the integrity of scientific simulations, and much else besides. This is a research note on how computers manufacture randomness, why the randomness they usually produce is a convincing fake, and why genuine randomness is one of the harder things a machine can be asked for.

How Computers Fake Randomness, and Why True Randomness Is So Hard

The paradox of a deterministic machine

Start with the contradiction, because everything follows from it. A computer, at its core, is deterministic: feed it the same instructions and the same inputs, and it produces the same output, every single time, by design. That reliability is the whole point of computing — you want a machine that behaves predictably. But randomness is, by definition, the absence of predictability, an outcome that cannot be determined in advance. Asking a deterministic machine to generate a truly random number is therefore asking it to do something fundamentally at odds with its nature.

This is not a limitation of any particular computer; it is baked into what a computer is. A process that follows fixed rules cannot, by following those rules, arrive at something genuinely unpredictable, because the rules determine the result. So when a program hands you a "random" number, something more subtle is going on than the word suggests. The machine has not reached into a well of pure chance. It has done something clever to produce a number that behaves as if it were random, while remaining, underneath, entirely determined. Understanding the gap between those two things — behaving randomly and being random — is the whole subject.

Pseudo-randomness: a convincing fake

The workaround computers use is called a pseudo-random number generator, and the "pseudo" is doing crucial work. A pseudo-random generator is an algorithm that takes a starting value — a "seed" — and applies a mathematical formula to produce a long sequence of numbers that look, for all practical purposes, random. The sequence has no obvious pattern, passes many statistical tests for randomness, and is more than good enough for a great many uses. But it is not random at all. It is completely determined by the seed: start with the same seed, and you get the exact same "random" sequence every time.

This is the key insight, and it is genuinely counterintuitive. The numbers your computer calls random are usually the output of a fixed formula, unwinding a predetermined sequence that merely wears the costume of randomness. For most everyday purposes this is fine — a game shuffling cards, a simulation needing varied inputs, a program picking a colour — because the sequence is unpredictable enough for the job and being reproducible from a seed is often useful. The fakery only becomes a problem when the stakes are high enough that "looks random" is not the same as "is random," and someone might have a reason, and a way, to predict the next number.

Where fake randomness becomes dangerous

That distinction stops being academic the moment randomness is protecting something valuable, and this is where the whole subject acquires teeth. Consider security. An enormous amount of cryptography — the encryption guarding your messages, your passwords, your financial transactions — depends on generating numbers an attacker cannot guess. If the "random" numbers underpinning that security are actually the output of a predictable formula, and an attacker can work out the seed or the pattern, the security collapses. Predictable randomness in a cryptographic system is not a minor flaw; it is a catastrophic one, because the entire protection rests on the unpredictability being real.

Fairness is the other domain where it bites, and it is an especially clean illustration. Any system whose legitimacy depends on outcomes being genuinely unpredictable needs randomness an interested party cannot foresee. When a platform such as Spinboss official states that its games run on certified random number generators, that certification exists precisely because "the numbers look random" is not a strong enough guarantee where money and fairness are involved — an independent process has to verify that the randomness is robust and not secretly predictable, since a predictable generator would let outcomes be anticipated or manipulated. The same principle governs scientific simulations, lotteries, and any process where a hidden pattern in the "randomness" would quietly corrupt the results. In all of these, the convincing fake is not good enough; the randomness has to hold up against someone actively trying to predict it.

Reaching for the real thing

So how do computers produce randomness good enough for high-stakes uses? They stop relying purely on formulas and start harvesting unpredictability from the physical world. Because a deterministic algorithm cannot conjure true randomness on its own, systems that need the real thing gather "entropy" from sources that are genuinely unpredictable — the microscopic timing of a user's keystrokes and mouse movements, tiny fluctuations in hardware, electrical noise, and other physical phenomena that no formula governs. This collected entropy is used to seed the generators, injecting a dose of genuine unpredictability from outside the deterministic machine.

The distinction this creates is fundamental. A pseudo-random generator, seeded predictably, produces a convincing fake suitable for low-stakes uses. A generator seeded with real-world entropy — and there are also dedicated hardware devices built specifically to produce true randomness from physical processes — produces something far closer to genuine unpredictability, suitable for security and fairness. The engineering effort that goes into gathering good entropy, and into the hardware random generators used where the stakes are highest, is precisely the effort required to bridge the gap between a machine's deterministic nature and the true randomness the world sometimes demands of it. It is a surprising amount of work to make a predictable machine unpredictable, and that work is invisible to almost everyone who benefits from it.

The unpredictable machine

The deeper lesson in all of this is that randomness, which feels like the simplest thing in the world — just pick something at random — is quietly one of the harder things to get right in computing. The convenient fake that a pseudo-random generator produces is good enough for most of daily computing and is used constantly, which is why the difficulty stays hidden. But underneath the seamless illusion sits a genuine paradox and a genuine engineering achievement: a deterministic machine, coaxed by physical entropy and careful design into producing outcomes that even a determined adversary cannot predict.

It is worth appreciating how much rests on that achievement. The security of encrypted communication, the integrity of a scientific model, the fairness of a regulated game — all of them depend on a machine successfully doing the one thing it is least naturally suited to do. The next time a program hands you a random number, it is worth remembering that behind that casual word lies either a convincing fake unwinding from a hidden seed, or a small triumph of engineering that reached out into the physical world to borrow some genuine chance. Which one it is depends entirely on how much was riding on the answer — and knowing the difference is the difference between randomness that merely looks trustworthy and randomness that actually is.


« Back to the archive · Front page