Random Number Generators in ARM

This was a course project for EE2016: Microprocessors in Fall 2019. It was a group project, with 8 members in the group.

Random numbers play an important role in today’s world - having applications in most of the 20th century’s breakthrough technologies like cryptography, security etc.

However, not all “random” numbers are “truly random”, i.e., any sequence of random numbers that are generated purely through a software algorithm is always deterministic. In fact, the problem of generating a truly random number entirely through a software algorithm is a NP-complete problem.

How do we generate true random numbers then? We use a hardware entropy source, like a temperature sensor, from which we can extract the LSBs of the ADC value, which will change very rapidly. This change is non-deterministic, thus making the numbers generated from this truly random.

However, due to limitations posed by the lab equipment we have used (which are discussed in the report), we have generated random numbers using built-in functions in C. We have alsoimplemented our own Pseudo-Random Number Generator, using a 32-bit LFSR (LinearFeedback Shift Register). We then compare the 2 generators using the Kullback–Leibler measure on our PC.

We also prove that as the size of the samples increase, the variance of the sample mean estimator decreases, which is a theorem in statistics.

Finally, using the Monte-Carlo method, we estimate the value of $\pi$.