Generation of random numbers from the text found in tweets

University essay from KTH/Skolan för elektroteknik och datavetenskap (EECS)

Author: Lukas Gutenberg; Emil Olin; [2020]

Keywords: ;

Abstract: Random numbers are integral to many areas of computer science, it is used in everything from video games to encryption of important messages and simulations. These numbers are often generated by mathematical algorithms and it is highly important for these generators to generate numbers that are truly random and unpredictable, as patterns, cycles or other discrepancies might at worst cause serious security flaws that can be exploited. Random numbers can also be generated with the aid of a source of entropy, for this report the source used was the text found on the social media site Twitter to see if text is a good source of randomness. A data analysis on a sample of the text was made that showed some inherent structure in the text that could be removed to improve the randomness. Multiple generators were then made to further analyse the behaviour of the text and to find possible implementations for a good random number generator. We found that generators that only took the characters one by one to build a random number did not produce random enough numbers so some kind of a transformation involving multiple characters was necessary. The type of generator that performed the best was an implementation of a linear congruential method random number generator where the additive part varied with input from the text. This generator performed, in the randomness testing, comparably to an implementation of Mersenne Twister showing that with the right implementation it is possible to generate good random numbers from the text found on social media. The limiting factors are that the generation of the random numbers is dependent on the speed at which it is possible to access new data and a security risk from the potential to tamper with the data sent to the generator.

  AT THIS PAGE YOU CAN DOWNLOAD THE WHOLE ESSAY. (follow the link to the next page)