Giter VIP home page Giter VIP logo

zkp's Introduction

ZKP

Zero-Knowledge password-based authentications with a cache of temporary, asymmetric credentials

How to run the solution

  • First, enter the directory solution.

  • First, you will need to create a virtual environment where you will install all the needed dependencies:

    $ virtualenv venv
    $ source venv/bin/activate
    $ pip install -r requirements.txt
  • Then, to run each one of the entities, you will need 3 terminals, one to run each one of them:

    # on each terminal, enter the virtual environment
    $ source venv/bin/activate
    
    # to run the IdP
    $ python IdP.py
    
    # to run the SP
    $ python SP.py
    
    # to run the helper application
    $ cd helper
    $ python helper_app.py
  • For default, they will bind to the following URLs:

  • Take into consideration that the IdP will contact the helper application using the host name zkp_helper_app, which means that you must define this host name on your local DNS, linked to the IP 127.1.2.3. On linux, you just have to had the following line to the /etc/hosts file:

    127.1.2.3  zkp_helper_app
  • For testing purposes, there are some constants defined on each entity that are set to low values. You can change them (they are on the top of each of the following files):

    • SP.py:
      • COOKIE_TTL: the current value is 200 seconds, and represents the max-age of the session cookie used by the SP.
    • IdP.py:
      • MIN_ITERATIONS_ALLOWED: the current value is 300, and represents the minimum iterations allowed by the IdP for the ZKP protocol (value of N).
      • MAX_ITERATIONS_ALLOWED: the current value is 1000, and represents the maximum iterations allowed by the IdP for the ZKP protocol (value of N).
      • KEYS_TIME_TO_LIVE: the current value is 10 minutes, and represents the maximum time that a public key will be valid on the IdP.
    • helper_application.py:
      • MIN_ITERATIONS_ALLOWED: the current value is 200, and represents the minimum iterations allowed by the helper application for the ZKP protocol (value of N).
      • MAX_ITERATIONS_ALLOWED: the current value is 500, and represents the maximum iterations allowed by the helper application for the ZKP protocol (value of N).
  • To register a new user on the helper application, you must access the URL http://zkp_helper_app:1080/register.

    • There is already one registered that you can use:
      • Username: escaleira
      • Password: olaadeus
  • To register a new user on the IdP, you must access the SQLite database file idp.db, and add a new user to the users table:

    insert into user values ('<username>', '<password>');
    • There is already at least one registered that you can use:

      • Username: escaleira
      • Password: asfasdjfpoijasdfoijaspodifjajdpoij
    • You can find other users that possibly are already saved in the database with the following SQL command:

      select * from user;

zkp's People

Contributors

oescal avatar

Stargazers

 avatar

Watchers

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