Giter Site home page Giter Site logo

alkarnjn / crypto-vinaigrette Goto Github PK

View Code? Open in Web Editor NEW

This project forked from aditisrinivas97/crypto-vinaigrette

0.0 0.0 0.0 470 KB

Quantum-resistent asymmetric key generation tool for digital signatures.

License: MIT License

Python 100.00%

crypto-vinaigrette's Introduction

Crypto-Vinaigrette

Open Source Love Status License PyPI - Python Version

A quantum resistent asymmetric key generation tool based on the rainbow scheme for digital signatures.

Why would you need this?

Auth Comic

Digital signatures are a common way of authenticating a sender by verifying a piece of information attached to the document. In our case, the attached piece of information is a sequence of numbers generated using the document which is to be signed.

As mentioned before, we employ the Generalised Unbalanced Oil and Vinegar scheme or the Rainbow scheme to achieve the same.

You can find the paper here : https://bit.ly/2vwckRw

Installing

To build and install cryptovinaigrette, run the following commands

$ git clone https://github.com/aditisrinivas97/Crypto-Vinaigrette
$ cd Crypto-Vinaigrette
$ python3 setup.py install

Or install the package using pip (Pending..)

$ pip install cryptovinaigrette

Usage

  1. Creating a key-pair.

    The keys generated are stored in the directory passed as parameter to generate_keys.

    from cryptovinaigrette import cryptovinaigrette
    
    # Initialise keygen object and generate keys
    myKeyObject = cryptovinaigrette.rainbowKeygen(save="/path/to/dest/folder")
  2. Signing a document.

    Signing is done using the Private Key. Assuming the private key is named cvPriv.pem and the document to be signed is testfile.txt,

    signature = cryptovinaigrette.rainbowKeygen.sign('cvPriv.pem', 'test/testFile.txt')
  3. Verifying the digital signature.

    Verification is done using the Public Key. Assuming the public key is named cvPub.pub and the document whose signature is to be verified is testfile.txt,

    # Case where signature is valid
    check = cryptovinaigrette.rainbowKeygen.verify('cvPub.pub', signature, 'test/testFile.txt')
    
    # Case where signature is invalid 
    check = cryptovinaigrette.rainbowKeygen.verify('cvPub.pub', signature, 'test/testFile2.txt')
    
    if check == True :
        print("Verified successfully!")
    else :
        print("Signature does not match the file!")

Example

Example

License

This project is made available under the MIT License.

Primary Contributors

Aditi Srinivas
Avinash Shenoy

crypto-vinaigrette's People

Contributors

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