Skip to content
QORECHAIN
Register

Quantum Pass

PQ Receipt

Signed receipts a quantum computer can't forge: ML-DSA-87, verified on chain by QoreChain's PQC precompile.

Share on X

About

Unlike a notary that stores any hash you send, PQ Receipt stores a receipt only after QoreChain's own PQC precompile has verified an ML-DSA-87 signature from the signer's registered key, for any document, signed in the QoreX wallet in your browser, and revocable later with a fresh post-quantum signature. Releases, approved invoices and signed contracts must stay provably yours for decades, and today's signatures (ECDSA, Ed25519) will be forgeable once a large quantum computer exists. PQ Receipt is for the people who sign those files: maintainers shipping releases, finance teams approving payments, anyone who agrees to a document. It records that an account signed a file: the file's SHA-256 plus an ML-DSA-87 signature that ReceiptBook checks on chain before storing anything, reading the signer's key from the PQC Key Status precompile (0x…0a02; ML-DSA-87 and proof of possession required) and verifying with the PQC Verify precompile (0x…0a01). ReceiptBook refuses a forged or wrong-key signature (bad stamps sent as real transactions on v3 and again on v4 reverted, nothing stored), and a signer can later withdraw a receipt with a fresh signature from the key registered now. Every transaction is listed in the README's "On testnet" and "Refused on chain" tables. Try it: stamp with QoreX in the web app (https://apps.swiftbotlab.workers.dev/proof/pq-receipt/), or check any file in one command with nothing of ours in the path: `npx -y github:swiftbotlabs/pq-receipt#v1.1.0 --sample` (npm 10+). It verifies the signature on your machine with a one-bit control that must fail, shows whether the signer still holds that key and whether the receipt was revoked, and ends PASSED or BLOCKED; the same check is a GitHub release gate (action.yml).

How it's made

PQC proof for jurors (10 seconds): ReceiptBook v4 calls the 0x0a02 pqcKeyStatus precompile (all four outputs, possessionProven included) and the 0x0a01 pqcVerify precompile in src/ReceiptBook.sol lines 154-168 (https://github.com/swiftbotlabs/pq-receipt/blob/c359dd3/src/ReceiptBook.sol#L154-L168), used by every stamp (L114-115) and by revoke (L105-106). Both ran on v4 (0x56656ec9779ded1ac113f215a982b6076c2242e4) in a stamp (0x3ab99b2449e818b45ddd877058c10759f050a7f3d1595cc3a39cad299174413a) and its signed revocation (0x9de5f71e2e940d2107a3e3056d43843c7885b64309bd418b926ab1b0f31a47d9). Rerun it yourself, read-only: `bash scripts/juror-check.sh` calls 0x0a01 on that receipt's real key and signature (true; one flipped bit: false), reads 0x0a02, and shows v4 rejecting a replayed signature (BadSignature) and a caller with no PQC key (NoPqcKey); output in docs/juror-check.txt. Contract: generated with create-qorechain-dapp 0.14.0 (foundry template, credited in the README). Both stamping paths (stamp, stampFor) and revoke share one check: key from 0x0a02 (registered, ML-DSA-87, possession proven), signature through 0x0a01, nothing stored on failure. Web app (web/, from the viem-wagmi template, RainbowKit with @qorechain/qorex-rainbowkit): hashes the file on your device, signs with QoreX's native provider (enable, getKey, signArbitrary, signAndBroadcast), reads only the public EVM RPC, so it is static files. Tests: 56 Foundry tests with 100% line, branch and function coverage of ReceiptBook.sol (docs/COVERAGE.md): valid and bad signatures, wrong document, replay by another account, relayer redirection, cross-path and cross-network signatures, no key, wrong algorithm, a key without proof of possession, a missing possessionProven output, key removal and rotation, a dead precompile failing closed, revocation (fresh signature, current key, no double revoke), fuzzing bit flips, relayers, signers and rotations, and an invariant campaign (every receipt names a key its signer really registered; no corrupt signature ever stored). 40 offline verifier tests on two real receipts check that the page's and the CLI's message bytes equal the contract's. Live checks: `npm run live-check` calls the testnet precompile read-only (real signature true, one changed byte false). Bad stamps were also sent as real transactions on v3 and v4 and reverted (docs/REFUSALS-v3.json, docs/REFUSALS.json). The release gate (action.yml, `npm run receipt -- verify` with EXPECT_SIGNER) and both test suites run on every push; CI is green. Records and credits: the README lists every transaction with the account that sent it; docs/THREAT-MODEL.md maps each threat to its test; AI_USAGE.md has the decision ledger; every runtime dependency is credited with its licence, @noble/post-quantum (MIT) first. The platform's checker awarded the Ship Weeks badge 'First contract with a PQC check' (v3 deploy 0x125ce539abb9f052535ab1d2f0d5900d0803bab10e148eee49e54c7fb481fbfc); its FAQ says the Solidity PQC features are checked by jurors by hand, which is what the block above is for.

Timeline

PQ ReceiptQuantum Pass

Pushed 6 commits to master

  • afcae2e README: PQ Receipt and Forrel side by side (from Forrel's public page, 2 Dec), including where we are weaker (signatures in events) · swiftbotlabs
  • 71bcdf2 docs: three bad stamps refused on chain by ReceiptBook v4 · swiftbotlabs
  • 5171a44 README top: a one-line cast refusal + the juror-check output; refusals block generated from docs/REFUSALS*.json (scripts/refusals-table.mjs); v3 run kept as docs/REFUSALS-v3.json · swiftbotlabs
  • f4e41d7 README: a QoreX wallet receipt on ReceiptBook v4 (anchor + stampFor, 2 Dec); sample file docs/samples/qorex-v4-note.txt · swiftbotlabs
  • cedde09 scripts/juror-check.sh: read-only eth_call re-run of 0x0a01/0x0a02 on the real v4 receipt (true / bit-flip false), revoked(0), and v4 refusing a replayed signature (BadSignature) and a keyless caller · swiftbotlabs

and 1 more commit

PQ ReceiptQuantum Pass

Pushed 5 commits to master

  • 059d317 CI: pin Foundry v1.10.1 and retry its install once (run #14 failed on a release-download flake, not our code) · swiftbotlabs
  • 351bf82 ReceiptBook v4 on testnet: 0x56656ec9779ded1ac113f215a982b6076c2242e4. Demo: stamp then revoke docs/samples/revoke-demo.txt; verify ends BLOCKED (revoked by its signer). Run log in docs/v4-run.log · swiftbotlabs
  • a7d414f README credits: every runtime dependency with its licence (@noble/post-quantum included); web: show 'Revoked by its signer' for v4 receipts · swiftbotlabs
  • 3d83b89 ReceiptBook v4: signed revocation. revoke(id, sig) needs a fresh ML-DSA-87 signature over revokeMessage(id) by the signer's key registered now (proven), checked on chain, relayable by anyone; Revoked · swiftbotlabs
  • 988e421 README: the three on-chain refusals near the top, and the platform's 'First contract with a PQC check' badge · swiftbotlabs
PQ ReceiptQuantum Pass

Pushed 5 commits to master

  • 6c4116a docs/REFUSALS.json: three bad stamps refused on chain by ReceiptBook v3 (forged signature, wrong document, wrong signer's key), all reverted, receipts 2 -> 2 · swiftbotlabs
  • e33d101 npm run refusals: three bad stamps sent as real transactions (forged signature, wrong document, wrong signer's key), each must revert with nothing stored · swiftbotlabs
  • 34bc8cc npx/npm commands pin the tagged release v1.0.0 · swiftbotlabs
  • 57cd177 README: release-gate badge (5 jobs) at the top; npx needs npm 10+, with the npm i -g fallback · swiftbotlabs
  • 70e2893 One-command receipt check: npx -y github:swiftbotlabs/pq-receipt <file> verifies ML-DSA-87 locally from the public RPC, one-bit control, signer's possessionProven from 0x0a02 · swiftbotlabs
PQ ReceiptQuantum Pass

Earned a Ship Weeks badge.

PQ ReceiptQuantum Pass

Pushed 1 commit to master

  • 92c8edc web: static no-JavaScript copy of the sample receipt check inside #root (scripts/static-fallback.mjs, from a read-only receipt verify); React replaces it when JS runs · swiftbotlabs
PQ ReceiptQuantum Pass

Pushed 1 commit to master

  • e63122e README + threat model: ReceiptBook v3 on testnet (proof of possession required), its QoreX stampFor and direct stamp txs · swiftbotlabs
PQ ReceiptQuantum Pass

Pushed 3 commits to master

  • ca4e45f deployments: ReceiptBook v3 (proof of possession required) on testnet · swiftbotlabs
  • a168905 ReceiptBook: require possessionProven (pqcKeyStatus 4th output) before stamping; keyCurrent false without it; 5 tests (unproven key refused on stamp and stampFor, proof restored, keyCurrent drop, lega · swiftbotlabs
  • eb483ed README: live-check output as run, how it differs from a notary; create-qorechain-dapp 0.14.0 as devDependency (the kit we generated from) · swiftbotlabs
PQ ReceiptQuantum Pass

Pushed 1 commit to master

  • 3874217 web: record a QoreX-signed receipt from your own EVM wallet (stampFor, no relayer of ours), with window/key error messages; README · swiftbotlabs
PQ ReceiptQuantum Pass

Pushed 11 commits to master

  • 7e77190 receipt verify: last line PASSED or BLOCKED with the reason; docs: link the CI runs · swiftbotlabs
  • 23db07a CI: release-gate workflow (pass, wrong signer blocked, one-byte change blocked, Foundry + verifier tests); 40 offline verifier tests on real receipts (test:ts); Foundry: 44 unit + fuzz tests, 6 invari · swiftbotlabs
  • ecbe92a CI gate: action.yml + docs/CI.md (EXPECT_SIGNER); receipt verify works with no .env (loadEnvFile); web: timeouts + retries + batched RPC, slow-RPC note with retry; README: what is different, security · swiftbotlabs
  • c5dff50 README: the QoreX stamp on chain (key registration, signArbitrary, hybrid-signed anchor tx, relayed receipt); docs/samples; web: My QoreX account (native-lane key + receipts), EVM card explains QoreX' · swiftbotlabs
  • 80337e5 deployments: ReceiptBook v2 on testnet · swiftbotlabs

and 6 more commits

PQ ReceiptQuantum Pass

Pushed 5 commits to master

  • e060001 receipt.ts link: fee 100000uqor (testnet minimum global fee is 40000uqor) · swiftbotlabs
  • 891dc4f README: deploy with receipt.ts · swiftbotlabs
  • 0fa1870 receipt.ts deploy (from the mnemonic account, no separate PRIVATE_KEY) · swiftbotlabs
  • e9346b1 LICENSE: our copyright line · swiftbotlabs
  • d4d433e PQ Receipt: ReceiptBook (ML-DSA-87 verified on chain), tests, live precompile check, CLI, docs · swiftbotlabs

Comments and questions

  • No comments yet.