Firat University

Discussion

Started 3rd Mar, 2019

# Difference between TRNG or PRNG?

Hello all,

I have been wondering about differences between true random number generator and pseudo-random number generator.

In my system there are three main components; clock signal ,push button, and output (LED). When the button is pressed, the LED simultaneously represents the state of the clock signal and remains the last state while the button is released. For instance, I release my finger when the LED is 'ON' so, it is on until the next pushing and vice versa. let's say the period of the clock is relatively fast so human is not able to know whether the current state is 0 or 1.

However, I got be confused that is my system a TRNG or PRNG. First, i thought it is a TRNG because the randomness is only determined by human decision. Therefore in this case I may say the source of randomness is non-deterministic However, the second thought can be raised that what if the clock can also be considered as a source then the randomness is likely not random ( non-deterministic) anymore

Notably, the real system is much more complicated, for an ease of discussion i just briefly explain the principle of the system.

what do you think about this?

Thank you in advance

Korakot

## Most recent answer

thank you all for your fit back, it really helped a lot

## Popular replies (1)

Gujarat Arts and Science College, Ahmedabad, Gujarat, INDIA. (Government College, Pincode - 380006.)

Dear

**Korakot Boonyaphon****,**The

**difference between true random number generators**(TRNGs) and**pseudo**-**random number generators**(PRNGs) is that TRNGs use an unpredictable physical means to generate**numbers**(like atmospheric noise), and PRNGs use mathematical algorithms (completely computer-generated).**Pseudo-RNG's are sets of algorithms**(i.e. logical instructions for by a computer program) that utilize mathematical formulas to produce a certain sequence of numbers that will appear random, or at least will have the effect of randomness. Other

**RNG's use pre-calculated tables**instead of mathematical formulas, but either way table or formula, the objective is still the same.

A lot of research has been done (and is still ongoing) on RNG's insomuch that our modern algorithms used for Pseudo-RNG's produce number sequences that do exactly mimic truly random sequences. But that may be the outcome of today's research there is still room for improvement since the results of

**Pseudo-RNG's are really "pseudo".****Comparing the results of a Pseudo-RNG with that from a True-RN**G will prove useful. If you list down the results of a Pseudo-RNG mimicking dice rolls the numbers will really appear as if they are random. But statistical analysis will prove that the numbers produced by a Pseudo-RNG is not really random but is rather predetermined. Thus its results can be measured and standardized, and, we can say, controlled.

**True-RNG's behave differently**since the results are truly random and unpredictable. If we try to get a computer to produce a really random sequence of numbers then the computer must base its numbers on a naturally occurring physical phenomenon, which may include the radioactive decay of isotopes, static in the airwaves, and the waves of the sea. True-RNG's will not really be cost-efficient if you compare it to Pseudo-RNG's. True-RNG's will be subject to wear and tear since all things natural will really be subject to entropy. A Pseudo-RNG will not be subject to such physical phenomena.

**Another efficiency of a Pseudo-RNG**is that you

**can reproduce the same sequence of numbers**in another time by simply knowing the starting point of the sequence (thus it is also periodic and the sequence will repeat itself in due time). This better facilitates inspections done by casino control boards. But you can be sure that the sequence of numbers produced by a Pseudo-RNG, though periodic, the time to reproduce the same sequence will eventually take a really long time that unless you acquire the actual algorithms, the correct sequence will be very difficult (almost impossible) to crack.

**Many online casinos**have settled for

**Pseudo-RNG's**for

**its cost-efficiency, periodicity, and efficiency.**These are good reasons to choose this type of random number generator, though a

**True-RNG**will also have its

**own benefits as well.**

I hope I have answered your question.

With Best Wishes,

Samir G. Pandya

6 Recommendations

## All replies (13)

Gujarat Arts and Science College, Ahmedabad, Gujarat, INDIA. (Government College, Pincode - 380006.)

Dear

**Korakot Boonyaphon****,**The

**difference between true random number generators**(TRNGs) and**pseudo**-**random number generators**(PRNGs) is that TRNGs use an unpredictable physical means to generate**numbers**(like atmospheric noise), and PRNGs use mathematical algorithms (completely computer-generated).**Pseudo-RNG's are sets of algorithms**(i.e. logical instructions for by a computer program) that utilize mathematical formulas to produce a certain sequence of numbers that will appear random, or at least will have the effect of randomness. Other

**RNG's use pre-calculated tables**instead of mathematical formulas, but either way table or formula, the objective is still the same.

A lot of research has been done (and is still ongoing) on RNG's insomuch that our modern algorithms used for Pseudo-RNG's produce number sequences that do exactly mimic truly random sequences. But that may be the outcome of today's research there is still room for improvement since the results of

**Pseudo-RNG's are really "pseudo".****Comparing the results of a Pseudo-RNG with that from a True-RN**G will prove useful. If you list down the results of a Pseudo-RNG mimicking dice rolls the numbers will really appear as if they are random. But statistical analysis will prove that the numbers produced by a Pseudo-RNG is not really random but is rather predetermined. Thus its results can be measured and standardized, and, we can say, controlled.

**True-RNG's behave differently**since the results are truly random and unpredictable. If we try to get a computer to produce a really random sequence of numbers then the computer must base its numbers on a naturally occurring physical phenomenon, which may include the radioactive decay of isotopes, static in the airwaves, and the waves of the sea. True-RNG's will not really be cost-efficient if you compare it to Pseudo-RNG's. True-RNG's will be subject to wear and tear since all things natural will really be subject to entropy. A Pseudo-RNG will not be subject to such physical phenomena.

**Another efficiency of a Pseudo-RNG**is that you

**can reproduce the same sequence of numbers**in another time by simply knowing the starting point of the sequence (thus it is also periodic and the sequence will repeat itself in due time). This better facilitates inspections done by casino control boards. But you can be sure that the sequence of numbers produced by a Pseudo-RNG, though periodic, the time to reproduce the same sequence will eventually take a really long time that unless you acquire the actual algorithms, the correct sequence will be very difficult (almost impossible) to crack.

**Many online casinos**have settled for

**Pseudo-RNG's**for

**its cost-efficiency, periodicity, and efficiency.**These are good reasons to choose this type of random number generator, though a

**True-RNG**will also have its

**own benefits as well.**

I hope I have answered your question.

With Best Wishes,

Samir G. Pandya

6 Recommendations

Badji Mokhtar - Annaba University

Dear Korakot,

The difference between the true random number generator and the pseudo random number generator is that the TRNG uses unpredictable physical means to generate numbers such as atmospheric, photospheric, cosmological noise ... while the PRNG uses mathematical algorithms that are fully computer generated.

For more details and information about this subject, i suggest you to take a look at attached files on topic.

Best regards

1 Recommendation

Velammal Institute of Technology

pseudo random number generates a random number which is predicted by using a mathematical formula usually computer programs are pseudo random..

The randomness comes from the atmospheric noise,is referred as true random number generator which is better than the pseudo random number generator.

1 Recommendation

University of Havana

Dear Korakot Boonyaphon,
The two fundamental criteria to evaluate in the generator are:
1- The generated sequence is random ?.
Answering this question is not as simple a task as it seems, but there are numerous statistical tests of randomness that can tell you with confidence when it is not random.
If your generator is for cryptographic applications, it must also be unpredictable.
2- Is the output of your generator reproducible?
This is only possible if it was generated with some mathematical algorithm.
If you answered both questions positively, your generator is a PRNG.
If the output can be considered random but not reproducible, because it was obtained from physical elements, like what you mention then it is a TRNG.
If the output of your generator does not meet the randomness tests, your generator is not even random.

The choice of the minimum set of independent randomness tests that evaluate the greatest possible number of characteristics or patterns in succession is a research problem that deserves the most attention.

Conference Paper Correlation evaluation between the randomness tests of the T...

Best regards
C.M.legon

1 Recommendation

National polytechnic on cyber and crypto

In my point of view, there is a difference between PRNG and TRNG. TRNG or RNG is a random generator that generate a truly random sequence that uses one or some (combined) entropy sources, so that can not be controlled by people. In other words, the generation is conducted in non-deterministic way because only triggered by the entropy sources. The entropy sources used can based on hardware (noise, temperature, thermal, movement, etc) or based on software (mouse movements, key strokes, I/O buffer, System clock, file access, etc). Because the random sequences are generated in non deterministic way, then it can not be reproduced. Meanwhile the PRNG is a generator that produces pseudorandom sequences in deterministic way, because already based on a certain mathematical formulation. In the application, this type needs an input string as a seed with quietly short length such as 128 bits. For security sake it is recommended to use a random string. For detail you can find in books of Encyclopedia of Cryptography and Security by Henk C.A. van Tilborg or Cryptography Engineering by Bruce Schneier, et al.

Indian Veterinary Research Institute

Samir G Pandya , samir mai friend good point ;)

Firat University

good day! can some one please assist me with "

**Pseudo and Real Random Number Generators Testing**"

University of Havana

Dear Yusuf yau Ali

I recommend you consultar

"Statistical testing off cryptographic Randomness", en

University of Havana

Dear yusuf

The above tests measure only Randomness of output, necessary condition, but not enough

To evaluate the independence between the, outputs and inputs, of the algorithm, I recommend you consult :

Badji Mokhtar - Annaba University

Hi,

Please check those links and attached files on subject.

Best regards

2 Recommendations

## Similar questions and discussions

How do I use the NIST test suite to test the randomness of an RGB color image?

- Md Kutubuddin Sardar

I would like to use NIST test suite

**for Cryptographic Applications**on a color image to test whether the image is random or not.But I don't know how to do all these tests. I used some readymade python code of given on GitHub (https://github.com/GINARTeam/NIST-statistical-test), but didn't understand anything from there. Can anyone help me with this? I would like to get all the tests given below:

## Related Publications

Thesis (M. Eng.)--University of Louisville, 2004. Department of Computer Engineering and Computer Science. Vita. "May 2004." Includes bibliographical references (leaf [65]).

With this innovative text, the study-and teaching- of probability and random signals becomes simpler, more streamlined, and more effective. Its unique “textgraph” format makes it both student-friendly and instructor-friendly. Pages with a larger typeface form a concise text for basic topics and make ideal transparencies; pages with smaller type pro...

Thesis (M. Sc. C.S.)--University of New Brunswick, 1989. Includes bibliographical references.