Skip to content

theauk/Distributed-Dice-Game

Folders and files

NameName
Last commit message
Last commit date

Latest commit

bd0bfae · Jul 30, 2023

History

1 Commit
Jul 30, 2023
Jul 30, 2023
Jul 30, 2023
Jul 30, 2023
Jul 30, 2023
Jul 30, 2023

Repository files navigation

Distributed Dice Game

Alice and Bob wants to throw a virtual 6-sided dice over an insecure network. However, they do not trust each other and an adversary with access to the network must not be able to see that they are playing dice. This project simulates the game with a protocol to ensure confidentiality, authenticity, and integrity.

How to Run

Create a certs/out folder and generate (guide):

  • client.crt, client.csr, client.key
  • ExampleCA.crl, ExampleCA.crt, ExampleCA.key
  • localhost.crt, localhost.csr, localhost.key

First run Bob (the server) in the main (code) directory with the command: go run bob/bob.go -host "localhost" -srvcert "certs/out/localhost.crt" -cacert "certs/out/ExampleCA.crt" -srvkey "certs/out/localhost.key" -port 443

Then run Alice (the client) in the main (code) directory with the command: go run alice/alice.go -clientcert "certs/out/client.crt" -clientkey "certs/out/client.key" -cacert "certs/out/ExampleCA.crt"

Note: Bob (the server) will stay open after the dice roll. To roll another dice, rerun Alice’s command.

About

Virtual 6-sided dice over an insecure network

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages