| Internet-Draft | x402-pqc-cred-binding | November 2026 |
| Hopley | Expires 21 May 2027 | [Page] |
This document defines how Falcon-1024 (NIST FIPS 206 / FN-DSA) and ML-DSA-65 (NIST FIPS 204) credentials bind to x402 agentic payment authorization. It specifies the credential envelope format, the JCS canonicalization discipline applied to signed payloads, the gateway verification procedure, and the session token binding that replaces per-request API key authentication for credentialed agents.¶
This is the first Internet-Draft in the agentic payments space to anchor credential binding to the NIST post-quantum cryptography standards (FIPS 203/204/206).¶
This Internet-Draft is submitted in full conformance with the provisions of BCP 78 and BCP 79.¶
Internet-Drafts are working documents of the Internet Engineering Task Force (IETF). Note that other groups may also distribute working documents as Internet-Drafts. The list of current Internet-Drafts is at https://datatracker.ietf.org/drafts/current/.¶
Internet-Drafts are draft documents valid for a maximum of six months and may be updated, replaced, or obsoleted by other documents at any time. It is inappropriate to use Internet-Drafts as reference material or to cite them other than as "work in progress."¶
This Internet-Draft will expire on 21 May 2027.¶
Copyright (c) 2026 IETF Trust and the persons identified as the document authors. All rights reserved.¶
This document is subject to BCP 78 and the IETF Trust's Legal Provisions Relating to IETF Documents (https://trustee.ietf.org/license-info) in effect on the date of publication of this document. Please review these documents carefully, as they describe your rights and restrictions with respect to this document.¶
The x402 payment protocol [x402] enables HTTP-native micropayments between autonomous agents and API providers. As agent deployments scale, two problems emerge:¶
Per-request authentication overhead. An agent making thousands of payment-gated requests must authenticate on every call. API keys are long-lived secrets that create revocation and rotation complexity.¶
Quantum vulnerability. All deployed x402 credentials use Ed25519 or ES256 — algorithms broken by a cryptographically-relevant quantum computer running Shor's algorithm.¶
This document addresses both by defining a credential binding scheme where:¶
An agent earns a short-lived PQC-signed credential from a trusted evaluation service (the Agent Trust Bench, [ATB]).¶
The agent exchanges this credential for a gateway session token in a single round-trip.¶
Subsequent payment requests carry only the session token.¶
The credential signing algorithm is Falcon-1024 (NIST FIPS 206) or ML-DSA-65 (NIST FIPS 204).¶
The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this document are to be interpreted as described in BCP 14 [RFC2119] [RFC8174].¶
Issuer: An entity that evaluates an agent and signs a credential asserting the result. The reference implementation is the AlgoVoi Agent Trust Bench.¶
Gateway: The x402 payment gateway that accepts credentials and issues session tokens.¶
Agent: An autonomous software system presenting credentials to a gateway in exchange for payment-authorization session tokens.¶
ATB Pass Certificate: A Falcon-1024-signed credential asserting that an agent passed adversarial evaluation. Phase 1 contains a plaintext score; Phase 2 replaces the score with a Bulletproofs range proof (zero-knowledge).¶
A PQC credential is a JSON object serialised to UTF-8 and encoded as base64url (without padding). The structure is:¶
{
"alg": "<algorithm>",
"kid": "<key-id>",
"payload": { ... },
"sig": "<base64url signature>"
}
¶
MUST be one of:¶
"Falcon-1024" — FN-DSA-1024 per NIST FIPS 206.¶
"ML-DSA-65" — Module-Lattice Digital Signature per NIST FIPS 204.¶
The "Falcon-1024" algorithm is the RECOMMENDED choice. It provides
1,024-bit classical security, 256-bit post-quantum security, and
compact signatures (~1,280 bytes).¶
A 16-character lowercase hex string derived as:¶
kid = hex(SHA-256(public_key_bytes))[:16]¶
The gateway MUST verify that the kid in the envelope matches the
kid of the issuer's public key in its trusted-key registry before
proceeding to signature verification.¶
A JSON object. Required fields for ATB Phase 2 credentials:¶
| Field | Type | Description |
|---|---|---|
atb_cert_version
|
string | MUST be "2" for Phase 2 ZKP credentials. |
bench_issuer
|
string | Issuer DID (e.g. did:algovoi:bench:prod). |
commitment_b64
|
string | Bulletproofs Pedersen commitment (base64 std). |
proof_b64
|
string | Bulletproofs range proof (base64 std). |
threshold_milliunits
|
integer | Range proof lower bound (0–1000). |
expires_at
|
string | ISO 8601 UTC expiry timestamp. |
issued_at
|
string | ISO 8601 UTC issuance timestamp. |
methodology_version
|
string | Evaluation methodology version string. |
The commitment_b64 field MUST decode to exactly 32 bytes (a compressed
Ristretto255 point). The proof_b64 field MUST decode to 200–900 bytes
(a 64-bit Bulletproofs range proof over Ristretto255).¶
Base64url-encoded detached signature over the JCS-canonical form of the
payload field. The signer applies RFC 8785 [RFC8785] canonicalization
to the payload object, then signs the resulting UTF-8 bytes.¶
For alg = "Falcon-1024", the signature is a Falcon-1024 detached
signature (NIST FIPS 206, PQClean format, ~1,280 bytes, base64url).¶
The issuer:¶
Constructs the payload JSON object with all required fields.¶
Applies RFC 8785 JCS canonicalization to produce canonical_bytes.¶
Signs canonical_bytes using Falcon-1024 or ML-DSA-65.¶
Base64url-encodes the signature as sig.¶
Assembles the envelope: {"alg":…,"kid":…,"payload":…,"sig":…}.¶
Base64url-encodes the envelope JSON as the credential string.¶
The issuer MUST NOT include the sig field in the payload before signing.
The alg and kid envelope fields MUST NOT be signed.¶
The gateway receiving X-ATB-ZK-Credential: <credential>:¶
Base64url-decode and JSON-parse the envelope.¶
Verify alg is a supported algorithm.¶
Resolve the bench_issuer DID from the payload to a trusted hub entry.¶
Verify kid matches hex(SHA-256(hub.public_key))[:16].¶
Verify expires_at has not elapsed.¶
Base64url-decode sig.¶
Apply JCS canonicalization to payload.¶
Verify the Falcon-1024 (or ML-DSA-65) signature.¶
Decode and structurally validate commitment_b64 and proof_b64.¶
Call the ZKP verification service to verify the Bulletproofs range proof.¶
If all checks pass, passed = true.¶
A gateway SHOULD implement an LRU cache keyed by (sha256(sig)[:32], kid)
to avoid re-running Falcon verification for repeated presentations within
the cache TTL. The cache TTL MUST NOT exceed the credential's expires_at.¶
On successful credential verification, the gateway issues a session token:¶
POST /auth/token
Authorization: Bearer <api-key>
X-Tenant-Id: <tenant-id>
Content-Type: application/json
{
"atb_zk_credential": "<credential>",
"spend_cap_usd": 100.0,
"ttl_secs": 3600
}
¶
Response:¶
{
"token": "<session-token>",
"token_type": "Bearer",
"expires_in": 3600,
"spend_cap_usd": 100.0,
"jti": "<unique-token-id>"
}
¶
The session token is a JWT [RFC7519] signed with the gateway's HMAC key.
Its claims include tenant_id, jti, spend_cap (in micro-USD), exp,
and iat. Subsequent requests carry only:¶
Authorization: Bearer <session-token>¶
No API key or tenant header is required for the session duration.¶
The gateway tracks cumulative spend per jti in-process. On each
successful payment, spend is incremented. If spend >= spend_cap,
the gateway MUST reject the request with HTTP 402.¶
| Property | Ed25519 | Falcon-1024 (FIPS 206) | ML-DSA-65 (FIPS 204) |
|---|---|---|---|
| Classical security | 128-bit | 1024-bit | 192-bit |
| Post-quantum security | Broken | ~256-bit | ~192-bit |
| Signature size | 64 B | ~1,280 B | ~3,309 B |
| NIST standard | No | FIPS 206 | FIPS 204 |
| Deployed in x402 | Yes | AlgoVoi only | AlgoVoi only |
Implementations SHOULD prefer Falcon-1024 for its signature compactness in HTTP header contexts.¶
An adversary with a cryptographically-relevant quantum computer can break Ed25519 and ES256 signatures using Shor's algorithm. All credentials using these algorithms are vulnerable to retrospective forgery once such a machine exists. Issuers SHOULD migrate to Falcon-1024 or ML-DSA-65 before quantum computers reach this capability threshold.¶
Phase 2 ATB credentials include a Bulletproofs range proof rather than a
plaintext score. The range proof attests that score >= threshold without
revealing the exact score. Gateways MUST NOT attempt to reconstruct scores
from commitment values.¶
The jti in each session token is a random 128-bit value generated at
issuance. Gateways MUST track issued jti values and reject replayed tokens.
The credential nonce in Phase 1 activation flows prevents replay at the
license-activation layer.¶
Issuers SHOULD rotate Falcon-1024 keys at least annually. The kid field
allows gateways to maintain a key registry and identify credentials by key
version without revoking the full issuer DID.¶
This document has no IANA actions.¶