Open In App

Project Idea | ( True Random Number Generator)

Last Updated : 07 Jul, 2021
Improve
Improve
Like Article
Like
Save
Share
Report

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
 


Like Article
Suggest improvement
Share your thoughts in the comments

Similar Reads