|
|
|
|
|
by yeneek
1301 days ago
|
|
> "how can one player trust the dice of the other player?" I have an algorithm for that.
To roll a dice:
1. both players create a random x bytes long number. 2. both players make a hash from their number and then send it to the other one. 3. players exchange their random numbers and check if hashes are correct 4. concat both players random numbers and hash it to get the final random number By exchanging hashes, both players can be sure that other player didn't tamper with their random number after getting yours. (edited formatting) |
|
On step 3, this exchange does not happen exactly at the same time. If I'm playing with someone and we reach step 3, I could intentionaly hold myself from sending my data over, wait for the other player to send their data, and if their data wins against my (unsent) data, then I can simply choose not to send my data over (abort), forcing a tie.
This is easy enough to detect and you could just ban people that do this repetidly, but these people would just create new accounts whenever they get banned.
Hence, a cheater can either force a tie or win.
If you go down the rabbit whole on how you could theoricaly do this exchange fairly, you'll discover that this is provably impossible if you do not control the computational power of all parties (if you did, you could employ a time-locked puzzle with proof of work, for example).
This is known as a fair exchange with a fail-stop or secure-with-abort model.
See: http://www.cs.utexas.edu/~shmat/courses/cs395t_fall04/pagnia...
https://crypto.stackexchange.com/a/25458
https://crypto.stackexchange.com/a/26624
https://crypto.stackexchange.com/questions/8333/is-there-a-w...
http://www.iacr.org/archive/eurocrypt2010/66320221/66320221....