# OIP-0008 draft folder

The proposal and, under `patches/`, the exact edits acceptance would make. Nothing here changes the protocol until
the editors accept the proposal and its patches are applied in the same change. The patches are made against the
current tree.

| File | What it changes on acceptance |
|---|---|
| [`OIP-0008.md`](OIP-0008.md) | the proposal |
| `patches/spec.patch` | header Registers row; §4.1 rows Algorithm id and Key id; §4.2 rows SignatureEnvelope and KeyRecord; new §4.4 (SIG-1 to SIG-8); §8 row Signatures; §13 crypto agility line |
| `patches/registers.patch` | new `registers/algorithms.yaml` and its layout schema `registers/algorithms.schema.json`; `registers/relations.yaml` (EXT-RFC8785 gains `signature-envelope`; new EXT-COSE, EXT-JWK, EXT-PQC-SIG); `registers/implements-edges.json` regenerated (44 edges); validator group `algorithms` in `tools/validate.py` with nine tests in `tests/test_validate.py` |
| `patches/schemas-fixtures.patch` | new schemas `signature-envelope` and `key-record`; `attestation-result` and `correction-notice` migrated to `$defs.SignatureEnvelope`; their positive and negative fixtures and every example document re-signed with the test keys; five new positive and sixteen new negative fixtures; key records in the OBSP-SITE and OBSP-GRID example sets |
| `patches/vectors-cases.patch` | `conformance/vectors/signatures/` (test keys and 18 vectors); reference verifier `sdk/python/src/obsp/signatures.py`, five suite invariants in `conformance.py`, the `obsp signatures check-vectors` command (run by `make check`), 22 unit tests; cases CT-SITE-004 to CT-SITE-007, CT-NODE-010, CT-PROVIDER-004 and their example attestations; `tools/gen_signature_vectors.py`; `conformance/README.md` section on the vectors |

Apply the patches in the order of the table. Acceptance removes `patches/`.

Overlaps with other drafts, resolved by rebasing whichever proposal is accepted second. With these patches applied,
every patch of OIP-0001 and OIP-0005 still applies except two:

- OIP-0001 `cases-invariants.patch` also creates `conformance/examples/OBSP-GRID/attestations.yaml`: merge the entries.
- OIP-0005 `registers.patch` also regenerates `registers/implements-edges.json`: regenerate it with
  `python3 tools/build_edges.py` after both relation edits.

The signature invariants register themselves at the end of `sdk/python/src/obsp/conformance.py` and the specification
edits avoid §5.10 and §6, so those files do not conflict.

Check that every patch still applies to the current tree: `python3 -m unittest tests.test_validate -k draft_patches`.
Regenerate vectors and example signatures (needs the optional `cryptography` package) with
`python3 tools/gen_signature_vectors.py --examples`.
