Randomness For Computers
Randomness is very useful for various things in computing. Trying to get a better random value is critical depending on use case.
Use Case
There are many circumstances where randomness is useful. A lot of the time, users don’t see that it is being used so they can’t see how important it is.
- Simulate various physical, chemical and biological phenomenon that are typically random.
- Machine learning
- Cryptography and several algorithm design techniques
Why Does It Matter?
If a random number generator can be made predictable, it can be used as a backdoor by an attacker. This can be done with Dual Elliptic Curve Deterministic Random Bit Generator, Intel’s RDRAND hardware RNG and rigging a U.S lottery draw.
Trying to get to true random is something that can’t be done. Besides, it is more a question of philosophy. Getting to a point where something is very random is good enough for the applications where we want randomness.
Generating A Random Number
The better method is to measure physical phenomenon that we think is fairly random and compensate for some biases in measuring. This can include measuring atmospheric noise, thermal noise, and other external electromagnetic and quantum phenomena. Generating random numbers in this way isn’t very convenient in some circumstances. A nice example is with cloudflare and their lavalamps.
The other method is with computational algorithms that produce long sequences of apparently random results which are determined by a shorter initial value, known as a seed value or key. The randomness is determined by many different things that are occurring on your machine to increase entropy. An important one is yarrow algorithm.