Repository navigation
SEL-334: Verifier: genuine non-Ed25519 receipts can never classify as unsupported - #156
Merged
Merged
Conversation
…upported (SEL-334) Linear: SEL-334 Refs #124 Engine: codex (fleet coding engine, Grok Bot dispatch)
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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 becamemalformedorunknown_keybefore reachingunsupported. 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 asunsupportedunder the current Ed25519 receipt policy. Altered signed bytes remaininvalid. 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.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 checkon the changed Python files,ruff format --line-length 100 --checkon the changed Python SDK files, andgit 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-SHA256keys without accepting them as receipt v0.1. Python and TypeScript verifiers load P-256 public keys fromtrust-keys.json(DER SPKI), check signatures using the published per-keyalg, then returnunsupportedfor a cryptographically valid P-256 receipt; tampered bytes stayinvalidinstead of being mislabeledmalformedorunknown_key.The Python SDK adds a
VerificationKeytype; 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.