A quantum resistent asymmetric key generation tool based on the rainbow scheme for digital signatures.
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
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
-
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")
-
Signing a document.
Signing is done using the
Private Key
. Assuming the private key is namedcvPriv.pem
and the document to be signed istestfile.txt
,signature = cryptovinaigrette.rainbowKeygen.sign('cvPriv.pem', 'test/testFile.txt')
-
Verifying the digital signature.
Verification is done using the
Public Key
. Assuming the public key is namedcvPub.pub
and the document whose signature is to be verified istestfile.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!")
This project is made available under the MIT License.
Aditi Srinivas | |
Avinash Shenoy |