revocation,trust-record-verify: implement es256 and es384 bundle verification and add EC revocation vectors (#448 items 1, 10)
Maintainers usually reply within 1 day
A pull request for this has already been merged.
- #590 by @drk-ram — merged
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 52/100
- Issue type
- Feature
- Clarity
- Clearly specified
- Activity status
- Active
- Tech stack
- python, typescript
- Domain
- cryptography, documentation, security, testing-qa
Research direction
Start with src/agentrust_trace/revocation.py and trust-record-verify/src/crypto.ts, then trace bundle verification in src/agentrust_trace/revocation.ts and trust-record-verify/src/revocation.ts. Add deterministic ES256/ES384 success and failure vectors via examples/revocation-bundle/gen_revocation_vectors.py, run the revocation and adequacy tests including tests/test_adequacy_all_sets.py, and document fixed-width P1363 encoding in both schema files. Done means both implementations verify valid P-256/P-384 bundles, reject malformed signatures and unsupported algorithms, and the new vectors pass.
Written by the indexing model from the issue text.
Description
What is wrong
Contributor: Raghuvar Durga (@drk-ram)
On main (a7f0858), spec/trace-v0.2.md §3.2.3 and schema/trace-revocation-bundle.json define three signature algorithms for TraceRevocationBundle/1.0:
"ed25519""es256"(ECDSA over P-256 with SHA-256)"es384"(ECDSA over P-384 with SHA-384)
However, as tracked in the Go verifier audit (#448 items 1, 10, and 25):
- Both
src/agentrust_trace/revocation.py(line 322:if alg != "ed25519": return _unverified("bundle_signature_unsupported", ...)) andtrust-record-verify/src/revocation.ts(line 183:if (alg !== "ed25519")) only verify"ed25519"and report lowercase"es256"and"es384"(as well as uppercase"ES256"/"ES384") asbundle_signature_unsupported. - Neither
spec/trace-v0.2.md§3.2.3 norschema/trace-revocation-bundle.jsonstates explicitly thates256andes384signatures insig.valueuse the fixed-width IEEE P1363 rawr || sencoding (64 bytes fores256, 96 bytes fores384— the standard JOSE/COSE/WebCrypto JWS format of RFC 7515 §A.3 / RFC 8152 §8.1, rather than ASN.1 DER). - As noted in #448 item 10,
examples/revocation-bundle/has no vector with a validly EC-signed revocation bundle (vectors 21 and 22 use uppercase"ES256"and"ES384"with an Ed25519 key to testbundle_signature_unsupported).
Spec section or file
spec/trace-v0.2.md§3.2.3schema/trace-revocation-bundle.jsonandsrc/agentrust_trace/schema/trace-revocation-bundle.jsonsrc/agentrust_trace/revocation.pytrust-record-verify/src/crypto.tsandtrust-record-verify/src/revocation.tsexamples/revocation-bundle/(gen_revocation_vectors.py)
Expected behavior
- Implement
"es256"(kty: "EC",crv: "P-256", 64-byte rawr || ssignature with SHA-256) and"es384"(kty: "EC",crv: "P-384", 96-byte rawr || ssignature with SHA-384) bundle verification in both:src/agentrust_trace/revocation.py(usingcryptography.hazmat.primitives.asymmetric.ecandutils.encode_dss_signature, rejecting non-canonical base64url, wrong byte lengths, out-of-ranger/s, and mismatched key curves)trust-record-verify/src/crypto.tsandtrust-record-verify/src/revocation.ts(using zero-dependencyglobalThis.crypto.subtleECDSAP-256/SHA-256andP-384/SHA-384, which natively takes IEEE P1363r || ssignatures!).
- Keep vectors 21 and 22 (
alg: "ES256"andalg: "ES384"uppercase, or an algorithm outside{"ed25519", "es256", "es384"}/ mismatched key curve) reportingbundle_signature_unsupportedso the two-vector margin forbundle_signature_unsupportedintests/test_adequacy_all_sets.pyremains 100% intact, and add new deterministic vectors29-es256-bundle-verified.jsonand30-es384-bundle-verified.json(plus corrupted-signature / statement-revoking EC cases) inexamples/revocation-bundle/gen_revocation_vectors.py! - Document in
schema/trace-revocation-bundle.json(and its packaged copy) thates256andes384sig.valueencodings are fixed-width IEEE P1363r || s(64 bytes fores256, 96 bytes fores384), closing #448 items 1 and 10.
Impact
Enables enterprise KMS/HSM (P-256 / P-384) revocation-bundle verification across both the Python and TypeScript SDKs, adds deterministic EC revocation-bundle conformance vectors, and closes #448 items 1 and 10.
- Dominant language
- Python
- Stars
- 37
- Forks
- 33
- Avg merge
- 1d 9h
- Merged PRs (30d)
- 121
Getting set up
- No Dockerfile or Docker Compose file
- Has a pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from agentrust-io/trace-spec
-
prototype(azure_execution_binding): bind HCLAkPub exponent e and key size, reject duplicate JSON keys, and harden _secure_boot_state and authenticode_sha256Possibly taken @drk-ram claimed this 1 day ago. Openneeds-review:MEDIUM
Difficulty 4/5 3-5 days Newbie friendliness 20/100
agentrust-io/trace-spec#613 · 1 comment ·
Maintainers usually reply within 1 day
-
content_marking: validate record.alg against record.hash prefix, reject unknown assertion fields, and check anchor agreementPossibly taken @drk-ram claimed this 1 day ago. Openneeds-review:MEDIUM
Difficulty 4/5 3-5 days Newbie friendliness 35/100
agentrust-io/trace-spec#614 · 1 comment ·
Maintainers usually reply within 1 day
-
adapters: validate data_class, policy/appraisal enums, and URI fields in TraceAGTAdapter and TraceSandboxAdapterPossibly taken @drk-ram claimed this 1 day ago. Openneeds-review:MEDIUM
Difficulty 4/5 3-5 days Newbie friendliness 20/100
agentrust-io/trace-spec#615 · 1 comment ·
Maintainers usually reply within 1 day
-
trust-record-verify: reject non-object inputs in parentRecordHash, verifyDelegationLink, and bundleDigestPossibly taken @drk-ram claimed this 1 day ago. Openneeds-review:MEDIUM
Difficulty 2/5 1-3 hours Newbie friendliness 35/100
agentrust-io/trace-spec#616 · 1 comment ·
Maintainers usually reply within 1 day
-
intent_bridge,successor_observation: validate caller options and trusted JWKs at entry and deep-copy observation before predicatePossibly taken @drk-ram claimed this 1 day ago. Openneeds-review:MEDIUM
Difficulty 4/5 1-2 days Newbie friendliness 35/100
agentrust-io/trace-spec#617 · 1 comment ·
Maintainers usually reply within 1 day
All issues in agentrust-io/trace-spec
Similar issues
-
Difficulty 1/5 1-3 hours Newbie friendliness 85/100
WLAN-Pi/wlanpi-profiler#341 ·
Maintainers usually reply within 1 day
-
Memory leak: the shared `validation_aborted_error` keeps every traceback it is raised throughPossibly taken @Fire162 claimed this today. Open
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
graphql-python/graphql-core#287 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 67/100
roman-corgi/ctc-dip#160 ·
Maintainers usually reply within 1 day
-
type-bug
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
Maintainers usually reply within 1 day
-
render_findings.py reads and writes in the host's default encoding, so findings.html breaks on a cp1252 Windows hostPossibly taken @Aaqibhafeezkhan claimed this today. Openbug good first issue mentored python size: XS up-for-grabs
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
dheerajjha/mcp-migrate#366 · 1 comment ·
Maintainers usually reply within 1 day