Skip to main content

Sign JSON with Ed25519 signatures

Project description

Latest Version

Signs JSON objects with ED25519 signatures.


  • More than one entity can sign the same object.

  • Each entity can sign the object with more than one key making it easier to rotate keys

  • ED25519 can be replaced with a different algorithm.

  • Unprotected data can be added to the object under the "unsigned" key.


pip install signedjson


from signedjson.key import generate_signing_key, get_verify_key
from signedjson.sign import (
    sign_json, verify_signed_json, SignatureVerifyException

signing_key = generate_signing_key('zxcvb')
signed_json = sign_json({'my_key': 'my_data'}, 'Alice', signing_key)

verify_key = get_verify_key(signing_key)

    verify_signed_json(signed_json, 'Alice', verify_key)
    print 'Signature is valid'
except SignatureVerifyException:
    print 'Signature is invalid'


    "<protected_name>": "<protected_value>",
    "signatures": {
        "<entity_name>": {
            "ed25519:<key_id>": "<unpadded_base64_signature>"
    "unsigned": {
        "<unprotected_name>": "<unprotected_value>",

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

signedjson-1.1.4.tar.gz (13.6 kB view hashes)

Uploaded Source

Built Distribution

signedjson-1.1.4-py3-none-any.whl (10.7 kB view hashes)

Uploaded Python 3

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