Skip to content

Proposal: Post-Quantum Extension to AP2 (ML-DSA-65 / FIPS 204) #250

@rayc0

Description

@rayc0

Problem

AP2 v0.1 mandates RFC 8785 JCS canonicalization for mandate signatures (excellent design choice — it makes cross-platform verification deterministic). However, the signing algorithm is left to implementers, defaulting to classical ECDSA. For financial institutions deploying AP2 in regulated jurisdictions, this creates a timing problem: payment authorization mandates must be retained for 6–7 years under HKMA (Cap. 615, IRD Cap. 112), EU DORA, and comparable frameworks. NIST IR 8547 (2024) identifies 2030 as the urgent migration deadline for classical cryptography in high-priority systems. The Bank of Israel issued a quantum preparedness directive in 2024 requiring licensed PSPs to submit PQ migration plans; HKMA announced its Quantum Preparedness Index on February 3, 2026. Classical-only ECDSA mandates committed to immutable audit ledgers today may be within their mandatory retention window when cryptographically-relevant quantum computers become available — enabling retrospective signature forgery on financial records. This is not a theoretical concern for ephemeral web tokens; it is a concrete compliance risk for long-lived financial authorization records.

Proposed Solution

We propose two backward-compatible optional fields for AP2 mandates:

  1. signature_algorithm: "ECDSA" | "ML-DSA-65" | "Ed25519" (default "ECDSA" — no change for existing implementations)
  2. pq_signature?: { algorithm: "ML-DSA-65", value: "<3309-byte signature as hex>" } (optional dual-layer signature for regulated deployments)

Because AP2 already mandates JCS (RFC 8785), adding ML-DSA-65 requires no new canonicalization logic — the same canonical byte string feeds both the ECDSA and ML-DSA-65 signing operations. This is unusually clean: AP2's JCS mandate makes ML-DSA-65 integration simpler here than in nearly any other protocol.

We are not proposing that ML-DSA-65 become mandatory for all AP2 deployments. We are proposing it as an optional, clearly-specified extension path for regulated financial deployments that have an active compliance obligation — and making the reference implementation available to the community now.

Live reference implementation

Questions for Maintainers

  1. Is there a preferred format for spec extension proposals (GitHub Issue, PR against spec.md, or AAIF working group submission)?
  2. Has the AP2 team discussed ML-DSA-65 or any PQ algorithm internally? We want to avoid duplicating work.
  3. Is there an AAIF Linux Foundation working group where this extension should be filed simultaneously?

Authors / Availability

Raymond Chau and Tris Au Yeung (PQSafe AgentPay, Hong Kong). Available for an AAIF or AP2 maintainer call any week during May or June 2026.

Contact: raymond@pqsafe.xyz

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions