One of the most basic functions within technology blockchain it is related to randomness or simply "random" as it is technically known. 

LBecause of its importance, it is quite simple: without randomness, there would be no asymmetric cryptography that makes possible the security scheme of the cryptocurrencies, . In fact, without randomness computers, Internet and even your mobile would be very different from what they are today, and quite possibly, they would also be insecure devices.

But how is this possible? By What is it How important is randomness in the digital world and cryptocurrencies? That and more you can find out below.

Beginnings of randomness in the digital world

Randomness has been used by mankind for a long time. From the throwing of dice, bones or card reading to know your future to other ritual uses. However, it was not until the Middle Ages (XNUMXth century), when randomness was formally studied.

In fact, one of the main uses of randomness was related to the study of the number pi and the random and infinite form of its decimal numbers. Mathematicians interested in this fact began to see how this phenomenon was repeated in other spaces.

But, in the early XNUMXth century, with the advent of mathematical foundations of probability and algorithmic foundations, the utility of randomness grew exponentially. For example, randomness is elementary for studies in physics, especially quantum physics. In computing, the use of randomness is elementary for the construction of algorithms, chips and, of course, cryptography, one of the basic technologies in the creation of the digital world and its security.

Randomness and its importance

Now, why is generating random numbers so important? What use does all this have in blockchain technology? Well, the truth is that generating a random number is something very common and necessary when it comes to computer security.

For example, every time you connect to a Web on the Internet using an HTTPS connection (Secure HTTP Connection), what happens is that your computer/mobile connects to the Web server and they exchange messages to create a secured connection between those two computers. That process is possible thanks to the use of random numbers and their implementation in the cryptography that protects our digital communications.

Of course, this is just one example of the importance of randomness in our digital world. Randomness is present in things as simple as your credit/debit card (creating the authentication tokens that authorize the expenses you make), the wireless connection of your mobile (2G, 3G and 5G connections use asymmetric cryptography).

Randomness in Blockchain

Now, being blockchain a digital technology designed to provide security to its users, randomness is present. We can see the use of randomness in blockchain in one of the basic points of this technology: cryptography, andbecause the asymmetric cryptography used by cryptocurrencies is built thanks to the use of random numbers. For example, when creating a key Bitcoin Using the ECDSA scheme and the secp256k1 curve, what a Bitcoin wallet does is pick a random number (a very large number) and use that number within this mathematical formulation:

y^2 = x^3 + ax + b

Ensuring that randomness is "chaotic and unique" enough is something that computers can do quite well. And at the same time, they can perform the necessary computation to solve this formulation in a very short time, giving us access to one of the most secure forms of cryptography known to date.

All this for one purpose: to create two keys (public and private) to manage our BTC securely in a trustless network and with the certainty that our BTC are protected by widely tested computational and mathematical principles.

The evolution of blockchain randomness

Of course, blockchain technology is also evolving and so is its use of randomness. Knowing that computers cannot represent a true random generator (chaos and order cannot coexist in the same algorithm), one of those evolutions of randomness in the blockchain is to use the same blockchain to ensure the generation of "random numbers" so that they can be used in different spaces.

Let's explain this a bit:

For computers it is almost impossible to represent true random numbers. A developer can create a random number generation algorithm. But this generator will follow established "parameters" (an algorithm), which in the end can be studied by mathematical and probabilistic means. This means that these random (or pseudo-random) number generation algorithms can be analyzed and broken, giving rise to the well-known random number generator attack.

With this in mind, many blockchain developers are looking to transform the data within these networks into randomness generators, which can be used in other applications.

But how is this possible? Well, some of these models are:

block hash

One of the means to achieve this is Block-hashing, in which hashes of blocks, transactions, or combinations thereof, are used as a source of randomness. Since the hash is deterministic, everyone will get the same result. A block, once added to the blockchain, will remain there forever, therefore everyone can verify the correctness of the generated numbers.

However, this method has a serious security problem: the hashes can be manipulated by miners. While this problem is small and detectable, within a secure random number generator it is intolerable. For this reason, this system is used very little.


Another possible way to generate randomness in the blockchain for third-party applications is through oracles. Projects like Provable, TWAP from Uniswap or Chainlink VRF, are just some examples of this system.

The operation is simple. These systems collect data from external sources, process it within their network, and generate a huge pool of random data. This data can then be used by users of the system. The best thing is that this system is not only decentralized, but uses a large number of random sources in parallel. Additionally, all this work is accompanied by a cryptographic test to verify the random data generated.

Undoubtedly, randomness plays a fundamental role in our digital world and in the blockchain. Thanks to it we can have means to communicate safely over the Internet. And, at the same time, it allows us to create technology that helps us improve this ability. Thus, blockchain becomes an example of what randomness allows us to achieve, and offers us tools to continue improving these systems on which our privacy and security depend in the digital world.