- Alice shuffles and encrypts a deck of cards, then sends it to Bob EAlice(M).
- Bob picks five of the ciphertexts (Bob picks a number from 1-52). and identifies these as Amy’s hand and sends them back to Amy. Amy then decrypts them, and she has her hand.
- Bob now picks five cards and encrypts them with his own key EBob(EAlice(M))= EAlice(EBob(M))
- He sends them back to Amy. Amy then decrypts the ciphertexts and sends to Bob. EBob(M). Amy cannot find out what bob has as it is encrypted with Bob key.
- Bob then decrypts with his decryption key and he now has his hand.
- Both Amy and Bob cross out the number picked by Bob from the list of possible numbers to be picked
Using Git/BASH run the following commands:
git -b final --single-branch clone https://github.com/S-Samiksha/MentalPoker
python -m venv venv
venv\Scripts\activate
pip install -r requirements.txt
Under the bob-server.py, edit the HOST and PORT to your own host and port.
Run the command: python bob-server.py
Under the alice-client.py, edit the HOST and PORT to Bob's ip address and port.
Run the command: python alice-client.py
https://people.csail.mit.edu/rivest/ShamirRivestAdleman-MentalPoker.pdf
https://rextar4444.medium.com/how-to-play-mental-poker-a-tutorial-by-the-author-of-cypher-poker-loosely-edited-by-twoc-j-smithy-8c1c6f7a8259