Coder Social home page Coder Social logo

encryptle's Introduction

Encryptle

SINE Logo

Secure Multi-Party Computation word-guessing game

Description

A version of New York Times' popular game Wordle, using SINE's Tandem engine.

Play here!

Concept

In the original Wordle game the player's guesses are compared to the secret word. Hence, although the latter is kept secret, the former are shared with the server. Encryptle uses Secure Multi-Party Computation, keeping both the secret word and the player's guesses private.

This project was developed to serve as a demo for SINE's Tandem engine.

Technologies

This repository contains a backend server (henceforth, 'the server') and a frontend server (henceforth 'the client').

The server is powered by rocket.rs and implements SINE's tandem engine, which runs Garble programs.

The client adapts this repository, which uses (mainly) React and Typescript.

Build and run

Server

You can start the server by running the following commands:

$ cd server
$ cargo install --path .
$ encryptle

Alternatively, you can build and run a Docker container with the server using the following commands:

$ cd server
$ docker build -t encryptle-server -f Dockerfile .
$ docker run -p 8000:8000 --name encryptle-server

Client

Build and run a Docker container with the client for development using the following commands:

$ cd client
$ docker build -t encryptle-client:dev .
$ docker run -p 3000:3000 --name encryptle-client-dev encryptle-client:dev

Open http://localhost:3000 and play!

Build and run a Docker container with the client for production using the following commands:

$ cd client
$ docker build --target=prod -t encryptle-client:prod .
$ docker run -p 80:8080  --name encryptle-client-prod encryptle-client:prod

Contributions

All contributions and suggestions are welcomed! Please open issues for that effect.

encryptle's People

Contributors

raimundo-henriques avatar fkettelhoit avatar dependabot[bot] avatar zeitgeist avatar

Stargazers

Fede avatar Jochen Deister avatar Nicolas Kosinski avatar

Watchers

 avatar  avatar  avatar

encryptle's Issues

Versioning for Client/Server

Now that the repository is public, we should start thinking about how we want to handle a version mismatch between the client and server. Since the playground (or rather the echo server) is auto-deployed whenever something changes on main, everyone using a previously installed tandem_http_client will simply get a very confusing error message whenever a change results in incompatibility:

tandem_http_client --function main --input 3u8 --metadata 7u8 add.garble.rs
Error: MaxRetriesExceeded([ServerError("{\"error\":\"BincodeError\"}"), ServerError("{\"error\":\"BincodeError\"}"), ServerError("{\"error\":\"BincodeError\"}"), ServerError("{\"error\":\"BincodeError\"}"), ServerError("{\"error\":\"BincodeError\"}"), ServerError("{\"error\":\"BincodeError\"}"), ServerError("{\"error\":\"BincodeError\"}"), ServerError("{\"error\":\"BincodeError\"}"), ServerError("{\"error\":\"BincodeError\"}"), ServerError("{\"error\":\"BincodeError\"}")])

I would propose 2 changes:

  • only deploy new versions to fly.io when a new tag is pushed (not on every commit)
  • check the client version against the server version, print a more helpful error message in case there's a mismatch

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.