🎲Cards shuffling
RACE Poker's decentralized shuffling
Last updated
RACE Poker's decentralized shuffling
Last updated
Algorithm described here can be applied for any number of players. For simplicity, we consider a situation when 2 players are in the game: Alice & Bob.
Synchronous stream cipher is used for encryption that satisfies:
C stands for the collection of 52 cards:
The whole collection is encrypted with a single key
In this step Alice & Bob encrypt & shuffle collection of 52 cards each with own single key
In these steps Alice & Bob encrypt each card with an independent key:
K=(k1,k2,…,k52)
The final encryption with 52 keys
The whole encryption procedure made by all clients:
That means both Alice & Bob don't know what card is in what position now.
To reveal cards Alice & Bob need to share cards' individual keys with each other.
Until Alice shares a certain key, Bob and server doesn't know what card it is.
Alice & Bob can now play the game and share the keys according to the game logic.
Players, server need to run the same encryption/decryption process for game to go.
Alice & Bob have to reach consensus on the game progress, and transactor to verify it.
The whole shuffle procedure made by all clients: