You are on page 1of 26

RANDOM NUMBER GENERATORS

A Technical Seminar Submitted

by

K. Muni Sai Kumar


IV B. Tech II Sem
RoLL.No:172P1A0538

Chaitanya Bharathi Institute of


Technology
VIDYA NAGAR, PRODDATUR, Y.S.R.(DIST). A.P.-516360.
(Sponsored by Bharathi Educational Society)
Recognized by UGC under Section 2(f) & 12(B) and Accredited with NBA & NAAC

Approved by AICTE, New Delhi and Affiliated to JNTUA, Anantapuramu.

1
CHAITANYA BHARATHI INSTITUTE OF TECHNOLOGY
Vidyanagar, Proddatur, Y S R District - 516362

DEPARTMENT OF COMPUTER SCIENCE & ENGINEERING

CERTIFICATE

This is to certify that the Technical Seminar entitled “RANDOM NUMBER


GENERATORS” is submitted by K. MUNI SAI KUMAR, IV B.Tech II Sem,

Roll.No:172P1A0538 in partial fulfillment of the requirements for the award of


BTech Degree in Computer Science & Engineering of JAWAHARLAL NEHRU
TECHNOLOGICAL UNIVERSITY, ANANTAPUR, during the year 2021-2022.

Seminar Incharge Head of the Department

C. Nancy MTech G.Sreenivasa Reddy MTech

2
3
ACKNOWLEDGEMENT

It gives me a great sense of pleasure to present the BTech seminar report undertaken
during B. Tech. 4th Year.

I am very grateful to Prof. G. Sreenivasa Reddy, Head of the Department, for giving
me a chance to present this seminar.

I also do not like to miss the opportunity to acknowledge the contribution of all
dignitary Staff-members of Chaithanya Bharathi Institute of Technology for their kind
assistance and cooperation during the development of my Seminar report. Last but not the
least, I acknowledge my friends for their contribution in the completion of the seminar report.

Apart from the efforts of me, the success of this project depends largely on the
encouragement and guidelines of many others. I take this opportunity to express my gratitude
to the people who have been instrumental in the successful completion of this report.

4
ABSTRACT
 Random Number Generators (RNGs) are an important building block for
algorithms and protocols in cryptography. They are paramount in the construction of encryption keys
and other cryptographic algorithm parameters. a new class of random-number generators is described,
based on a combination of the logical exclusive-or operation and the McLaren-Marsaglia mechanism.
It is suitable for any word length, requires no multiple-precision arithmetic, and contains no hard-to-
determine constants. Though no theory is available, numerical tests have shown it to be very
satisfactory. Execution time is less than twice that of standard congruential generators. Random
number generators (RNG) are essential components for security system. RNGs are used in sensitive
applications such as key generation and challenge-response based authentication. The most important
and difficult part of any cryptographic system is to generate secret keys of high randomness quality. 

5
CONTENT
CHAPTER TITLE PAGE NO

1. INTRODUCTION 6
2. RELATED WORK 7-14
2.1 Generation
2.2 Working Through Algorithms
2.3 Working Through Chips
3. RANDOM NUMBER GENERATORS 15-19
3.1 Types of RNG’s
3.2 Characteristics of RNG’s
4. ANALYSIS AND APPLICATIONS 20-22
5. ADVANTAGES AND DISADVANTAGES 23
6. CONCLUSION 24
7. REFERENCES 25

6
CHAPTER 1
INTRODUCTION
A random number generator is a system that generates random numbers from a
true source of randomness. Often something physical, such as a Geiger counter, where the results are
turned into random numbers. Random Number Generators (or RNG's), what they are, and what they
do are key pieces of information that we all should know next time we scope out the game machines
in our favourite online casinos or whenever we play our games online. Misconceptions about RNG's
have led to myths on just about every game machine played in a casino.

When you look at a casino gaming machine, be it slots, video poker, or any other
thing you really like, what you have in front of you is simply something much like the computer
system you have at home. Your gaming machine will have a video screen, some buttons (or a lever)
you can press and play your game. The only difference is that the casino gaming machines are
designed for only one specific purpose - We're familiar with using our computers to check our e-mail,
surf the net, and write letters and papers for work. The gaming machine works like that, only that it
executes your game instead of working all those functions. Along with running your favourite casino
game, the gambling machines also an RNG.

The RNG is the part of the gambling machine's system responsible for generating the
combinations you see on the screen. It does this function as if in perpetuity even if the gaming
machine is on standby with no one playing it. It just keeps creating random sets of numbers within the
range of zero to approximately four billion. The outcome of this operation is used to select which
cards or symbols on the screen to display. the RNG uses a series of instructions and a mathematical
formula to generate the random numbers. The math behind it is not your average arithmetic but both
the mathematical formula and the set of instructions can and are tested to comply with standards of
fairness. Your casino gaming machines (and the games you play on Internet casinos) undergo routine
testing by Casino Control Boards or an independent technical system testing company. Unless you're
a really powerful psychic, then your answer is no. There have been so called slot systems that have
been claimed to give 100% profit but if one understands how an RNG works then we can honestly say
that these are just a hoax.

RNG's have brought us a new dimension of gaming since we can now design gaming
machines without the limit of the physical size the machine. We are now able to produce games that
have more bonuses, progressive jackpots that pile up to millions, and other fabulous winning
opportunities. Random number generators are the hearts of our modern gaming machines. The next
time you face a casino gaming machine you know what makes it tick.

7
CHAPTER-2
RELATED WORK
The modern, technological world we now live in is powered by numbers. Whether it
is the binary digits of ones and zeroes that are used by the central processing units of PCs and laptops,
or the complex codes used to encrypt data sent and received across the planet’s internet infrastructure,
numbers are an incredibly important part of our lives that often go overlooked.

Random number generators, or RNGs, are an integral part of most computer systems,
networks, and software, so much so that the microprocessor companies like Intel and AMD often
produce dedicated RNG chips for their systems in order to help computer systems deal with the
demand for randomly generated numbers for encryption and data processing.

But how do random number generators work, and what are they used for? Here we
are going to take a closer look at this important little-understood yet important part of the devices,
networks, and systems that we all use every day.

Fig: Random Number Generators in Digital Computer


The modern, technological world we now live in is powered by numbers. Whether it
is the binary digits of ones and zeroes that are used by the central processing units of PCs and laptops,
or the complex codes used to encrypt data sent and received across the planet’s internet infrastructure,
numbers are an incredibly important part of our lives that often go overlooked.

Random number generators, or RNGs, are an integral part of most computer systems,
networks, and software, so much so that the microprocessor companies like Intel and AMD often
produce dedicated RNG chips for their systems in order to help computer systems deal with the
demand for randomly generated numbers for encryption and data processing.

8
But how do random number generators work, and what are they used for? Here we
are going to take a closer look at this important little-understood yet important part of the devices,
networks, and systems that we all use every day.

Random Number Generation has a Long History

The demand for random number generators goes back long before the advent of
modern technology, as far back as the ancient Babylonian civilization that used random numbers for
lotteries. Gambling and lotteries have used some form of random number generator to create a
random number completely by chance. The most basic form of an RNG is probably a dice. Rolling a
dice gives you a result that has been generated by chance, and people have been betting on these
results for millennia.

As our civilizations have become more sophisticated, so have random number


generators, leading to the creation of complex RNGs that can generate long strings of numbers for
use in gaming, gambling, and even high-level data encryption.

There are two basic methods for generating random numbers: physical methods such
as rolling a dice; and ‘pseudorandom’ methods that rely on complex computer algorithms to generate
numbers. Both methods can involve very complicated processes. Physical random number generation
may use the decay of radioactive elements or cosmic background radiation to generate numbers
outside of a computer. These methods are incredibly expensive and sometimes pose a danger to
operators and are used primarily by militaries, governments, and some large corporations.

The most common form of RNG is a pseudorandom number generator that relies
upon complex computer algorithms and numbers known as seeds or key values to produce seemingly,
or pseudo, random numbers. The numbers produced will seem to the observer to be entirely random,
yet the use of seed numbers or key values and algorithms can also be used to reproduce this exact
number.

9
2.1 Generation:
People have been using random numbers for millennia, so the concept isn't new.
From the lottery in ancient Babylon, to roulette tables in Monte Carlo, to dice games in Vegas, the
goal is to leave the end result up to random chance. but gambling aside,  randomness has many uses
in science, statistics, cryptography and more. Yet using dice, coins, or similar media as a random
device has its limitations. because of the mechanical nature of these techniques, generating large
quantities of random numbers requires great deal of time and work. Thanks to human ingenuity, we
have more powerful tools and methods at our disposal.
Random number generation is a process which, often by means of a random number
generator, generates a sequence of numbers or symbols that cannot be reasonably predicted well
than by a random chance. Random number generators can be truly random hardware random-
number generators, which generate random numbers as a function of current value of some physical
environment attribute that is constantly changing in a manner that is practically impossible to model,
or pseudorandom number generators.
Various applications of randomness have led to the development of several different
methods for generating random data, of which some have existed since ancient times, among whose
ranks are well-known "classic" examples, including the rolling of dice, coin-flipping,
the shuffling of playing cards, the use of yarrow stalks (for divination) in the I Ching, as well as
countless other techniques. Because of the mechanical nature of these techniques, generating large
quantities of sufficiently random numbers (important in statistics) required much work and time.
Thus, results would sometimes be collected and distributed as random number tables.
Several computational methods for pseudorandom number generation exist. All fall
short of the goal of true randomness, although they may meet, with varying success, some of
the statistical tests for randomness intended to measure how unpredictable their results are (that is, to
what degree their patterns are discernible). This generally makes them unusable for applications such
as cryptography. However, carefully designed cryptographically secure pseudorandom number
generators (CSPRNGS) also exist, with special features specifically designed for use in
cryptography.

2.2Working through Algorithms:


Most random number generation doesn't necessarily use complicated algorithms, but
just uses some carefully chosen numbers and then some arithmetic tricks. A computer executes code
that is based on a set of rules to be followed. For PRNGs in general, those rules revolve around the
following:
1. Accept some initial input number, which is a seed or key.

10
2. Apply that seed in a sequence of mathematical operations to generate the result. That result is
the random number.
3. Use that resulting random number as the seed for the next iteration.
4. Repeat the process to emulate randomness.
Now let's look at an example.

The Linear Congruential Generator


This generator produces a series of pseudorandom numbers. Given an initial seed X0 and
integer parameters a as the multiplier, b as the increment, and m as the modulus, the generator is
defined by the linear relation: Xn ≡ (aXn-1 + b) mod m. Or using more programming friendly
syntax: Xn = (a * Xn-1 + b) % m.
Each of these members have to satisfy the following conditions:

 m > 0 (the modulus is positive),


 0 < a < m (the multiplier is positive but less than the modulus),
 0 ≤ b < m (the increment is non negative but less than the modulus), and
 0 ≤ X0 < m (the seed is non negative but less than the modulus).
The Linear Congruential Generator is one of the oldest and best-known PRNG
algorithms.

As for random number generator algorithms that are executable by computers, they date back
as early as the 1940s and 50s (the Middle-square method and Lehmer generator, for example) and
continue to be written today (Xoroshiro128+, Squares RNG, and more).
Let's create a JavaScript function that takes the initial values as arguments and
returns an array of random numbers of a given length:

// x0=seed; a=multiplier; b=increment; m=modulus; n=desired array length;


const linearRandomGenerator = (x0, a, b, m, n) => {
const results = []
for (let i = 0; i < n; i++) {
x0 = (a * x0 + b) % m
results. push(x0)
}
return results
}

Middle Square Algorithm

11
In mathematics, the middle-square method is a method of generating
pseudorandom numbers. In practice it is not a good method, since its period is usually very
short and it has some severe weaknesses; repeated enough times, the middle-square method
will either begin repeatedly generating the same number or cycle to a previous number in the
sequence and loop indefinitely.
if the value of n is odd then there will not necessarily be a uniquely defined
'middle n-digits' to select from. Consider the following: If a 3-digit number is squared it can yield a
6-digit number (eg: 5402 = 291600). If there were to be a middle three digit that would leave 6 − 3
= 3 digits to be distributed to the left and right of the middle. It is impossible to evenly distribute
these digits equally on both sides of the middle number and therefore there are no 'middle digits.'
It is acceptable to pad the seeds with zeros to the left in order to create an even valued n-digit
(e.g.: 540 → 0540).

Example implementation

Here, the algorithm is rendered in Python 3.


seed_number = int (input ("Please enter a four-digitnumber:\n [####] "))
number = seed_number
alreadyseen = set ()
counter = 0
while number not in already_seen:
counter += 1
already_seen. Add(number)
number = int (str (number * number). zfill (8) [2:6]) # zfill adds padding of zeroes
print(f"#{counter}: {number}")
print (f"We began with {seed_number}, and"
f" have repeated ourselves after {counter} steps"
f" with {number}.")

2.3 Working through chips:


A hardware random number generator is an electronic device that plugs into a
computer and produces genuine random numbers. This is in contrast to the pseudo-random numbers
produced by a random number computer program. Several hardware random number generators are
available from commercial sources. They are used for generating keys for encryption, winning
numbers for lotteries, selecting experimental designs and occasionally for statistical simulations.

12
Testing a hardware random generator differs from testing a pseudo-random number
generator. In particular, if one knows the design of the generator one can tailor the tests to be
appropriate for that design. The intended application may also be important when selecting the tests.
On the other hand, some of the tests used for pseudo-random number generators aren't very useful
when applied to hardware random number generators.

Your random number generator might pass the test but this does not necessarily mean that
the generator is good.
Or your generator might fail the test but this does not necessarily mean that the generator
is bad.
A hardware random number generator uses a physical phenomenon such as electrical
noise from a resistor or semiconductor diode or the decay of a radioactive material for the initial
source of randomness. The electronic circuitry of the generator converts this noise to bits and then
assembles these into bytes or words for use by the computer.

There may be philosophical question as to whether processes used to generate the


random noise are really random – as quantum theory suggests they are. Maybe we could calculate the
movements of the electrons in the resistor and so model the noise as a deterministic process. This, of
course, would impossible, because of huge number of electrons that would be involved even if the
processes were really deterministic. So even if God really doesn’t play dice, we can still regard the
process as genuinely random, for our purposes.
All the commercial hardware random number generators that I have examined use
resistor or semiconductor noise as the source of randomness. There is an Internet
site, http://www.fourmilab.ch/hotbits, from which you can download bits generated by radioactive
decay. I don’t know whether the generator is available commercially. In this paper I will look at just
generators using resistor or semiconductor noise. However, some of the principles discussed here will
also apply to radioactive generators.

13
Here is a picture of one of the commercial hardware random number generators
(from Protego in Sweden). This one plugs into the serial port of a computer. You can see the diode at
the right-hand end, which I presume is the noise generator. I presume that the rest of the circuitry is an
amplifier and limiter. This generator uses the computer’s serial port circuitry to digitize the random
noise.

Used for:

Key word generation in encryption

Generating winning numbers for lotteries

Experimental design

Statistical simulations

The major application is for encryption. One wants to generate a keyword that is hard
to guess and using a hardware random number generator is probably the most reliable way of doing
this. Hardware random number generators are also used for selecting winning numbers in lotteries. In
particular the New Zealand Lotteries Commission uses one for generating its Keno numbers.
Hardware random number generators are also used for designing for experiments on extra sensory
perception (ESP). One of the commercial generators was developed explicitly for this purpose. The
present-day hardware random number generators are really too slow for routine use in statistical
simulations although it might be very sensible to use them for cross-checking simulations using
pseudo-random number generators.

14
A hardware random number generator is different from a pseudo-random number generator,
which uses a formula for generating the numbers. so, we need a different approach to testing.
It is a physical device so analyses it like a physical device. then reasonably satisfactory tests are
possible. but we need to know about its internal structure.
Marsaglia has developed a series of statistical tests known as the Diehard
tests principally for testing pseudo-RNGs. In a certain sense, these do not constitute a formal test
since there are so many tests you must get some significant deviations. My approach is to run the
series of tests and look by eye for groups of significant deviations or for single extremely significant
deviations.
George Marsaglia released a CD-ROM of random numbers which included series
from 3 hardware generators. He claimed that none passed his Diehard tests. One of the hardware
generators was the Tundra/New bridge generator that I have tested extensively and the reason it
failed was a programming or data handling error. More about this later. But I think this may have
tended to discredit hardware generators.

Fig: Working Process of Chips

15
CHAPTER-3
RANDOM NUMBER GENERATORS
3.1 Types of RNG’s:

There are two types of Random Number Generators. They are:

o True Random Number Generators (Non-Deterministic Random Number Generators)

o Pseudo Random Number Generators (Deterministic Random Number Generators)

True Random Number Generators


The numbers generated by this type of device are not predictable by any
mathematical logic and mainly depend on the physical information like atmospheric noise. They are
also called as Non-Deterministic Random Numbers generated through hardware.TRNG generally
produce only a limited number of random bits per second. a TRNG is a device that generates random
numbers from a physical process, rather than by means of an algorithm. It is sometimes called as
Non-deterministic Random Bit Generator or Hardware Random Number Generators. It is Hardware
oriented method.
Pseudo Random Number Generators
The Random Numbers generated by this device is predictable as it uses mathematical
algorithms through software. They are also called as Deterministic Random Numbers.PRNGs
generate a sequence of numbers approximating the properties of random numbers. A PRNG starts
from an arbitrary starting state using a seed state. Many numbers are generated in a short time and can
also be reproduced later, if the starting point in the sequence is known. Hence, the numbers
are deterministic and efficient. It is sometimes called as Software Random Number or Deterministic
Random Bit Generator. It is software-oriented method.

Techniques for Generating Random Numbers


There are three techniques for generating Random Numbers. They are:
o Linear Congruential Method
o Combined Linear Congruential Generators
o Random Number Streams
Linear Congruential Method
These are the most widely used Random Number Generator in use today. This
method produces sequence of integers between 0 and m-1 according to the equation:

16
Where:
a = Multiplier
c = Increment
m = modulus
To generate Uniform Random Numbers, we use the equation:

According to Hull-Dobell theorem, Linear Congruential Generator whose cycle length is m, has full

period, if the conditions mentioned, holds good. They are:

o If q is a prime number, that divides m, then q divides a-1.

o The only positive integer that divides both m and c is 1.

o If 4 divides m, then it also divides a-1.

Combined Linear Congruential Generator

Some of the application systems require longer period length due to the increase in
complexity of the system. Hence two or more multiplicative congruential generators are combined to
achieve this. Let the nth output from k different multiplicative Congruential Generators be Xn1, Xn2,
……. Xnk.
Therefore, Xj is defined as:
Xn+1, j =(ajXn + cj) mod mj, Where;
mj = prime modulus
aj = multiplier
c = increment
Random Number Streams
Random Number Stream refers to the starting seed taken from the sequence X 0, X1 …….
Xp. and considering ‘b’ values apart and the Stream ‘i’ could be defined by starting seed i.e.
Si = X b(i – 1)
Seed is an integer value that initializes Random Number Sequence for a Generator. If the

RNG has k streams, then it acts like k distinct virtual RNG’s .

17
3.2Characteristics of RNG’s:
3.1 Distribution
Probably the most fundamental characteristic of a sequence of numbers is its distribution. The
PRNGs in the Thin Air library (with a few exceptions) produce uniformly distributed number
sequences. Other distributions include normal, Poisson, geometric, binomial, and student-t. Other
authors have published algorithms that convert uniformly distributed number sequences into other
distributions.
3.2 Range
Another fundamental characteristic of a random number sequence is its range. What is the
smallest number in the sequence? What is the largest? These two numbers define the range of the
whole sequence. The range of a sequence is more important and more subtle than most people realize.
If the range of a random number sequence is 0 to 64, it is useless for generating random percentages.
One good example of a bad range problem appears in some simple card games. In these examples, a
16-bit random number generator is used to choose a layout of a deck of cards. The problem lies in the
fact that the generator can produce at most 65,536 different numbers. A deck of cards can produce
80.66 * 1066 different layouts. If you are very careful in your use of the generator, this problem is
solvable. If not, most of the possible layouts never occur.
3.3 Type
Another useful characteristic of a random sequence is its type. What kind of numbers make up
this sequence? Are we talking about bits, integers, floating point numbers, strings, or something else
entirely? Most of these types can convert into each other relatively easily. In general, PRNGs fall into
three categories:
1. PRNGs that generate a sequence of integers.
2. PRNGs that generate a sequence of floating-point numbers between 0.0 and 1.0.
3. PRNGs that generate a stream of bits.
3.4 Period
All algorithm-based PRNGs repeat if they are allowed to run for long enough. This is caused
by the fact that the generator has a finite amount of internal state, and by the fact that an algorithm
cannot produce truly random output. Since we know the sequence must repeat, we would obviously
like to have it repeat after as long a time as possible. The number of individual numbers generated by
the PRNG before it begins to repeat is known as the period of the sequence. This sequence of
numbers is often called a cycle. The amount of internal state retained by a PRNG defines the upper
limit on the period. A PRNG with a period equal to the maximum predicted by its internal state is
sometimes called a maximal-period generator.
Depending on the algorithm used, a PRNG may actually generate more than one cycle. The
more individual cycles a generator has, the shorter the period each cycle has. The best generator

18
would, of course, have a single cycle that was longer than we could ever use (effectively infinite).
Some multiplicative congruential random number generators have two cycles, one being very long
(approximately 232-1 numbers in the sequence), the other being a cycle of period 1 at 0.
3.5 Coverage
The term coverage describes how well a given sequence covers its output range. For example,
a PRNG with an output range of 0 to 2 32-1 should generate every number between 0 and 2 32-1 if
allowed to run for long enough. Not all PRNGs cover their entire output range.
If a PRNG has multiple cycles, the coverage issue is even more interesting. The generator may
actually be capable of covering the whole range of output values. However, only certain values are
covered in each cycle. The multiplicative congruential PRNGs mentioned above have a maximum
coverage one less than expected in the main cycle. This is because an output of zero is never part of
the main cycle.
Many tests have been devised to study coverage. Two of these are the equidistribution,
or frequency, test and the gap test. The equidistributional test tries to verify that all of the numbers in
the sequence are equally likely. The gap test studies the probabilities of gaps of different sizes
between numbers in a particular range.
3.6 Runs
One interesting characteristic of a sequence of numbers concerns runs. When each successive
number in a subsequence is larger than the previous number, we have a run up. When each successive
number in a subsequence is smaller than the previous number, we have a run down. In a good random
sequence, we would expect the number of runs up to be pretty close to the number of runs down. We
would also expect that longer runs would be less likely than shorter runs.
3.7 Serial Correlation
A good sequence of random numbers should not have any correlation between successive
numbers. This means that you should not be able to predict the next number in the sequence by
looking at previous numbers. The classic example of serial correlation in a PRNG is the linear
congruential generator. When a linear congruential PRNG is used to generate pairs of numbers for use
as x, y coordinates on a graph, a pattern often shows up in the graph. The pairs of numbers tend to fall
on a set of parallel lines on the graph. This artifact is a simple result of the algorithm used.
One way to test for high serial correlation is the Poker test. The Poker test looks at the combinations
of five successive numbers taken from the sequence. These numbers are analysed for pairs, three-of-a-
kind, full house, etc. The probabilities of these combinations should approach that of a random
number stream.

19
3.8 Permutations
In a truly random number stream, any permutation of a set of numbers is as likely as any other
permutation of the same numbers. If one permutation of a set of numbers is more likely than another,
a few numbers in the set may supply enough information to help predict following numbers.
3.9 Spectral Characteristics
Even if a sequence of numbers does not exhibit any obvious patterns, it may have higher
order artifacts. A truly random sequence would have no particular frequency component more
pronounced than any other. Since any PRNGs must repeat after some length of time, there is at least
one dominant frequency component. Studying the spectral characteristics tells us if there are any
others.

20
CHAPTER 4
ANALYSIS AND APPLICATIONS
ANALYSIS:

Architecture of RNG
The system consists of modules namely:

o Sensor Module

o Generation Module

Fig. 3 – Architecture of Random Number Generator

Sensor Module

This module is responsible for capturing data. Sensor acquires the data and provides an

interface to transfer the collected information to the computer. The sensor converts physical

information such as noise (analogue) signal to digital signal.

Generation Module

In this module, the process of Post-processing happens where the data is binarized. This data is

transferred to output module.

21
Output Module
The output module accepts the binary data and stores it as a file. Random Number is generated using
this file and is displayed.

How does RNG Work

Let us consider RNG, that uses the randomness of Radioactive decay as an entropy source to

generate random numbers. According to Quantum Mechanics, the decay of atoms is random and

cannot be predicted. The System has PIC (Programmable Interface Controller) Microcontroller and

special type of counter called as Geiger Counter which detects ionizing radiation. Shift Registers are

used that act as RAM for the system.

Fig. 4 – Working of RNG


The entropy or the random event acts as input to the system. The counter detects the radiation

and is controlled by the Microcontroller. The Microcontroller rotates the numbers inside the Register

which is around 10,00,000 numbers per second. When the Microcontroller detects the random event

(Radioactive particle), it terminates the rotation of numbers, reads the current number and stores

in Shift Register.

Shift Registers act as RAM for the system. The Shift Register accepts the input and shifts for every

clock cycle and outputs the data on LCD via serial port. Thus, sequence of numbers is generated and

these numbers are known as Random Numbers.

22
APPLICATIONS:
Applications of Random Number Generator
The applications include:

o The Random numbers are widely used in Digital games.

o They are also used in Statistical Sampling.

o Used in Cryptography, computations in statistical physics.

o Widely used in casino games like Roulette wheel.

o Also used in Radio communications.

o RNG’s are used for numerical analysis.

23
CHAPTER-5

ADVANTAGES AND DISADVANTAGES

Advantages:
• Generating data encryption keys

• Selecting random samples from larger data sets

• Modelling complex phenomena

• Simulating complex phenomena

• Nonces (arbitrary single-use numbers often used in authentication and time-stamping)

• Salts (random inputs used in hash functions)

• One-time pads (single use encryption mechanisms)

Disadvantages:
• Time needed to gather the full list of a specific population

• capital necessary to retrieve and contact that list

• very difficult to achieve (i.e., time, effort and money)

24
CHAPTER-6

CONCLUSION

Random number generators are important in computing. TCP/IP sequence


numbers, TLS nonces, ASLR offsets, password salts, and DNS source port numbers all rely on
random numbers. In cryptography randomness is found everywhere, from the generation of keys to
encryption systems, even the way in which cryptosystems are attacked. Without randomness, all
crypto operations would be predictable and hence insecure. Random number generators are the
lifeline of any cryptographic operation in modern computing. It is important for developers to
understand what interface to use, and how to handle random numbers correctly in their code. It is also
important for users to understand the limitations of such code. This post provides a basic insight into
how random number generators actually work in Linux and what are their limitations.
Many theoretical and numerical tests are available, but none can ever prove that an
RNG is perfect. RNG is very important in IT industry; it is used in games, security, database, and a lot
more. RNGs improve the integrity and security of cryptographic applications.
The main idea about RNG is that it must generate a different value each time for
about at least 50% of the size of the value, and if it can reach up to more than 75% of the size then it
is very excellent program.

25
CHAPTER-7

REFERENCES

1.  Von Neumann, John (1951). "Various techniques used in connection with random


digits" (PDF). National Bureau of Standards Applied Mathematics Series. 12: 36–38.
2.  Some of von Neumann's 1949 papers were printed only in 1951. John von Neumann,
“Various techniques used in connection with random digits,” in A.S. Householder,
G.E. Forsythe, and H.H. Germond, eds., Monte Carlo Method, National Bureau of
Standards Applied Mathematics Series, vol. 12 (Washington, D.C.: U.S. Government
Printing Office, 1951): pp. 36-38.
3.  Lehmer, Derrick H. (1951). "Mathematical methods in large-scale computing
units". Proceedings of 2nd Symposium on Large-Scale Digital Calculating
Machinery: 141–146.
4.  Thomson, W. E. (1958). "A Modified Congruence Method of Generating Pseudo-
random Numbers". The Computer Journal. 1 (2): 83. doi:10.1093/comjnl/1.2.83.
5.  Rotenberg, A. (1960). "A New Pseudo-Random Number Generator". Journal of the
ACM. 7 (1): 75–77. doi:10.1145/321008.321019.
6.  D. E. Knuth, The Art of Computer Programming, Vol. 2 Seminumerical Algorithms,
3rd ed., Addison Wesley Longman (1998); See pag. 27.
7.  Tausworthe, R. C. (1965). "Random Numbers Generated by Linear Recurrence
Modulo Two" (PDF). Mathematics of Computation. 19 (90): 201–
209. doi:10.1090/S0025-5718-1965-0184406-1.
8.  Wichmann, Brian A.; Hill, David I. (1982). "Algorithm AS 183: An Efficient and
Portable Pseudo-Random Number Generator". Journal of the Royal Statistical
Society. Series C (Applied Statistics). 31 (2): 188–
190. doi:10.2307/2347988. JSTOR 2347988.
9.  "Microsoft Support - Description of the RAND function in Excel". Apr 17, 2018.
10. "Documentation » The Python Standard Library » 9. Numeric and Mathematical
Modules » 9.6. random — Generate pseudo-random numbers"

26

You might also like