Technology

Rock Paper Scissors

Trustless random choice generation

Ben Stokman
OneTwentyEight Blog

--

Or Paper Scisors Rock, whatever
Listen to the audio version

The most sophisticated and widespread method of trustless decision making is rock paper scissors.

The method is simple, each participant broadcasts their choice, either rock, paper, or scisors. If the participants tie, the game is done again; if not whoever’s choice beats the others wins.

There is still a problem with rock paper scissors: ties. There is a 1/3 chance of the participants tying. However, there is another, though less common, method of making random decisions: throwing fingers.

Throwing fingers is a method to decide who gets something, or has to do something, much like rock paper scissors, though there is no possibility that the two people can tie.

The method is very simple, the two parties involved agree on who is odd and who is even. The two parties then count up the total number of fingers that were thrown. If the number is odd; the person who called odd wins, and vice versa.

Though neither rock paper scissors no throwing fingers has compatibility for more than two participants. With throwing fingers, all you have to do is dictate that, for each participant, there shall be a number in which they will win, after the sum of the amount of fingers thrown is modulused by the amount of participants. Modulus is the remainder of a devision operation.

To duplicate this process digitally, most people would think that you would simply have each participant send their number to the others, though participant can see the other participants’ numbers, and then send their number; guaranteeing their win (or loss, it depends on what the decision is). The only way that throwing fingers works is reality is because no participant can create their number after they see the others’.

The way to fix this is math.

All trustless environments run on cryptography, because cryptography can mathematically garentee trust. Each participant would generate (or use) a 256 bit ecdsa keypair, and would send the public key to each participant. The other participants would make sure that the others have all the correct keys. Each participant would then generate a number and then encrypt it with their private key. The participants would repeat the process that they used for the private keys for the encrypted number. After everyone has the encrypted number, the public keys are released, and the decision is made.

--

--