How Random Number Generators Work

Random number generators are far more common in our everyday lives than you might think and understanding just how they work can help us to understand why they’re so common. From the world of cryptography, to some of our much-loved video games, the generation of random numbers can, and already does alter the way we play, work and live so it’s only right that we know just how random these random numbers actually are. Here, we’re exploring the two types of random numbers, what they can be used for, and how generators work.

The Two Types Of Random Numbers

Depending on how it is generated, there are two categories in which we can put the results of this generator – True, and Pseudo random numbers. While both are certainly random, the differences definitely shouldn’t be ignored, but what are those differences?

True Random Numbers

True Random numbers are generated when a computer measures a form of physical phenomenon that takes places away from the computer. In other words, a true random number takes from events that couldn’t possibly be predicted to ensure that a hacker/attacker has no way of guessing or working out just what the random value is because it’s impossible to do so.

Computers could look to atmospheric noise, atomic decay or another unpredictable event that is impossible to predict, and then join this to your typing or clicking. With two events that a hacker could never predict down to the millisecond, you’ll be generating a truly random value and number.

Pseudo-Random Numbers

The alternative to True Random numbers is Pseudo-Random numbers. In this case, the numbers are generated using the computer alone, where a seed-value or an algorithm can be used. However, because of this algorithm and seed value, these numbers aren’t actually completely random, and could be predicted. There’s no external information gathered, and so there is no non-predictable factor to protect the numbers.

If you were playing a video game, however, a pseudo-random number generator is probably going to be sufficient. After all, if the generator is just going to tell you which way a story goes, then it’s unlikely that excess security is needed. However, there are cases where pseudo-random number generators just aren’t enough. Online casinos that use pRNGs are at risk of players working out the algorithms and essentially ‘hacking’ the gameplay, and so most will use a True Random generator where possible to improve the volatility involved. Similarly, if you’re looking to create an encryption key then a True Random generator would be more effective simply because hackers can work backwards from the key to find the algorithm otherwise.

What Can They Be Used For?

When you really think about it, random number generating has been around for centuries. Whether you flipped a coin or rolled a dice, you would’ve still been doing so to generate a random answer. Now that we have technology at our fingertips, however, random number generation has taken on a whole new lease of life. From simple sites such as that allow us to pick randomly from a list, to the developments in artificial intelligence that can utilise RNGs to a whole new level. However, most commonly we tend to see random number generators in everything from, as we mentioned before, video games to cryptography.

In an increasingly digital world, ensuring the security of our data has never been more important and as a result, the generation of random, completely unpredictable content is a must. Having numbers that hackers can’t guess and certainly can’t work out within our encryptions can ensure that all of our data is kept entirely safe from prying eyes. Whether encrypting your own files, or building a website, pRNGs unfortunately just aren’t quite enough.

However, within video games, RNGs don’t need to be entirely secure to be useful. Gaming, and specifically the use of mobile devices in order to game, is becoming much more widely available. Of course, there are plenty of smartphones to choose from, and with Intel having recently announced it’s collaboration with Dell, HP, Lenovo and Microsoft to bring 5G to PCs by 2019, access to our favourite games is improving every day. RNGs within these games, however, are adding new levels of play for us to enjoy. Random number generators within games are what allows each players experience to be different, from the runs, jumps and rolls, to the storyline that the game will eventually follow.

Random number generators, whether True or Pseudo, are far more prominent in our everyday lives than we might initially think. From ensuring that our online data is kept secure and away from hackers, to altering our online gaming experiences whether video game or casino, RNGs are becoming a much more common utility in how we live. Where the influence of RNG could go in the future has yet to be seen, but with the ability to form completely random numbers and values, it could truly go anywhere.

About Author