Signs JSON objects with ED25519 signatures.
Features
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.
Installing
pip install signedjson
Using
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)
try:
verify_signed_json(signed_json, 'Alice', verify_key)
print 'Signature is valid'
except SignatureVerifyException:
print 'Signature is invalid'
Format
{
"<protected_name>": "<protected_value>",
"signatures": {
"<entity_name>": {
"ed25519:<key_id>": "<unpadded_base64_signature>"
}
},
"unsigned": {
"<unprotected_name>": "<unprotected_value>",
}
}
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
No source distribution files available for this release.See tutorial on generating distribution archives.
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file signedjson-1.0.0-py2.py3-none-any.whl.
File metadata
- Download URL: signedjson-1.0.0-py2.py3-none-any.whl
- Upload date:
- Size: 6.2 kB
- Tags: Python 2, Python 3
- Uploaded using Trusted Publishing? No
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2cce6c7a0f0da668f4e3110e728674f67aa3ff3f68ebbf60abfe98d14e23efff
|
|
| MD5 |
3ac8d86fa06121becd0b6c5292baaa9c
|
|
| BLAKE2b-256 |
faaf45b3f7768a7a1640ab7495b645b5f558653a43355dc0e28cc3128257a9b4
|