Verify Dynamic Feed (DF-VERIFY/1) Ed25519-signed responses, independently — in one line.
Project description
dynamicfeed-verify
Verify Dynamic Feed DF-VERIFY/1 Ed25519-signed responses — independently, in one line. No account, no dependency on Dynamic Feed at runtime beyond fetching the public key. You can verify, even against us.
Reference implementation of the DF-VERIFY/1 standard.
Install
pip install dynamicfeed-verify
Use
from dynamicfeed_verify import verify, verify_live
# 1) fetch a fresh signed awareness verdict and verify it
env, result = verify_live()
print(result) # {'ok': True, 'key_id': 'df-ed25519-…', 'verdict': 'caution', ...}
# 2) verify any signed response you already hold
result = verify(signed_response)
if not result["ok"]:
raise RuntimeError(result["error"])
# 3) verify fully offline if you already have the JWKS
result = verify(signed_response, jwks={"df-ed25519-…": "<base64url public key>"})
CLI
dynamicfeed-verify # fetch a live verdict + verify
dynamicfeed-verify - < response.json # verify a saved signed response
How it works
A signed response carries a signature block (alg, key_id, canonicalization, sig). Verification:
- Drop the
signaturefield; keep the rest as the payload. - Canonicalize — JSON, keys sorted recursively, compact separators (
,:), UTF-8. Equivalent tojson.dumps(payload, sort_keys=True, separators=(",", ":")). - Fetch the public key from
https://dynamicfeed.ai/.well-known/keysand look upsignature.key_id. - Verify the Ed25519 signature over the canonical bytes. Change one byte → it fails.
Full specification: https://dynamicfeed.ai/standard
License
MIT.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
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 dynamicfeed_verify-1.0.0.tar.gz.
File metadata
- Download URL: dynamicfeed_verify-1.0.0.tar.gz
- Upload date:
- Size: 4.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
eaff4cd4b26824ca72df187eaad131c7224c76f2078852489353831b96b5afc6
|
|
| MD5 |
fbe1f06ef455944e25c495e83ce7a728
|
|
| BLAKE2b-256 |
951c41bc0ae286c4dfcceb7308c254083a983c96f3bb465151eccf49d87170fd
|
File details
Details for the file dynamicfeed_verify-1.0.0-py3-none-any.whl.
File metadata
- Download URL: dynamicfeed_verify-1.0.0-py3-none-any.whl
- Upload date:
- Size: 4.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
780692a91274c8e9254d532fe15b001d95df46da42a062e347ce4f9286d7b296
|
|
| MD5 |
0264f515c38921803d14c79b6af8c514
|
|
| BLAKE2b-256 |
5f5dc7a12ec1f068047460e75b811e4804757efd9bdb83abd97868eadab3e128
|