Skip to content

SEL-334: Verifier: genuine non-Ed25519 receipts can never classify as unsupported - #156

Merged
PetrefiedThunder merged 2 commits into
mainfrom
agent/codex/sel-334
Oct 20, 2026
Merged

PetrefiedThunder merged 2 commits into
mainfrom
agent/codex/sel-334

Conversation

@PetrefiedThunder

@PetrefiedThunder PetrefiedThunder commented Oct 20, 2026 •

Copy link
Copy Markdown
Collaborator

Linear: SEL-334
Fixes #124

Coding engine: codex, dispatched by Grok Bot for C.Lee.

What changed

At HEAD 1861d6e, genuine P-256 receipts still became malformed or unknown_key before reaching unsupported. The Python and TypeScript SDKs now retain the published per-key algorithm, verify P-256 DER signatures against DER SPKI public keys, and classify a genuine P-256 receipt as unsupported under the current Ed25519 receipt policy. Altered signed bytes remain invalid. The independent failure-lab verifier now checks P-256 signatures too. Ed25519 raw-key callers and local permit verification remain Ed25519-only. Updated the wire-format docs and shared vectors.

How verified

  • ~/metacode/fleet/heavy env PYTHONPATH=sdk/python/src:spec/test-vectors:gateway /Users/sellers/Projects/agent-middleware-api/.venv/bin/python -m pytest sdk/python/tests/test_receipt_verifier.py sdk/python/tests/test_receipt_verifier_signed.py sdk/python/tests/test_receipt_vectors.py sdk/python/tests/test_local_permit_validator.py spec/test-vectors/test_contract.py spec/test-vectors/test_generate.py gateway/tests/test_failure_lab_verifier.py gateway/tests/test_spec_conformance.py -q --no-cov , 246 passed; two unknown-mark warnings from gateway test setup.
  • From sdk/typescript: ~/metacode/fleet/heavy npm test , 121 passed, one pre-existing skip; build passed as the test pre-step. ~/metacode/fleet/heavy npm run lint , passed.
  • ~/metacode/fleet/heavy env PYTHONPATH=sdk/python/src /Users/sellers/Projects/agent-middleware-api/.venv/bin/python verifier/check_vectors.py , 54/54 vectors passed.
  • ~/metacode/fleet/heavy env PYTHONPATH=sdk/python/src:gateway /Users/sellers/Projects/agent-middleware-api/.venv/bin/python -m pytest gateway/tests/test_public_mcp_endpoint.py -k 'verify_receipt or unverified_algorithm_claim' -q --no-cov , 6 passed, 32 deselected.
  • ruff check on the changed Python files, ruff format --line-length 100 --check on the changed Python SDK files, and git diff --check , passed.

Not done / follow-ups

The gateway signing plane remains Ed25519-only. Enabling P-256 issuance or accepting P-256 receipts as verified needs a separate KMS and receipt-policy change. No live KMS or production service was called. No commit, push, or deployment was made.


Note

Medium Risk
Touches cross-language cryptographic verification and status semantics; behavior change is intentional but affects how non-Ed25519 receipts are classified at the trust boundary.

Overview
Receipt verification now understands dormant ECDSA-P256-SHA256 keys without accepting them as receipt v0.1. Python and TypeScript verifiers load P-256 public keys from trust-keys.json (DER SPKI), check signatures using the published per-key alg, then return unsupported for a cryptographically valid P-256 receipt; tampered bytes stay invalid instead of being mislabeled malformed or unknown_key.

The Python SDK adds a VerificationKey type; the failure-lab verifier and gateway public MCP key-set typing follow the same model. Ed25519-only paths (local permit verification, issuance) are unchanged. Specs, key-management docs, and shared test vectors include new P-256 cases (p256.valid → unsupported, tampered → invalid).

Reviewed by Cursor Bugbot for commit 240bbdf. Bugbot is set up for automated code reviews on this repo. Configure here.

…upported (SEL-334)

Linear: SEL-334
Refs #124
Engine: codex (fleet coding engine, Grok Bot dispatch)
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 20, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-20T10:27:42.944306Z 688f038 PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@PetrefiedThunder
PetrefiedThunder merged commit 686d0b3 into main Oct 20, 2026
47 of 50 checks passed
@PetrefiedThunder
PetrefiedThunder deleted the agent/codex/sel-334 branch October 20, 2026 13:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Verifier: genuine non-Ed25519 receipts can never classify as unsupported

1 participant