CS227 Mental Poker Project: An implementation of the Fast Mental Poker protocol by Wei and Wang.
python3 -m pip install -r requirements.txt
We have tested using Python 3.8
python3 poker.py
The above program does the following:
- performs the multi-party deck generation between two parties, Alice and Bob
- performs the multi-party shuffle on the generated deck
- Alice and Bob each draw 7 cards from the deck
- Alice and Bob reveal their cards and the person with the best 5-card hand wins
- Using
sec256k1, a prime-order elliptic curve E over the field GF(p), where p is prime and E has large embedding degree, and the DDH assumption is believed to hold - set up P2P authenticated message exchange between players via the
p2pnetworkpython library - Includes the core fast mental poker protocols (1 - 6 in paper)
- Protocol 1 (Deck Preparation) ✅
- Protocol 2 (Generate a random element) ✅
- Protocol 3 (Shuffle) ✅
- Protocol 4 (Shuffle Verification) ✅
- Protocol 5 (Card Drawing) ✅
- Protocol 6 (Card Opening) ✅