Giter Site home page Giter Site logo

maxchrist / multi-party-codefile-encryption Goto Github PK

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

This code provides a method to work collaboratively on a coding project but keep the contents of the files secure, to only those working on the project.

Python 100.00%

multi-party-codefile-encryption's Introduction

multi-party-codefile-encryption

This is the final project for the Modern Cryptography class at NYU Tandon, Fall 2020. The code provides an encryption method to work collaboratively on a coding project on a website such as Github, but retain full control over their security and privacy. The method prevents adversaries, including the file hosting site, from accessing the encrypted contents of posted files. In order to work on a Github project collaboratively, one person will be the administrator or admin, and be responsible for getting all users to use the same (private) symmetric encryption key. The set up is broken into steps for the admin and the user, which can be found below.

Requirements

$ pip install cryptography

ADMIN SETUP:

  1. Administrator should always start by running admin_main.py from the terminal using the following command:
python3 admin_main.py
  1. Select the first option in the main menu, which is to generate a symmetric key and public/private signature scheme keys.
  2. Post the public signature scheme key file to the GitHub repository for all users to see.
  3. Keep the private signature scheme key and symmetric key in a safe place, and do not distribute it.
  4. Instruct each user to post an asymmetric key to the GitHub repository. (Users can see instructions for this under “User Setup”)
  5. For each public key file (one per user), download the file, put it into your current working directory, and run the “Encrypt/sign symmetric key in order to send to user (a)” function from the main menu of admin_main.py. Note: The locally stored symmetric key, private signature key, and public key file from the given user all must be present in the current working directory.
  6. Post each asymmetrically encrypted file produced in step 6 to the Github repository.
  7. Users can now decrypt the file, and use the symmetric key which it contained in order to symmetrically encrypt and decrypt all future code they post or download from GitHub.
  8. Admin can encrypt or decrypt the code posted to the server using either admin_main.py or user_main.py.

USER SETUP:

  1. User should always start by running user_main.py from the terminal using the following command:
python3 user_main.py
  1. Select the first option in the main menu, which is to generate new asymmetric keys.
  2. Post the resulting public asymmetric key file to the GitHub repository, so that the admin can use it to encrypt the symmetric key and send it back to you.
  3. When the Admin has posted the encrypted symmetric key file to the Github repository, download this file and move it into your current working directory.
  4. Run the “Decrypt the symmetric key from the admin (a)” option from the main menu. Make sure to keep the resulting file (the symmetric key) in a secure location and do not distribute it. Note: the private asymmetric key must be present in your current working directory as well.
  5. You now have a local copy of the symmetric key, which you can use to encrypt/ decrypt code files.
  6. To encrypt a code file, put the code file into your current working directory and run the “Encrypt code files (e)” function from the main menu. The encrypted file can now be safely posted to the GitHub repository.
  7. To decrypt a code file, download the encrypted code file, put it into your current working directory, and then run the “Encrypt code files (e)” function from the main menu. The decrypted file can now be read and worked on.

multi-party-codefile-encryption's People

Contributors

maxchrist 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.