Skip to content
Related Articles
Open in App
Not now

Related Articles

Project Idea | ( True Random Number Generator)

Improve Article
Save Article
  • Difficulty Level : Hard
  • Last Updated : 07 Jul, 2021
Improve Article
Save Article

Introduction 
 

Random numbers in computer science is used for cryptography, simulation, sampling, design and games. In the past the need for more and more randomness has increased. Developers seek for more and more randomness. This project is based on generating random numbers using simple programming on a local system.

Features 

The source of randomness available to a personal computer like laptops includes: 
 

  • The surrounding light and scene
  • The surrounding sound or noise
  • The TCP information for the network
  • The RTT of a specific network, dependent on the congestion of the network
  • System time
  • Scheduling delay over core or multicores

 

The projects aims to extract randomness from all these factors to generate random numbers. All these methods end up giving a list of different numbers, all these numbers are reduced to manageable forms using hash functions like CWChash, PJWhash and SHA1 hash. Also, all these methods takes some time, so using these process in an iteration can be a time taking process, hence the project use these for generating a true random seed and using algorithm known as Blum Blum Shub to generate a series of random number. Blum Blum Shub needs two large prime numbers for its execution. Here, the two prime numbers are generated by randomly choosing a random number and running them against series of Fermat Primality Test. (We take a random 50 digit number and run Fermat’s test 10 times with different 40 digits numbers)

Implementation 

https://github.com/adeepkit01/RNG 

Software Tools 

Though the whole project can be implemented in python, the above github repo uses different languages (Python, Java and C) based on their strengths. The implementation needs python libraries pyaudio, wave, cv2 and numpy 

This idea is contributed by Ankit Deepak. If you like GeeksforGeeks and would like to contribute, you can also write an article and mail your article to review-team@geeksforgeeks.org. See your article appearing on the GeeksforGeeks main page and help other Geeks.
 

My Personal Notes arrow_drop_up
Related Articles

Start Your Coding Journey Now!