Virtually everything that goes on in a computer requires generating random numbers. But the question is now, how do computers generate random numbers.

There are two categories of random numbers. The first is true random numbers and the second is pseudorandom numbers. Now, they are vastly different and it’s important you know them. Of course, the security of encryption systems depends on their Type of random number generated.

We should at least know what random is numbers all about and what we use them for before we move on to how computers generate them.

**Uses of Random Numbers: what is the need?**

The aim of random numbers is to leave you with multiple end results, either in rolling a dice or flipping a coin. This is what makes everything about video games and gambling. Above all, random generators in a computer are similar and they have an aim to produce random results that cannot be predicted.

Random number generators solve a lot of purpose in a computer. For example, random number generators are needed for applications like gambling, cryptography. Thus, it is clear that during gambling a whole lot of unpredictable numbers are needed. Hence, it forms used in gambling or gaming.

On the other hand, cryptography is something that is encoded with random numbers. Thus, attackers won’t be able to break through due to the random numbers generated. Hence, this will help to reduce the use of similar numbers over and over again. When the computer generates these random numbers, it will provide protection from attackers.

Basically, random numbers are important as long as encryption is involved. We need random number generators both in encrypting files and HTTPS websites,

**Types of Random Numbers **

There are two basic types of random numbers. The first is the True random numbers and the second, the pseudorandom numbers.

**True Numbers **

How computers generate a random number is a result of code. So, you would be able to predict an end result. Based on how a computer generates random numbers, that is how we came up with the two types of groups. So, the true number takes care of what happens outside the computer. Thus, its speed is like a chemical reaction.

However, it can make use of external execution to correspond a random number. So, it makes it hard for an attacker to detect what you pressed because he can’t tell the time range at which you did so.

**Pseudorandom Numbers **

This is just an alternative to true random numbers because it is not as strong as true random numbers. At this point, a computer can use a seed value and an algorithm to generate numbers that seem to be random but then, you can predict it.

Here, there is no room to gather any random data from the environment. This may not be a good idea for encryption. Thus, if an attacker is vast, they could work and determine the pseudorandom number the encryption algorithm chose.

Social Media: Wikipedia