Skip to main content

Python library and CLI scripts for signing and verifying data

Project description


Python library and CLI scripts for signing and verifying data


pip3 install -U pysigning


Generate a random signing key for testing

# generate private key as "sign.key"
openssl genrsa -out sign.key 2048

# get private key's public key as "sign.crt"
openssl rsa -in sign.key -pubout -out sign.crt


Generate a signature for the file LICENSE using the private key sign.key

$ pysigning sign @LICENSE --key sign.key

Verify the signature of the file LICENSE using the public key sign.crt

$ pysigning sign @LICENSE --key sign.key | pysigning verify @LICENSE - --key sign.crt


import pysigning

# Generate a signature for the file `LICENSE` using the private key `sign.key`
sig = pysigning.sign('@LICENSE', key="sign.key")

# Verify the signature of the file `LICENSE` using the public key `sign.crt`
assert pysigning.verify('@LICENSE', sig, key="sign.crt")




A library by Shawn Presser. If you found it useful, please consider joining my patreon!

My Twitter DMs are always open; you should send me one! It's the best way to reach me, and I'm always happy to hear from you.

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pysigning-0.3.1.tar.gz (5.2 kB view hashes)

Uploaded Source

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page