A quantum resistent asymmetric key generation tool based on the rainbow scheme for digital signatures.
Why would you need this?
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
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 named
cvPriv.pemand the document to be signed is
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 named
cvPub.puband the document whose signature is to be verified is
# 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.