Object signing and signature verification module
A Python module to easily and quickly cryptographically sign a "thing". The "thing" in question can be anything like a string, or any binary sequence. The binary sequence could be the output of a serializer, pickling, shelving, compiled code, encoder, compression or pretty much anything else. The digital signature based on Public-Key Cryptography Standards (PKCS) prevents tampering.
Note that this is not doing any encryption, only signing. This protects the "thing" from manipulation, but not from reading. Your overall cybersecurity strategy should also cover encryption at rest, encryption in flight and least privileges, along with all the other best practices in this area.
python setup.py install
pip install signethic
Signing a "thing" and saving to a binary file that will contain the digital signature (PKCS) and the "thing". In this case, a string:
from signetic import sign_and_persist thing = "the result of our campaign #12345 resulted in sales of $54321.00" signature = sign_and_persist(thing, path="result.signed")
Verifying a file that has been signed, returning the "thing" if the signature is verified:
from signetic import verify_file public_key = ... thing = verify_file("result.signed", public_key)
After installing signethic, a command line is available. With no argument, it
will generate a private and public key, create a string, sign it, verify it, save
a binary file with the signature and string and verify that file. (see
for the details of the steps).
Calling signethic with a filename will generate a new file with the .signed extension
that includes the signature and the file. It will be signed using the key
in the current directory, by default. To specify a different signing key, use an environment
This version uses pycryptodome to provide the pycrypto package. If you prefer
to use the original pycrypto, install version 0.2 (
pip install signethic==0.2)
|Filename, size||File type||Python version||Upload date||Hashes|
|Filename, size signethic-0.3-py3.7.egg (7.5 kB)||File type Egg||Python version 3.7||Upload date||Hashes View hashes|
|Filename, size signethic-0.3-py3-none-any.whl (5.4 kB)||File type Wheel||Python version py3||Upload date||Hashes View hashes|
|Filename, size signethic-0.3.tar.gz (4.3 kB)||File type Source||Python version None||Upload date||Hashes View hashes|