# How Computers Generate Random Numbers

Hey There..! I’m (AsliSachin) Back after a long break 😊. So today we’ll discuss **How Computers Generate Random Numbers**. So now without wasting much time let’s get right on the main content.

Luck is not as random as you think!

Copied from social media 😂

## The Problem

Computers are specially and carefully programmed to eliminate randomness in results. They follow instructions blindly & are therefore completely predictable.

So, can computers generate **truly random numbers**?

## Categorization

There are two categories of random numbers:

**Pseudo-Random**Number (PRN)**True Random**Number (TRN)

They have quite different characteristics.

### PRN

**Pseudo-Random Numbers** are generated by using an **algorithm** so the results appear random, even though they **aren’t**.

For most applications, a Pseudo-Random Number is **sufficient**.

### TRN

**True Random numbers** are generated by observing some **outside data**, like mouse movements of the fan noise, which is not predictable. The results might be slightly biased but they are not generated by a **deterministic** algorithm.

## Comparison

Characteristic | PRN | TRN |

Efficiency | Excellent | Poor |

Determinism | Deterministic | Non- Deterministic |

Periodicity | Periodic | Aperiodic |

## Backdoor

Since much **cryptography** depends on a secure random number generator for the key, if a generator can be made **predictable**, it can be used as a backdoor by an attacker to **break** the encryption.

This is it for this post, I hope you got some new and amazing information by this. Share your thoughts using the comment box. See You Guys Soon. 🙏

**113**