Deciding Movie-Night Order (Passive Security)
Every Wednesday some friends and I have a movie-night for which one person always chooses the movie (read as: forces the others to watch). For reasons unknown to me, we don’t do it in Round-Robin style but choose the ordering randomly after everyone has had their turn.
Since the great pandemic of 2019, the movie night had to be done online - however, this meant that we ran into the problem of determining a fair, totally random order. If someone chooses an ordering using random.org the others cannot be sure that they did not cheat. Even with sharing their computer screen, we would not know. Maybe it’s just an elaborate screen recording… Maybe they changed the HTML… Maybe they are running a MITM attack on their network to intercept and change the HTTP responses… Maybe they got an internship at random.org and managed to bias their randomness generators… who knows…
For important applications such as choosing the movie-night order, we need proper information-theoretic assurances. (In the past we abused hash functions to construct commitment schemes)
Therefore, to determine the order fairly, we will construct a passively secure protocol to choose a random value:
There are 5 parties:
Every party chooses a random value and creates a random polynomial of degree at most in such that their secret input is at position 0:
Now we do a Shamir Secret Sharing Every party evaluates their polynomial at positions and sends the evaluation to the corresponding party.
We want to calculate the polynomial and use as our random number which determines the order according to the table below.
Since Shamir Secret Sharing is linear in addition, everybody can add up their shares such that we obtain a sharing of the polynomial.
Now we reconstruct towards each party and everybody broadcasts their value.
For the reconstruction, everyone broadcasts their value and we interpolate the polynomial with Lagrange Interpolation (we omit the uniqueness proof): We have n points on some polynomial and we want to calculate this polynomial. We can certainly write it as:
where
- else
if we can write the -Functions as a polynomial, then would certainly also be a polynomial.
Let’s construct the function:
We can easily see that this function has all the properties we want for .
Therefore, we can construct the whole polynomial based on our points as:
or for our case with :
We calculate the result value as .
Everybody now broadcasts their result value. If a party sees a value that is inconsistent, it broadcasts a complaint, and we restart the protocol. (This opens up the possibility that somebody claims that their value is inconsistent if they just don’t like the outcome. They can then DOS the protocol. We could remedy this by adding an information-theoretically secure distributed commitment scheme but that would be “too over-engineered” )
If a party sees consistent values from everyone, then they broadcast acceptance and we accept the value as our random value that determines the ordering.
| Random Number | Order |
|---|---|
| 0 | DP –> WD –> ToB –> TB –> FO |
| 1 | WD –> DP –> ToB –> TB –> FO |
| 2 | ToB –> DP –> WD –> TB –> FO |
| 3 | DP –> ToB –> WD –> TB –> FO |
| 4 | WD –> ToB –> DP –> TB –> FO |
| 5 | ToB –> WD –> DP –> TB –> FO |
| 6 | ToB –> WD –> TB –> DP –> FO |
| 7 | WD –> ToB –> TB –> DP –> FO |
| 8 | TB –> ToB –> WD –> DP –> FO |
| 9 | ToB –> TB –> WD –> DP –> FO |
| 10 | WD –> TB –> ToB –> DP –> FO |
| 11 | TB –> WD –> ToB –> DP –> FO |
| 12 | TB –> DP –> ToB –> WD –> FO |
| 13 | DP –> TB –> ToB –> WD –> FO |
| 14 | ToB –> TB –> DP –> WD –> FO |
| 15 | TB –> ToB –> DP –> WD –> FO |
| 16 | DP –> ToB –> TB –> WD –> FO |
| 17 | ToB –> DP –> TB –> WD –> FO |
| 18 | WD –> DP –> TB –> ToB –> FO |
| 19 | DP –> WD –> TB –> ToB –> FO |
| 20 | TB –> WD –> DP –> ToB –> FO |
| 21 | WD –> TB –> DP –> ToB –> FO |
| 22 | DP –> TB –> WD –> ToB –> FO |
| 23 | TB –> DP –> WD –> ToB –> FO |
| 24 | FO –> DP –> WD –> ToB –> TB |
| 25 | DP –> FO –> WD –> ToB –> TB |
| 26 | WD –> FO –> DP –> ToB –> TB |
| 27 | FO –> WD –> DP –> ToB –> TB |
| 28 | DP –> WD –> FO –> ToB –> TB |
| 29 | WD –> DP –> FO –> ToB –> TB |
| 30 | WD –> DP –> ToB –> FO –> TB |
| 31 | DP –> WD –> ToB –> FO –> TB |
| 32 | ToB –> WD –> DP –> FO –> TB |
| 33 | WD –> ToB –> DP –> FO –> TB |
| 34 | DP –> ToB –> WD –> FO –> TB |
| 35 | ToB –> DP –> WD –> FO –> TB |
| 36 | ToB –> FO –> WD –> DP –> TB |
| 37 | FO –> ToB –> WD –> DP –> TB |
| 38 | WD –> ToB –> FO –> DP –> TB |
| 39 | ToB –> WD –> FO –> DP –> TB |
| 40 | FO –> WD –> ToB –> DP –> TB |
| 41 | WD –> FO –> ToB –> DP –> TB |
| 42 | DP –> FO –> ToB –> WD –> TB |
| 43 | FO –> DP –> ToB –> WD –> TB |
| 44 | ToB –> DP –> FO –> WD –> TB |
| 45 | DP –> ToB –> FO –> WD –> TB |
| 46 | FO –> ToB –> DP –> WD –> TB |
| 47 | ToB –> FO –> DP –> WD –> TB |
| 48 | TB –> FO –> DP –> WD –> ToB |
| 49 | FO –> TB –> DP –> WD –> ToB |
| 50 | DP –> TB –> FO –> WD –> ToB |
| 51 | TB –> DP –> FO –> WD –> ToB |
| 52 | FO –> DP –> TB –> WD –> ToB |
| 53 | DP –> FO –> TB –> WD –> ToB |
| 54 | DP –> FO –> WD –> TB –> ToB |
| 55 | FO –> DP –> WD –> TB –> ToB |
| 56 | WD –> DP –> FO –> TB –> ToB |
| 57 | DP –> WD –> FO –> TB –> ToB |
| 58 | FO –> WD –> DP –> TB –> ToB |
| 59 | WD –> FO –> DP –> TB –> ToB |
| 60 | WD –> TB –> DP –> FO –> ToB |
| 61 | TB –> WD –> DP –> FO –> ToB |
| 62 | DP –> WD –> TB –> FO –> ToB |
| 63 | WD –> DP –> TB –> FO –> ToB |
| 64 | TB –> DP –> WD –> FO –> ToB |
| 65 | DP –> TB –> WD –> FO –> ToB |
| 66 | FO –> TB –> WD –> DP –> ToB |
| 67 | TB –> FO –> WD –> DP –> ToB |
| 68 | WD –> FO –> TB –> DP –> ToB |
| 69 | FO –> WD –> TB –> DP –> ToB |
| 70 | TB –> WD –> FO –> DP –> ToB |
| 71 | WD –> TB –> FO –> DP –> ToB |
| 72 | ToB –> TB –> FO –> DP –> WD |
| 73 | TB –> ToB –> FO –> DP –> WD |
| 74 | FO –> ToB –> TB –> DP –> WD |
| 75 | ToB –> FO –> TB –> DP –> WD |
| 76 | TB –> FO –> ToB –> DP –> WD |
| 77 | FO –> TB –> ToB –> DP –> WD |
| 78 | FO –> TB –> DP –> ToB –> WD |
| 79 | TB –> FO –> DP –> ToB –> WD |
| 80 | DP –> FO –> TB –> ToB –> WD |
| 81 | FO –> DP –> TB –> ToB –> WD |
| 82 | TB –> DP –> FO –> ToB –> WD |
| 83 | DP –> TB –> FO –> ToB –> WD |
| 84 | DP –> ToB –> FO –> TB –> WD |
| 85 | ToB –> DP –> FO –> TB –> WD |
| 86 | FO –> DP –> ToB –> TB –> WD |
| 87 | DP –> FO –> ToB –> TB –> WD |
| 88 | ToB –> FO –> DP –> TB –> WD |
| 89 | FO –> ToB –> DP –> TB –> WD |
| 90 | TB –> ToB –> DP –> FO –> WD |
| 91 | ToB –> TB –> DP –> FO –> WD |
| 92 | DP –> TB –> ToB –> FO –> WD |
| 93 | TB –> DP –> ToB –> FO –> WD |
| 94 | ToB –> DP –> TB –> FO –> WD |
| 95 | DP –> ToB –> TB –> FO –> WD |
| 96 | WD –> ToB –> TB –> FO –> DP |
| 97 | ToB –> WD –> TB –> FO –> DP |
| 98 | TB –> WD –> ToB –> FO –> DP |
| 99 | WD –> TB –> ToB –> FO –> DP |
| 100 | ToB –> TB –> WD –> FO –> DP |
| 101 | TB –> ToB –> WD –> FO –> DP |
| 102 | TB –> ToB –> FO –> WD –> DP |
| 103 | ToB –> TB –> FO –> WD –> DP |
| 104 | FO –> TB –> ToB –> WD –> DP |
| 105 | TB –> FO –> ToB –> WD –> DP |
| 106 | ToB –> FO –> TB –> WD –> DP |
| 107 | FO –> ToB –> TB –> WD –> DP |
| 108 | FO –> WD –> TB –> ToB –> DP |
| 119 | WD –> FO –> TB –> ToB –> DP |
| 110 | TB –> FO –> WD –> ToB –> DP |
| 111 | FO –> TB –> WD –> ToB –> DP |
| 112 | WD –> TB –> FO –> ToB –> DP |
| 113 | TB –> WD –> FO –> ToB –> DP |
| 114 | ToB –> WD –> FO –> TB –> DP |
| 115 | WD –> ToB –> FO –> TB –> DP |
| 116 | FO –> ToB –> WD –> TB –> DP |
| 117 | ToB –> FO –> WD –> TB –> DP |
| 118 | WD –> FO –> ToB –> TB –> DP |
| 119 | FO –> WD –> ToB –> TB –> DP |
Next, we need security against active adversaries, ensure termination and make the protocol secure against replay and impersonation attacks.
However, I fear that, if I do this, then I won’t have any friends left to watch movies with… (although that would also solve the problem…)