peskpesk -> RE: MWIF External dice roller support (5/19/2020 7:48:24 AM)
Allies and Axis wish to play a board game over e-mail. They need to find a way to roll the dice in a way that will not let them cheat.
Using MWIF as dice roller and sending the result with e-mail has problems.
* Internet connection might go down preventing the email.
* E-mail program might fail.
In both cases above could the player use the above to cheat, redoing the combat until the "right" result is generated.
What is a good algorithm to use? If one wanted to creat a MWIF dice roller with no cheating
This could be seen as classic problem in cryptography.
One such simple paper describing the problem is : Coin Flipping by Telephone. http://www.cs.cmu.edu/~mblum/research/pdf/coin/
The algorithm can become somthing like:
Axis picks a random number R and the value 0 <= Vb <= 5, Calculates a hash H=crypto_hash("Vb R"), and sends it to Allies
Allies picks the value 0 <= Va <= 5, and sends it to Axis
Axis sends Vb and R to Allies; Axis calculates V=(Va+Vb)%6+1
Allies verifies H=crypto_hash("Vb R"); Allies calculates V=(Va+Vb)%6+1
... Although I would feel better about it if:
0. Allies picks a random number Q and sends it to Axis
And the string to be hashed becomes then "Vb Q R".
BUT the above need the players to be online at the same time or it takes time waiting for the values.
So a third party online dice roller is often a quick, good and secure way to do it. Cheating option is out.