open-standards/joule-code/conformance/v1/signature_vectors.json
David Charlot e40bf51b53 joule-code: regenerate v1 conformance vectors with real cryptography
Completes the v0.1 conformance suite — no more placeholders. gen-vectors now
computes every derived field via the reference crates, and the verify harness
checks them all for real (the 7 prior SKIPs are gone).

- gen-vectors computes and prints real op_ids (BLAKE3 over canonical CBOR) and
  real Ed25519 signatures (op-binding op_id‖prior; receipt
  estimated_uj‖sequence‖nonce[‖measured_uj]).
- coding_op / signature / receipt vectors filled with the computed values; the
  negatives keep their hand-authored tamper (reused signature, different prior,
  mismatched op_id) and expected false/error.
- verify harness upgraded: C2 op-binding signature verification (positive +
  replay/tamper negatives) and C3 receipt signature verification (reconstruct
  the Receipt, verify against the endpoint key) now run for real.
- conformance/v1/README + regeneration.md updated; vanity scanner clean.

Result: cargo run -p joule-code-conformance -- verify ../conformance/v1 passes
the whole pack with no skipped vectors; cargo test --workspace green.

Co-Authored-By: Claude Opus 4.8 <[email protected]>
2026-06-03 03:43:38 -04:00

55 lines
3.7 KiB
JSON

[
{
"name": "sig-001-ed25519-rfc8032-kat-empty",
"description": "Positive (C2): RFC 8032 Test 1 — sign an empty message with the known seed; the signature is deterministic and reproducible by any Ed25519 implementation. Exercises the signature primitive directly (real, not placeholder).",
"signing_key_seed": "9d61b19deffd5a60ba844af492ec2cc44449c5697b326919703bac031cae7f60",
"verifying_key": "d75a980182b10ab7d54bfed3c964073a0ee172f3daa62325af021a68f707511a",
"message_hex": "",
"signature": "e5564300c360ac729086e2cc806e828a84877f1eb8e5d974d873e065224901555fb8821590a33bacc61e39701cf9b46bd25bf5f0595bbe24655141438e7a100b",
"expected_verify": true,
"error": null
},
{
"name": "sig-002-ed25519-rfc8032-kat-1byte",
"description": "Positive (C2): RFC 8032 Test 2 — sign the one-byte message 0x72 with the known seed. Real known-answer vector.",
"signing_key_seed": "4ccd089b28ff96da9db6c346ec114e0f5b8a319f35aba624da8cf6ed4fb8a6fb",
"verifying_key": "3d4017c3e843895a92b70aa74d1b7ebc9c982ccf2ec4968cc0cd55f12af4660c",
"message_hex": "72",
"signature": "92a009a9f0d4cab8720e820b5f642540a2b27b5416503f8fb3762223ebdb69da085ac1e43e15996e458f3613d0f11d8c387b2eaeb4302aeeb00d291612bb0c00",
"expected_verify": true,
"error": null
},
{
"name": "sig-003-op-binding-positive",
"description": "Positive (C2): a SignedOp whose signature preimage is op_id || prior. Verification recomputes op_id from the canonical form and checks the signature over op_id||prior. Regenerated against joule-code-rs.",
"op_id": "b3:6Ysltc7O3IupNKFXybnzyv2ot32SSLLvCQRB8AHKIdQ",
"prior": "b3:AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA",
"signing_key_seed":"9d61b19deffd5a60ba844af492ec2cc44449c5697b326919703bac031cae7f60",
"verifying_key": "d75a980182b10ab7d54bfed3c964073a0ee172f3daa62325af021a68f707511a",
"signature": "9b632a9b0ee745fd0ebd18e68514b3433f7fe527b100079d9f53f60a43c1f6565bcec2635bc56970bf1b59fbcaeda4ccefebee357771c06af478910e4f53ee09",
"expected_verify": true,
"error": null
},
{
"name": "sig-004-replay-onto-different-base-rejected",
"description": "Negative (C2): the signature from sig-003 verified against a DIFFERENT prior than the one it was signed over. The preimage op_id||prior no longer matches; verification MUST return false. This is the replay-onto-a-different-base attack the prior-binding defends against.",
"op_id": "b3:6Ysltc7O3IupNKFXybnzyv2ot32SSLLvCQRB8AHKIdQ",
"prior": "b3:CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC",
"signing_key_seed":"9d61b19deffd5a60ba844af492ec2cc44449c5697b326919703bac031cae7f60",
"verifying_key": "d75a980182b10ab7d54bfed3c964073a0ee172f3daa62325af021a68f707511a",
"signature": "9b632a9b0ee745fd0ebd18e68514b3433f7fe527b100079d9f53f60a43c1f6565bcec2635bc56970bf1b59fbcaeda4ccefebee357771c06af478910e4f53ee09",
"expected_verify": false,
"error": "signature_does_not_bind_prior"
},
{
"name": "sig-005-tampered-edits-rejected",
"description": "Negative (C2): edits altered after signing. The recomputed op_id differs from the one the signature binds; verification MUST return false.",
"op_id": "b3:8kTnZfhR3BBgx2VP2_jOVImOXqkLUoSkNRSjw91j9uI",
"prior": "b3:AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA",
"signing_key_seed":"9d61b19deffd5a60ba844af492ec2cc44449c5697b326919703bac031cae7f60",
"verifying_key": "d75a980182b10ab7d54bfed3c964073a0ee172f3daa62325af021a68f707511a",
"signature": "9b632a9b0ee745fd0ebd18e68514b3433f7fe527b100079d9f53f60a43c1f6565bcec2635bc56970bf1b59fbcaeda4ccefebee357771c06af478910e4f53ee09",
"expected_verify": false,
"error": "op_id_mismatch"
}
]