Earned a Ship Weeks badge.
Encrypted Apps
PQ-402
HTTP 402 payments signed with ML-DSA-87, answers sealed with ML-KEM-1024
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
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
Earned a Ship Weeks badge.
Earned a Ship Weeks badge.
New project.
Comments and questions
- No comments yet.