Two normative passages in AP2 v0.2 prescribe inconsistent requirements for the same threat (rainbow-table inversion of checkout_hash). Converging on entropy-based formulation in security and privacy doc would eliminate composition cost being paid by integrators today, with no loss of security.
Context
Web Bot Auth (draft-meunier-web-bot-auth-architecture) is being adopted as the HTTP transport identity layer across agentic commerce. Its deployed convention is Ed25519.
A merchant composing AP2 with Web Bot Auth at the transport layer is therefore currently required to hold two keypairs in two different algorithms for a single role: Ed25519 for HTTP transport identity, and ECDSA for the merchant Checkout JWT. The second constraint comes from specification.md "Payment Mandate (lines 155–157)", which forbids deterministic signature schemes (e.g. Ed25519) for the Checkout JWT on the basis of rainbow-table defense.
However, AP2's own security_and_privacy_considerations.md "Rainbow Table Attacks (lines 140–148)" permits deterministic schemes, including Ed25519, provided the JWT payload carries a salt of sufficient entropy. The two normative passages are at odds. The S&P document's entropy-based formulation is the more accurate articulation of the underlying security property: what defeats rainbow-table inversion of checkout_hash is unpredictable JWT bytes per session — the source of the unpredictability (signature or payload) is incidental.
Application protocols already provide this entropy structurally. As one concrete example, UCP requires every Checkout to carry a unique, unguessable per-session checkout id. AP2's own §Checkout Mandate states that when used with UCP, checkout_jwt MUST be a UCP Checkout. By composition, every UCP+AP2 checkout_jwt already contains a high-entropy per-session identifier, making hash(checkout_jwt) unpredictable regardless of signature algorithm. Yet integrators are still required by specification.md to hold a second key in a second algorithm to satisfy the algorithm-class proxy of a property they already provide.
Current text...
specification.md §Payment Mandate (lines 155–157):
"The Payment Mandate is bound to a particular Checkout using the cryptographic hash of the Checkout JWT. To prevent rainbow table attacks, the Checkout JWT MUST be signed using a digital signature scheme (e.g., ECDSA) and not a deterministic signature (e.g., Ed25519)."
security_and_privacy_considerations.md §Rainbow Table Attacks (lines 140–148):
"Digests in SD-JWTs (for Payment and Checkout Mandates as well as Constraints) MUST include a salt with sufficient entropy to prevent guessing the plaintext. See RFC9901 Section 9.1.
The checkout_hash makes use of the entropy already included in the JWT signature to prevent guessing the Checkout contents. If a signing algorithm (e.g. deterministic signature scheme such as Ed25519) is used that does not include this then a salt of sufficient entropy MUST be present in the Checkout."
Recommendation
Replace specification.md lines 153–157 with text aligned to the S&P document.
Suggested replacement:
"The Payment Mandate is bound to a particular Checkout using the cryptographic hash of the Checkout JWT. To prevent rainbow-table attacks on checkout_hash, the Checkout JWT MUST contain sufficient entropy to make its serialized bytes unpredictable per session. This requirement is satisfied by either (a) signing with a non-deterministic signature scheme (e.g., ECDSA), or (b) including a high-entropy claim in the JWT payload (e.g., a jti per RFC 7519 §4.1.7, or an application-protocol-defined session identifier of equivalent entropy). Implementations using a deterministic signature scheme (e.g., Ed25519) MUST ensure the payload satisfies (b)."
This change:
- Resolves the contradiction between spec and S&P docs: both describe the same property.
- Preserves all current ECDSA-using implementations unchanged — they satisfy clause (a) as-is.
- Removes the algorithm-class constraint that acted as a proxy for the entropy property, eliminating the forced multi-key cost for AP2+WBA integrators.
Issue #250 proposes adding an open-enum signature_algorithm field to AP2 mandates to enable PQ migration (ML-DSA-65, Falcon-1024), driven by HKMA / EU DORA / NIST IR 8547 requirements. That proposal's mechanism — making signature algorithm an explicit per-mandate choice — would resolve the contradiction surfaced here as a side effect. The two proposals reinforce each other: both want algorithm flexibility for legitimate but different reasons, and both are blocked in different ways by the same specification.md paragraph.
Two normative passages in AP2 v0.2 prescribe inconsistent requirements for the same threat (rainbow-table inversion of
checkout_hash). Converging on entropy-based formulation in security and privacy doc would eliminate composition cost being paid by integrators today, with no loss of security.Context
Web Bot Auth (draft-meunier-web-bot-auth-architecture) is being adopted as the HTTP transport identity layer across agentic commerce. Its deployed convention is Ed25519.
A merchant composing AP2 with Web Bot Auth at the transport layer is therefore currently required to hold two keypairs in two different algorithms for a single role: Ed25519 for HTTP transport identity, and ECDSA for the merchant Checkout JWT. The second constraint comes from
specification.md"Payment Mandate (lines 155–157)", which forbids deterministic signature schemes (e.g. Ed25519) for the Checkout JWT on the basis of rainbow-table defense.However, AP2's own
security_and_privacy_considerations.md"Rainbow Table Attacks (lines 140–148)" permits deterministic schemes, including Ed25519, provided the JWT payload carries a salt of sufficient entropy. The two normative passages are at odds. The S&P document's entropy-based formulation is the more accurate articulation of the underlying security property: what defeats rainbow-table inversion ofcheckout_hashis unpredictable JWT bytes per session — the source of the unpredictability (signature or payload) is incidental.Application protocols already provide this entropy structurally. As one concrete example, UCP requires every Checkout to carry a unique, unguessable per-session checkout
id. AP2's own §Checkout Mandate states that when used with UCP,checkout_jwtMUST be a UCP Checkout. By composition, every UCP+AP2checkout_jwtalready contains a high-entropy per-session identifier, makinghash(checkout_jwt)unpredictable regardless of signature algorithm. Yet integrators are still required by specification.md to hold a second key in a second algorithm to satisfy the algorithm-class proxy of a property they already provide.Current text...
specification.md§Payment Mandate (lines 155–157):security_and_privacy_considerations.md§Rainbow Table Attacks (lines 140–148):Recommendation
Replace
specification.mdlines 153–157 with text aligned to the S&P document.Suggested replacement:
This change:
Issue #250 proposes adding an open-enum
signature_algorithmfield to AP2 mandates to enable PQ migration (ML-DSA-65, Falcon-1024), driven by HKMA / EU DORA / NIST IR 8547 requirements. That proposal's mechanism — making signature algorithm an explicit per-mandate choice — would resolve the contradiction surfaced here as a side effect. The two proposals reinforce each other: both want algorithm flexibility for legitimate but different reasons, and both are blocked in different ways by the same specification.md paragraph.