Giter Club home page Giter Club logo

posproc's Introduction

PosProc

Easy to use QKD (Quantum Key Distribution) library for post processing.

  • Requires Python >= v3.9.5
  • Contains implemetation of Cascade and other error correction algorithms (More will be added in future).
  • Based on an event based networking engine.
  • Includes almost all hashing algorithms for privacy amplification.

Getting Started

Dependencies

  1. For authentication using digital signatures: ecdsa-python.
    pip install starkbank-ecdsa
    
  2. For making public servers: pyngrok.
    pip install pyngrok
    
  3. For pickling python objects to bytes: jsonpickle.
    pip install jsonpickle
    

Simple Installation

  1. Clone this repo to your PC (use github desktop, it's much more convenient.).
  2. Then in the directory of this repo run the file install.bat.

Developer Installation

  1. Clone this repo to your PC (use github desktop, it's much more convenient.).
  2. Then in the directory of this repo run the file install_develop.bat.

Simple Authentication Example

Creating the server

from posproc import*

# Create the server
alice = QKDServer('Alice')

# Initialize all the protocols for authentication, error correction, privacy amplification.
alice.Initialize_Events()

# Start the server socket
alice.start_ursina_server()

# Important call for event based networking
alice.start_events_processing_thread()

Creating the client

from posproc import*

# Create the client
bob = QKDClient('Bob')

# Start the client socket
bob.start_ursina_client()

# Initialize all the protocols for authentication, error correction, privacy amplification.
bob.Initialize_Events()

# Important call for event based networking
bob.start_events_processing_thread()

# Cleanly stop the client after everything is done!
time.sleep(0.1) # For waiting until everything is done
bob.stopClient()

The above two files needs to be executed in different terminals. By default this will start a local server on the LOCAL_PORT defined in constants. If the necessary user data is not already stored in the current directory then on first connection it will be created and saved in the file path specified by DATA_STORAGE. And when this client connects again, then authentication will be done using data at server's end.

posproc's People

Contributors

tanmay972002 avatar timedilatesme avatar

Stargazers

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