Skip to main content

Independently verify Dynamic Feed (DF-VERIFY/1) Ed25519-signed responses. Offline, zero trust in the issuer.

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:

  1. Drop the signature field; keep the rest as the payload.
  2. Canonicalize: JSON, keys sorted recursively, compact separators (, :), UTF-8. Equivalent to json.dumps(payload, sort_keys=True, separators=(",", ":")).
  3. Fetch the public key from https://dynamicfeed.ai/.well-known/keys and look up signature.key_id.
  4. Verify the Ed25519 signature over the canonical bytes. Change one byte → it fails.

Full specification: https://dynamicfeed.ai/standard

License

MIT.

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

dynamicfeed_verify-1.0.1.tar.gz (3.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

dynamicfeed_verify-1.0.1-py3-none-any.whl (5.1 kB view details)

Uploaded Python 3

File details

Details for the file dynamicfeed_verify-1.0.1.tar.gz.

File metadata

  • Download URL: dynamicfeed_verify-1.0.1.tar.gz
  • Upload date:
  • Size: 3.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.6

File hashes

Hashes for dynamicfeed_verify-1.0.1.tar.gz
Algorithm Hash digest
SHA256 432b227fa5ba595182dc97b9749f63b05790b2b49d3715b81757c3eabeeb38db
MD5 662b581fe44520e2295519d1421ceb86
BLAKE2b-256 8713343405b0e0cbb4cdad423ee49f0a677f8d096160f191936b3cfc7ba95742

See more details on using hashes here.

File details

Details for the file dynamicfeed_verify-1.0.1-py3-none-any.whl.

File metadata

File hashes

Hashes for dynamicfeed_verify-1.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 90d43589d078fe7d8f89aef057936e5aafc52285bc861cac9738dde903324005
MD5 953a24ca9c2a972c8bf8ca1176cd1e96
BLAKE2b-256 b011cfbee88014f1be0b2329eabdadb19d4b3a22f684670aeedde6141f92defb

See more details on using hashes here.

Supported by

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