## Bias and Corruption Free Random Number Generation Through MPC

Most may not know, but generating random numbers is hard. It is quite surprising because many people will think, “well, I can just come up with a random number off the top of my head!” However, randomly coming up with a number in your head, as well as other solutions to generate random numbers has fundamental flaws. And this is a big problem. Generating a fair unbiased random number is critical. In fact, random number generators are used everywhere.

The first place many would think of random numbers being useful is in games of chance. But would you be surprised if you knew that reading this article required the use of a random number generator? The website hosting this article is protected by a cryptographic key, which relies on generating a random set of values to be used for the encryption key.

Generating numbers at random is difficult. At a high level, there are two main issues with generating random numbers: predictability and bias/corruption issues.

The predictability issue for RNG can be seen in both human- and machine-generated random numbers. For example, there is a famous problem called Benford’s Law that states any random number that someone thinks about has a 30% chance of starting with the number 1. When you want to have a chance of a number being generated to be equal in percentage, then this becomes a problem. If you use a computer program to generate random numbers, you are using a structured code. This means, after multiple iterations, someone can reverse engineer the numbers to find the pattern and predict what the next number could be, especially if the code being used is weak.

From a bias and corruption perspective, the current systems can also be gamed to give favor to someone. For instance, if a set group of people decide they will choose random numbers and run through some function to compute a random number, one person may withhold showing their number until they see what the other people have chosen. Then, once he knows the numbers of the other participants, he can choose a number that would compute the random number to his favor. From a machine generated random numbers, since most systems have a central system that is generating the numbers, anyone who has control of that system could also manipulate the numbers being generated to their favor.

So how can we create a system where it is both unpredictable and bias free? Through MPC and Partisia Blockchain, we can solve both problems. Through smart contracts, players in the system generate a random number. This random number is then privatized and sent into the PBC blockchain. A zero-knowledge computation is done, in a similar way as done through secret sharing and through a computation, a random number is revealed.

Through combining multiple players and secret sharing, developers can create a system to come up with a random number that is free from bias, incorruptible and impossible to predict. And Partisia Blockchain’s smart contract language will afford developers to customize this solution to their specific requirements.

By creating a programming language that allows for developers to use MPC in a generic way, Partisia Blockchain Foundation has made the creation of applications that can harness the power of MPC for different use cases a possibility. Partisia has been at the forefront of providing private MPC solutions since 2008. And by layering this technology on top of an interoperable and scalable blockchain, Partisia Blockchain is now paving the way for anyone to create solutions that can balance privacy and transparency to build trust.

To learn more about different use cases or partner with us for solutions, please visit partisiablockchain.com, check out our Medium articles, development documentations or email us at build@partisiablockchain.com.