We've been working on some game ideas where different people play against each other.
I'd just like to check that a secret for a provably fair game can be made out of 2 transaction ids; where the secret is used to create a signature with those tx ids (i.e. satoshi dice)
Let's say that there were 2 transactions in a 2 player game:
player_1 = "d200c3d88a578e32c6d024aacdac11b8f790c34679e60a114b4af9bcc07b39ad"
player_2 = "6bfafd42a665e14b3aa2f107e9c09164697bfe6f5dfb48ba163198a749fca3cb"
Apply a 512 Digest to the combined hash of the 2 players
secret = Digest::SHA512.hexdigest("d200c3d88a578e32c6d024aacdac11b8f790c34679e60a114b4af9bcc07b39ad6bfafd42a665e14
b3aa2f107e9c09164697bfe6f5dfb48ba163198a749fca3cb"))
secret == "0775c9758a8d63f66098e461bb185f7adc1c080f7d3f0656e3d968cdc45de4512abfff756eea6b3
379a8eb7eae110d3f95363a1c570fcbea6a2a48eaca5e0282"
Things to bear in mind:
- Players play against each other - 2 players could gang up and try to match their tx ids together in order to screw other players, but they don't know the tx ids of those other players.
- Because people are playing against each other, can any one (or many) users exploit the game?
Thanks for your help