docs(ap2): clarify ES512 signature scope - #618
Conversation
|
Really like the alg↔curve binding you added here — that's the right safeguard. One thing I noticed while checking it against the schema: I opened #625 with the one-line |
|
Thanks for digging into this and for validating the example against #625 — I For now, I would prefer to keep #625 separate rather than fold it into this One small consistency point for that review: the top-level The two changes remain technically compatible, and your confirmation that the |
|
A concise review handoff:
I will respond promptly to any scope or wording feedback. |
|
Thanks again @GarethCOliver for the review. I pushed
The focused cspell, markdownlint, and @amithanda, could you please help approve the pending workflow runs and route |
|
Hi @amithanda, @jingyli, and @DanielFalconGuedes — I hope you're doing well. This PR remains explicitly scoped to AP2 v0.2 and is documentation-only.
I have resolved both review conversations now that the feedback is incorporated @amithanda, could you please approve the pending external-contributor workflow @jingyli and @DanielFalconGuedes, I would greatly appreciate your review when Thank you very much for your time and help. |
profile.json encodes the curve<->alg binding as schema constraints for P-256, P-384, and Ed25519, but not for P-521. A P-521 key published with a mismatched alg (e.g. ES256) therefore passes profile validation, while the identical mistake on a P-256 key is rejected. This makes the binding machine-checkable and symmetric for the ES512 case, complementing the prose/pseudocode binding proposed in Universal-Commerce-Protocol#618. Conditional well-formedness only: it constrains a P-521 key to alg ES512 when one is published; it does not require any party to support ES512, so it stays consistent with keeping ES512 AP2-scoped. Verified with ucp-schema: a mispaired P-521 key is now rejected; a correct P-521/ES512 key, and an alg-less P-521 key (verifier derives the algorithm), still validate; P-256/P-384/OKP keys are unaffected.
vishkaty
left a comment
There was a problem hiding this comment.
I filed #571, so I wanted to give this a real verification pass rather than just a thumbs-up. I fetched the branch (119ffd4), merged it onto current main (5a5d9e1) locally, and checked it mechanically:
- Composes cleanly with current main, including the #657 addition to
ap2-mandates.md— it lands in the Canonicalization subsection, well below the section-intro and pseudocode hunks this PR edits, so nothing overlaps. The merged section intro (table → scoping note → binding requirement → example → algorithm note) reads coherently. - Example validation passes.
scripts/validate_examples.py --schema-base source/schemas --docs docson the merged tree: 303 passed, 0 failed — versus 302 on main alone, so the new P-521 example is genuinely exercised and admitted by the open profile JWK vocabulary, as the PR describes. (This covers the validation that couldn't run locally withoutucp-schema.) - The example key is real. The
x/ycoordinates decode to 66-byte values forming a valid point on P-521 — worth stating because invalid example points are a classic spec pitfall that copy-paste propagates. - Tree-wide consistency. I grepped the merged docs+schemas for
ES256/ES384/ES512/EdDSA/P-521. Every site is consistent with the AP2-scoped layering: the HTTP Message Signatures table is unchanged with the new explicit non-extension sentence,ap2_mandate.json's description already listed all three algorithms, the pseudocode's newkey_supports_jws_algorithmassert matches the prose MUST, and signatures.md's "excludes Ed25519" cross-reference matches the ECDSA-only AP2 table.
The alg↔curve binding (RFC 8725 §3.1) plus the mandatory JWK alg is the right verifier guardrail for a multi-algorithm key set. And as a data point from the #571 thread: the AP2 reference stack signs and verifies ES256 only today, so this clarification breaks nothing deployed while making an ES512-signed mandate verifiable by implementations built from the spec.
The one residual — the well-known EC vocabulary in signatures.md's key-format section and profile.json still stops at P-384, so the P-521↔ES512 pairing documented here isn't yet machine-enforced — is exactly the scope split already discussed above, tracked in #625, which remains compatible with this PR (the example JWK here validates against that rule too). Non-blocking for this documentation change.
This resolves #571 as filed: the divergence is now explicitly documented on both sides of the boundary. LGTM — thanks for taking the AP2-scoped interpretation to a clean landing.
|
Hi @mmohades and @yanheChen — a quick follow-up on #618 when convenient. As of 2026-08-20, this PR is still mergeable, has two approvals, and all review conversations are resolved. I am not seeing any remaining technical feedback to address on my side. If there is still a blocker, could you please point me to the specific change needed? Otherwise, I would appreciate a review or approval when time permits. If maintainer action is still needed for the remaining governance or workflow gating, I would also appreciate help routing or clearing that final step. Thank you. |
|
Hi @damaz91, thank you for helping route reviews on this PR. The merge conflicts with the latest main have now been resolved, and the PR is mergeable again. The change checks and CLA pass; the remaining blocker is the required maintainer approval. @mmohades and @yanheChen have been requested for some time, but I understand they may be busy. If they are unavailable, could you please help assign or route this to another eligible maintainer for review when convenient? I would be happy to address any feedback promptly. Thank you. |
Summary
ES256/P-256,ES384/P-384, andES512/P-521 pairingsalg, and require verifiers to bind theprotected JWS
algto the selected key's curve and JWKalgES512profile key examplesignature baseline
Motivation
AP2 currently accepts
ES512for its JWS objects, while the shared HTTPMessage Signatures table stops at P-384/
ES384. That can be read as eitheran omitted global requirement or an AP2-specific extension.
This change takes the AP2-scoped interpretation already implied by the current
specification: AP2 owns its JWS algorithm policy, while reusing UCP's JWK
publication, discovery, and rotation mechanisms.
Scope
This is a documentation clarification only. It does not:
ES512to UCP HTTP Message SignaturesES256implementation baselineprofile.jsonor any generated schemaThe existing profile JWK vocabulary is open, so the annotated P-521 example is
schema-compatible without a core schema change.
Validation
git diff --checkopen JWK vocabulary
scripts/test_validate_examples.py: 34 contract checks passed; its singleintegration check could not run locally because the
ucp-schemabinary isunavailable
the same missing local
ucp-schemadependencyThe PR Docs workflow will run schema example validation and the strict site
build with the repository's complete CI toolchain.
Closes #571