Not All Random Numbers Are Created Equal
Learn how PRNGs, physical entropy sources and quantum random-number generators work together, and what to check before using randomness for security.
From entropy to application
Measure and condition
physical uncertainty
Optional expansion
from a protected state
Keys, nonces
and security protocols
From Algorithms to Physical and Quantum Entropy
You open WhatsApp and see a message saying that a contact’s security code has changed. Later, you log in to your bank and are asked for a six-digit code. Most of us deal with these messages without giving them much thought.
But both lead to a surprisingly basic question: how does a computer create a secret that nobody else can guess?
The WhatsApp security code is a way to check the encryption keys associated with a conversation. It isn’t the secret key itself, and a change doesn’t necessarily signal an attack. A bank’s one-time code works differently. Some authenticator apps calculate a new code from a secret established earlier and the current time. In both cases, security depends in part on secret material having been generated properly in the first place. 1 2
Most people never see that first step. But when it goes wrong, the consequences can be very public.
When the wrong random numbers cost real money
In July 2026, Bitcoin started disappearing from wallets affected by a flaw in COLDCARD hardware-wallet firmware. Initial reports put the losses at around $70 million. By 5 August, blockchain analytics firm TRM Labs was tracking roughly $116 million across several waves of theft, while stressing that the figure was provisional. 3 4
The cause is worth understanding. According to the manufacturer, a build-and-link error meant that software responsible for creating wallet seeds called an ordinary pseudorandom generator instead of the intended hardware entropy source. The hardware generator hadn’t failed and triggered an emergency fallback. The software had been connected to the wrong function. 5
Attackers didn’t need to defeat Bitcoin’s cryptography or physically access the devices. They could search a much smaller set of possible secrets than the designers had intended.
The origin of the secret mattered every bit as much as the cryptography that used it.
Random-looking isn’t the same as unpredictable
Computers are exceptionally good at doing the same thing twice. Give a program identical inputs and, in normal circumstances, you expect identical results. That’s useful for spreadsheets, simulations and almost everything else we ask computers to do.
For security, though, you sometimes need the opposite: a value an outsider cannot work out, even if they understand the system. Encryption keys, authentication secrets and cryptocurrency wallet seeds are obvious examples.
Imagine a lock with a million possible combinations. That sounds impressive. But if its combination is always calculated from the owner’s birthday, the million possibilities don’t offer much protection. The same issue arises with random-number generators. A sequence can look messy and still be predictable to someone who knows the starting point.
The uncertainty that makes a secret hard to guess is called entropy. It has to come from somewhere.
What software can do very well
A pseudorandom number generator (PRNG) is an algorithm that takes an initial state, often called a seed, and produces a long sequence of numbers. Start it from the same state and you’ll get the same sequence again. For simulations or repeatable software tests, that’s exactly what you want.
Cryptography calls for a more demanding version: a cryptographically secure PRNG (CSPRNG). Its output should remain computationally unpredictable to an attacker who doesn’t know the generator’s protected state. A deterministic random bit generator (DRBG) is a standardized cryptographic design of this kind. NIST SP 800-90A specifies mechanisms based on established cryptographic primitives. 6
These generators are essential, not second-class substitutes for hardware randomness. Once securely initialized, a DRBG can provide large amounts of key material and other cryptographic bits efficiently.
The catch is at the beginning. A deterministic algorithm cannot create fresh physical uncertainty merely by running longer. It needs a suitably unpredictable seed, careful handling of its internal state and, depending on the design, a way to obtain fresh entropy later. The COLDCARD incident wasn’t evidence that software-based cryptography is inherently weak; it showed what can happen when the wrong software generator ends up in a security-critical path.
Where does fresh entropy come from?
One answer is to measure the physical world.
A true random number generator (TRNG) might observe electronic thermal noise or tiny variations in the timing of an oscillator. An electronic circuit measures the signal and turns it into digital samples. Those samples can contribute the entropy used by a cryptographic generator.
Of course, a noisy signal is not automatically a trustworthy one. Temperature, voltage, interference and the measurement electronics themselves can affect the readings. Consecutive samples might also be related. Engineers have to work out how much genuine unpredictability remains after accounting for these effects.
Quantum random number generators (QRNGs) use physical processes whose unpredictability is modelled through quantum mechanics. There are several quite different ways to do this. 7
Some QRNGs use optical measurements, such as laser phase noise or vacuum fluctuations. These approaches have been demonstrated in published experiments, with assumptions about the source, detectors and electronics that must be assessed. They are different physical implementations from iQrypto’s electron shot-noise source in CMOS silicon. 8 9
Quantum processes can also be measured in semiconductors. Researchers have, for example, used stochastic tunnelling events in silicon diodes to produce random-number streams. 10
That variety is important. “QRNG” tells you something about the proposed physical source of uncertainty. It doesn’t tell you, on its own, how much entropy reaches the output, how the device behaves when conditions change or whether a particular product has been independently validated.
A deterministic sequence from an internal state.
- General-purpose PRNG
- Useful for simulation and repeatable tests. Not necessarily suitable for secrets.
- Cryptographic DRBG
- A protected state and cryptographic algorithm, initialized with sufficient entropy.
Fresh uncertainty measured from a physical process.
- Classical physical sources
- For example, thermal noise or oscillator timing variations.
- Quantum physical sources / QRNGs
- A subset of physical sources. iQrypto uses electron shot noise in silicon, without a light source.
Physical entropy can seed and reseed a cryptographic DRBG. The source and the algorithm have complementary roles.
How a noisy measurement becomes a useful bit
Suppose a sensor produces one million samples every second. Is that one million random bits? Not necessarily. If some samples are biased or correlated, an attacker may be able to guess them more easily than the raw data rate suggests.
This is why entropy sources need to be characterized. One useful measure is min-entropy, which considers the probability of the easiest-to-guess outcome. Designers also use health tests to watch for abnormal behaviour and conditioning methods to concentrate assessed entropy into a shorter output. None of those steps can manufacture entropy that wasn’t present to begin with. 11
- Physical noise sourceMeasure a process with an understood source of uncertainty.
- Sampling and digitizationTurn measurements into raw digital samples. Samples per second are not entropy bits per second.
- Assessment and health testsEstimate the available entropy and monitor for failures. Tests do not create entropy.
- ConditioningConcentrate the assessed entropy into an output of a suitable length. Conditioning cannot add entropy.
Use it within an appropriate random-bit-generator construction, or seed/reseed a cryptographic DRBG for application output.
Optional DRBG: expands its protected state into output bits; a higher output rate is not a higher rate of fresh physical entropy.
The conditioned output can then seed or reseed a DRBG, which supplies output within its design limits and security requirements. Some architectures use conditioned physical output more directly. Either way, the physical source and the cryptographic algorithm usually have different, complementary jobs.
NIST’s SP 800-90 family makes this division clear. 90A covers deterministic generators; 90B addresses entropy sources, assessment and health tests; and 90C, finalized in September 2025, brings those pieces together into complete random-bit-generator constructions. 6 11 12
There is room for new designs at the physical-source end. For example, iQrypto’s published US patent application describes deliberately high-leakage semiconductor diodes and readout circuits that use variations in leakage current to derive random numbers. It is one approach to engineering entropy in silicon; the patent disclosure alone does not establish a particular product’s entropy rate, quantum contribution or certification. 13
What to ask about a random-number generator
The next time a service asks you to verify a code, remember that the code is only the part you see. Somewhere earlier in the process, the system needed to create a secret.
For anyone designing or evaluating security technology, a sensible place to start is to ask where that uncertainty came from, how it was measured and what happens if the source—or the software that uses it—doesn’t behave as expected.
Strong cryptography depends on getting that first step right, long before anyone sends a message or signs a transaction.
Evaluate quantum randomness in your design
For the iQrypto implementation, read how our silicon entropy cell works. To start with USB evaluation, explore VERA-Q, then compare USB, chip and entropy-cell IP integration paths.
VERA-Q is offered through shortlist access, in very limited quantities, with samples available on request. Tell us about your application and the questions you want to evaluate.
References
- WhatsApp Help Center, About security code change notifications .
- IETF, RFC 6238: TOTP: Time-Based One-Time Password Algorithm (2011).
- CoinDesk, How bitcoin cold wallets lost $70 million in an attack that never touched the devices (1 August 2026).
- TRM Labs, The Largest Hardware Wallet Exploit of 2026: Inside the USD 116 Million Coldcard Hack (5 August 2026; provisional estimate).
- Coinkite, Technical Deep Dive into the Entropy Issue (2026; manufacturer's technical account).
- NIST, SP 800-90A Rev. 1 (2015).
- Ma, X. et al., “Quantum random number generation,” npj Quantum Information (2016).
- Qi, B. et al., “High-speed quantum random number generation by measuring phase noise of a single-mode laser,” Optics Letters (2010).
- Gabriel, C. et al., “A generator for unique quantum random numbers based on vacuum states,” (2010).
- Zhou, H. et al., “Quantum Random-Number Generator Based on Tunneling Effects in a Si Diode,” Physical Review Applied (2019).
- NIST, SP 800-90B (2018).
- NIST, SP 800-90C (2025).
- iQrypto SRL, published US patent application US20230244449A1 (2023).