Coder Social home page Coder Social logo

mgysel / dimy Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 0.0 3.56 MB

Privacy-preserving contact tracing application that generates and shares ephemeral identifiers using Shamir’s Secret Sharing and Elliptic Curve Diffie-Hellman, and stores and checks COVID-positive contacts in bloom filters on Hyperledger.

Python 100.00%

dimy's Introduction

DIMY - Did I Meet You

Project Description

DIMY is a privacy-preserving contact tracing application that generates and shares ephemeral identifiers using Shamir’s Secret Sharing and Elliptic Curve Diffie-Hellman, and stores and checks COVID-positive contacts in bloom filters on Hyperledger. An in-depth discussion of the project can be found in DIMY Final Report.pdf and DIMY Final Presentation.pdf, and a demo video can be found below.

Demo Video

Requirements

  • Python 3 (assuming 3.6+)
  • Python PIP

How to Install

Assuming a Debian-based system and the user is operating from the directory that this file is located in.
Alternatives include installing in virtual environment (in which case the --user flag is not needed). Like so:

sudo apt-get install python3-venv
python3 -m venv ./venv
source ./venv/bin/activate
python3 -m pip install --upgrade pip wheel
python3 -m pip install -r ./requirements.txt

If for some weird reason you want everything installed in your own user profile...

python3 -m pip install --upgrade --user pip wheel
python3 -m pip install --user -r ./requirements.txt

If for some weird reason ecdsa does not install... After installing wheel through pip (and removing a previously installed ecdsa through python3 -m pip uninstall ecdsa):

git clone "https://github.com/tlsfuzzer/python-ecdsa.git"
cd python-ecdsa
python3 ./setup.py build
python3 ./setup.py bdist_wheel
python3 -m pip install ./dist/ecdsa*.whl

Run

Clients

Copy the DIMY.py file to each device you want to act as a client.

You can also chmod DIMY.py (and server.py) so that it's executable by you or just run the below.

python3 ./DIMY.py

Note that if you intend to use the raspberry pi as another client and you are connecting the client to the raspberry pi via the raspberry pi's network, you can comment out server.sendto(share_bytes, ('<broadcast>', 37025)) and uncomment the line directly beneath it (# server.sendto(share_bytes, ('192.168.4.255', 37025))). This should result in the code looking like:

# server.sendto(share_bytes, ('<broadcast>', 37025))
server.sendto(share_bytes, ('192.168.4.255', 37025))

Extension: Backend Server

Don't forget to run the server too. The server currently assumes that it will be run on the same system that DIMY.py will. If running on a different device, change server_url in DIMY.py to the IPv4 address that server.py is running on. Also make sure the server_url in DIMY.py and server.py port numbers are consistent so that the computer or Raspberry Pi can communicate with the server.

python3 ./server/server.py

dimy's People

Contributors

whonderwy avatar mgysel avatar

Watchers

 avatar

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.