55 lines
3.7 KiB
Markdown
55 lines
3.7 KiB
Markdown
# edge-conformance — the deriving edge
|
||
|
||
The corpus of [`extensions/deriving-edge.md`](../extensions/deriving-edge.md) §10, in one file,
|
||
`vectors.json`, written from fixed seeds by `wai_edge_vectors gen` (`wai-rs`, feature
|
||
`derive_edge`). Every key is SHA-256 of a label, every picture a function of its coordinates,
|
||
every time a constant, and Ed25519 signing is deterministic (RFC 8032).
|
||
|
||
**Provenance.** `wai_edge_vectors gen` (`wai-rs`, feature `derive_edge`) writes every file of this
|
||
corpus, and its only input is the generator's own code: keys from SHA-256 of labels, pictures as
|
||
functions of their coordinates, constant times. No content comes from outside this repository.
|
||
|
||
**Derivation equivalence.** Each vector is what a verifier holds (§7.1) and the outcome §7 gives
|
||
the record at `subject`:
|
||
|
||
- `records`: record texts, as they were sent;
|
||
- `receipts`: the JWP group and object receipts (jwp-receipts §2.4.1, §2.4.2): the publishers'
|
||
and each edge's;
|
||
- `objects`: the envelopes held, each under the content hash it was given by, as lowercase
|
||
hexadecimal; a vector that holds an object altered keeps it under the name it was given;
|
||
- `sources`: the publisher keys the verifier subscribed to;
|
||
- `heads`: for each origin it holds one for, the head revision of that origin's key log;
|
||
- `claims` and `c2pa`: the provenance it holds (§6.1): claim texts, and C2PA Manifest Stores in
|
||
hexadecimal by the content hash of the object each is bound to. The corpus's stores are byte
|
||
strings standing for one: a verifier names a store by its SHA-256 and parses none;
|
||
- `policy`: `attested`, `recompute` and `authority` (§7.1);
|
||
- the outcome: `refuse` with the `reason` and its place `at` (§7.2), or `accept` with the
|
||
`facts` of §7.4 — the subject's record hash, each hop in the order first reached with its
|
||
record hash, signer, derivation, check, how it was checked, its energy, its authority and its
|
||
AI-origin label, each source object reached, the energy per acquisition class with the number
|
||
of unmetered hops, and the provenance items the subject's record carries.
|
||
|
||
A conforming verifier gives every vector the outcome, the reason, the place and the facts it
|
||
states.
|
||
|
||
The parties: a publisher whose `signer_id` names the origin `https://source.example`, and
|
||
whose key log there lists edges `edge-a` and `edge-b` with `edge/derive`, `edge-c` with
|
||
`delivery` alone and `edge-d` revoked; a second publisher whose `signer_id` is a `did:key`, so
|
||
its objects name no origin. The publisher signs, in one group, an integer clip
|
||
(`wai.video.int_motion`, three frames of 8 × 6), three stills and a smaller one, a still whose
|
||
PNG holds an ancillary chunk, a `WAI2` envelope of a still and a JPEG picture, a still whose PNG
|
||
embeds a manifest store in a `caBX` chunk, with a soft-binding claim about it and a store beside
|
||
it in the personal compartment, and a still whose provenance says it was generated.
|
||
|
||
**Checks.**
|
||
|
||
- `wai_edge_vectors verify edge-conformance` and `tests/derive_edge.rs`: the file regenerates
|
||
byte for byte and no other file is here but this README and `edge_verify.py`; `wai-rs` gives
|
||
every vector its outcome; every reason of §9 appears; §9 lists exactly the reference's codes
|
||
and §4 exactly its derivations; and the reference edge, `wai_edge`, run twice over a clip,
|
||
makes a chain of two hops that verifies, and that is refused once a byte of it changes.
|
||
- `python3 -I edge_verify.py .` (`edge_verify.py`, standard library only): the second
|
||
implementation, written from the extension's text and sharing no code with `wai-rs`. It
|
||
re-executes every replicate hop, writing each still itself, requires every vector's outcome,
|
||
requires every mutated copy of the corpus to fail, and requires the corpus to catch the
|
||
verifier with each of its own checks dropped in turn.
|