Bias and Corruption Free Random Number Generation Through MPC

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.

Figure 1: RNG use cases are wide and varied

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.

Figure 2: Predictability issues in RNG

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.

Figure 3: Bias and corruption issues in RNG

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.

Figure 4: Generating unbiased RNG that is incorruptible

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 articlesdevelopment documentations or email us at build@partisiablockchain.com.

Surveys and the new Web3 data economy

Surveys and the new Web3 data economy

Your opinion matters. It matters so much that the global online data market estimate is to be over US$270 billion dollars, all focused around buying and selling of your data to the highest bidders. It is a very complex web of transactions that ferry your data from one place to another and many times, your data is used in ways you never realized could be used for. From Cambridge Analytics’ controversial use of data to TikTok’s alleged aggressive data harvesting, there is a large market for your information and how it is used is very unclear.

The current Web2 market for surveys is in the exchange of your data. This means your opinion is collected, filtered, analyzed, sold and bought. The data may be collected anonymously, or it may be tied to your identity. Either way, this data is collected and managed by a centralized system, which has control over the data they purchased. There is also the ever growing concern of bots and AI scripts that automate and duplicate fake data leading to data integrity issues.

Figure 1: Traditional survey

One of the ways a decentralized blockchain can help change the landscape of the survey market is through dissolving the centralized control problem. Because the data can be made public, and with no single point of control of the data, you can be sure that the data can reside on-chain and has no central ownership or control. However, this can create problems with privacy. All data is now public and this creates two issues.

  1. Privacy is lost. On a traditional blockchain, all information is public and is immutable. This means the data you entered in for a particular survey will be available for everyone to view,
  2. The data market is lost. Because the data is now publicly available, anyone can pull it for free and use it for their own purpose.

A unified public and private smart contract, like the one Partisia Blockchain supports, enables the best of both worlds and solves the two issues above, where you now have a decentralized blockchain that eliminates any controlling entity while still being able to privatize your data. Not only does this retain the data marketplace but redefines it in a way where the user now has control over the data.

Figure 2: Public versus private blockchain data records

The online survey industry is large and is continuously growing. And this is because surveys hold a lot of valuable data. As reviewed in our earlier article on privatized voting, we use multiparty computation (MPC) on the blockchain to hide your data on-chain, but still allow for computing of the data.

Figure 3: Privatized but computable survey data

While the private voting use case reviewed a very simple computation on who the winner of an election was, Partisia Blockchain’s programming language allows full algebraic equations to be used to calculate any number of computations using the hidden data. This means not only being able to compute on a single category, but also combine results of the computation from multiple categories.

Figure 4: Full support of various analysis using hidden data

This change in privacy of your survey data creates a new change in how the data marketplace can be viewed. By allowing the survey participants ownership of their data, but still allowing for the computation of it, the marketplace of the data has now shifted from buying and selling of your data to buying and selling of the “use of your data”. You now still hold ownership of the data and you are now selling the use of your data while still keeping your data private. This paradigm shift creates new opportunities for a different marketplace where you are not just selling your data one time, but rather allow for the possibility of both updating of the data in real time as well as being rewarded each time your data is used. And through privatized authentication, the data quality improves as well leading to better accurate analysis.

Figure 5: A new data economy through ownership of your data

For additional insights on this use case, we recommend viewing our Q&A session.

By creating a programming language that allows for developers to use MPC in a generic way, Partisia Blockchain 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 articlesdevelopment documentations or email us at build@partisiablockchain.com.

Secure voting through Partisia Blockchain

Secure voting through Partisia Blockchain

Voting is an integral part of the election process. It is important to have transparent and tamper-proof voting systems that can be trusted through no single centralized authority whether it is selecting your class president in high school, voting as a shareholder in a listed company or electing government officials.

Through the distributed ledger system, we have a way to ensure transparency where all votes can be logged in an immutable record system. Each voter is accounted for in the blockchain. When the vote is cast, both voter ID as well as who or what they voted for is also recorded in a permanent way. But what about the privacy of the individuals and whom they casted their votes for?

Figure 1: Traditional blockchain voting

This is one of many challenges Partisia Blockchain solves though the use of cryptography and mathematics. Through multiparty computation (MPC) technology, our solution shows verifiable proof of an accurate election without revealing any details about the voter. But how does this work?

Figure 2: Unified public and private voting

Multiparty computation is a technology created in the 1980s that allows computation of results while keeping their input private, enabling trust between mutually distrustful parties. In the voting example, we use shamir’s secret sharing to have the smart contract create a random line that intersects with the vote details that have been vectorized. In the example below, candidate 1 is represented by 0 and candidate 2 is represented by 1. Four random points are chosen from this line, and each point is sent to a separate MPC node for computation. Through these lines, we can compute on finding the winner without revealing who each person voted for.

Figure 3: Shamir’s secret sharing

For additional insights on this use case, come and watch our Q&A session we did on this topic.

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 a 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 smart contract examples or email our head of developer relations at bruce.ahn@partisiablockchain.com