| I'm currently working on a multiplayer game and I really really wanted to do this, but even if it works in principal, it fails in practice. 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.... |