concept random number in category cryptography

This is an excerpt from Manning's book Real-World Cryptography.
SHAKE, specified in FIPS 202 along with SHA-3, can be seen as the same black box as a hash function for the distinction that it returns an output of an arbitrary length. It is up to you to choose how long you want it to be. SHAKE is fundamentally the same construction as SHA-3, except that it is faster and permutes as much as you want it to permute in the squeezing phase. Producing outputs of different sizes is very useful, not only to create a digest, but also to create random numbers, derive keys, and so on. I will talk about the different applications of SHAKE again in this book, for now just imagine that SHAKE is like SHA-3 except that it provides an output of any length you might want.
Figure 8.1. Randomness in practice is often ignored and abstracted by cryptography as a black box that magically provides random numbers for us. This chapter will teach you where this randomness comes from in practice and how you can obtain it.
![]()
Everyone understands the concept of randomness to some degree. Whether playing with dice or buying some lottery tickets, we’ve all been exposed to it. My first encounter with randomness was at a very young age, when I realized that a "RAND" button on my calculator would produce a different number every time I would press it. This troubled me to no end. I had very little knowledge about electronics, but I thought I could understand some of its limitations. When I added 4 and 5 together, surely some circuits would do the math and give me the result. But a random button? Where were the random numbers coming from? I couldn’t wrap my head around it. It took me some time to ask the right questions and understand that calculators actually cheated! They would hardcode large lists of "random" numbers and go through them one by one. These lists would exhibit good "randomness" property meaning that if you counted, you would realize that they would contain as many 1s as 9s and so on, what we call a uniform distribution.