Skip to content

Latest commit

 

History

History
26 lines (20 loc) · 983 Bytes

File metadata and controls

26 lines (20 loc) · 983 Bytes

Event provenance worked example

A runnable example for the event provenance guidance. It contains a valid dev.cdevents.artifact.published event, its canonical serialization, a DSSE envelope over the canonical bytes, the commitment to the event digest, and a tampered variant of each.

Requires Python 3 with rfc8785, cryptography, and jsonschema:

pip install rfc8785 cryptography jsonschema

Committed artifacts are already present. To regenerate and verify:

python3 build_example.py
python3 verify_example.py

The verifier shows the genuine event passing both checks (the DSSE signature verifies against the demo public key, and the SHA-256 digest of the canonical payload equals the committed hash) and the tampered event failing both. The demo keypair is generated by build_example.py; only the public key is committed. build_example.py also validates the sample event against the published CDEvents schema.