Skip to content
QORECHAIN
Register

Encrypted Apps

PQ-402

HTTP 402 payments signed with ML-DSA-87, answers sealed with ML-KEM-1024

Share on X

About

PQ-402 lets a program pay for an HTTP request with no account and no API key. The server answers 402 with a price. The client answers with a payment signed by its ML-DSA-87 key, and the paid response comes back sealed to the payer with ML-KEM-1024, so only the payer can read what they bought. Why: per-call payments are how agents buy data and inference, and today those payments rest on signatures a quantum computer can forge and travel over responses anyone on the path can read. PQ-402 keeps the familiar 402 flow and replaces both weak points. A payment can be funded two ways: from the payer's fUSD balance, or straight from the yield of a Perennial position, so an agent can spend what an endowment earns and never its capital. Overwinter, an inference service, charges through it.

How it's made

Plan. A small Solidity settlement contract checks the payer's registered, possession-proven key with the pqcKeyStatus precompile and the payment signature with pqcVerify, then moves the ERC-20; it fails closed if the precompiles are inactive. A second scheme relays a signed spend from a Perennial vault position instead. TypeScript packages: core (canonical payment encoding, signing, sealing; known-answer vectors), server (402 middleware, verification, settlement, sealing), client (a fetch wrapper that pays and opens the sealed answer). The payer's sealing key is the account's registered QoreSeal key. A relayer submits settlement, so a paying agent needs no gas and no EVM window. Foundry unit, fuzz and invariant tests against mock precompiles; an end-to-end run on the testnet with real ML-DSA-87 signatures. This text will be updated as each part lands.

Timeline

PQ-402Encrypted Apps

Earned a Ship Weeks badge.

PQ-402Encrypted Apps

Pushed 4 commits to main

  • 77db163 chore(release): 0.1.2 · raldblox
  • c198f17 docs: add a README to each package · raldblox
  • ef95ff8 refactor!: rename the packages to the @pq402 scope · raldblox
  • 1a362c0 docs(adr): publish under the @pq402 npm scope · raldblox
PQ-402Encrypted Apps

Pushed 19 commits to main

  • c1032db chore(release): 0.1.1 · raldblox
  • 7a0451c fix: quote the workspace filter in the build script · raldblox
  • dfdceab chore(release): 0.1.0 · raldblox
  • 47c64da docs: record the testnet deployment, transactions and gas · raldblox
  • 020c631 docs: refer to the Perennial vault without a version label · raldblox

and 14 more commits

PQ-402Encrypted Apps

Earned a Ship Weeks badge.

PQ-402Encrypted Apps

Earned a Ship Weeks badge.

PQ-402Encrypted Apps

New project.

Comments and questions

  • No comments yet.