Abstract
The concept of randomness is quite abstract: what does random even mean, when can we describe a number as random, and what can random numbers be used for? Although we might have an intuition about such questions, the central role of random numbers in cryptography (e.g., as key material) demands care via more formal treatment.
This forms motivation for the chapter, whose goal is to provide answers in two main parts. First it explores metrics for differentiating between random versus non-random (or ”good” and ”bad” randomness); various simple experiments to generate and test random numbers provide practical evidence. It then introduces the concept of pseudo-randomness, which unlike real randomness can be generated by algorithms such as the Linear Congruential Generator (LCG).
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
Notes
- 1.
Using cat here is a bit awkward: we do so simply to show this example within the same BASH-based setting as the others. An easier way to create P.sh might of course be to use a text editor.
References
Wikipedia: Any key. http://en.wikipedia.org/wiki/Any_key
Wikipedia: Bayes theorem. http://en.wikipedia.org/wiki/Bayes’_theorem
Wikipedia: Coin flipping. http://en.wikipedia.org/wiki/Coin_flipping
Wikipedia: Data Encryption Standard (DES). http://en.wikipedia.org/wiki/Data_Encryption_Standard
Wikipedia: Gambler’s fallacy. http://en.wikipedia.org/wiki/Gambler’s_fallacy
Wikipedia: Geiger counter. http://en.wikipedia.org/wiki/Geiger_counter
Wikipedia: Kolmogorov randomness. http://en.wikipedia.org/wiki/Kolmogorov_randomness
Wikipedia: Linear Congruence Generator (LCG). http://en.wikipedia.org/wiki/Linear_congruence_generator
Wikipedia: Magic number. http://en.wikipedia.org/wiki/Magic_number_(programming)
Wikipedia: National lottery. http://en.wikipedia.org/wiki/National_Lottery
Wikipedia: “Nothing up my sleeve” number. http://en.wikipedia.org/wiki/Nothing_up_my_sleeve_number
Wikipedia: Press Your Luck. http://en.wikipedia.org/wiki/Press_Your_Luck
Wikipedia: Pseudo-randomness. http://en.wikipedia.org/wiki/Pseudo_random
Wikipedia: Randomness. http://en.wikipedia.org/wiki/Randomness
Wikipedia: Script. http://en.wikipedia.org/wiki/Script_(computing)
Wikipedia: Statistical randomness. http://en.wikipedia.org/wiki/Statistical_randomness
Wikipedia: /dev/random. http://en.wikipedia.org/wiki//dev/random
Author information
Authors and Affiliations
Rights and permissions
Copyright information
© 2014 Springer International Publishing Switzerland
About this chapter
Cite this chapter
Page, D., Smart, N. (2014). Generation and Testing of Random Numbers. In: What Is Computer Science?. Undergraduate Topics in Computer Science. Springer, Cham. https://doi.org/10.1007/978-3-319-04042-4_7
Download citation
DOI: https://doi.org/10.1007/978-3-319-04042-4_7
Publisher Name: Springer, Cham
Print ISBN: 978-3-319-04041-7
Online ISBN: 978-3-319-04042-4
eBook Packages: Computer ScienceComputer Science (R0)