Skip to content
QORECHAIN
Register

Post-Quantum dApp

Sera Bolt

A drop-in guard that only trusts post-quantum keys registered and proven on chain.

Share on X

About

On Q-Day, a stolen or quantum-cracked ECDSA key can drain a contract that trusts it. QoreChain's pqcVerify precompile fixes that, but it's easy to get subtly wrong. The most common mistake is verifying a signature against a public key the caller supplies. That lets an attacker pass with their own valid ML-DSA key. Sera Bolt is a drop-in Solidity library. A contract inherits OnlyPQ and adds one modifier. The library: - looks up the signer's registered ML-DSA-87 key through pqcKeyStatus, and requires proof of possession - verifies with pqcVerify - fails closed on empty precompile returns - binds every signature to the chain, contract, function, its arguments, the value sent, a nonce and a deadline npm: https://www.npmjs.com/package/sera-pq

How it's made

What's built - Solidity library (PQGuard + PQPrecompiles) with named errors, plus a Foundry kit with precompile mocks and real ML-DSA test vectors. - Adversarial Foundry suite covering: ECDSA-only, a foreign valid key, an unregistered key, no proof of possession, replay, cross-contract or cross-chain signatures, an expired deadline, and known precompile edge cases. 72 tests; all 33 attack tests fail without the guard. - Three retrofits deployed on testnet: the official QDayVault, the official cross-VM checkout and PQ Passport. Guarded calls go through a scoped EVM window. - QCAI audit in two stages (92, then 85), every finding answered with tests. - Published on npm as sera-pq: the guard, the precompile library and the interface. - Hosted demo, no wallet needed: a five-step guided story with real testnet transactions, plus an attack matrix to simulate or send each attack. Architecture - OnlyPQ / PQGuard: takes the signer's public key from the pqcKeyStatus precompile (registered and possession-proven), never from the caller, and verifies the signature with the pqcVerify precompile (ML-DSA-87). It fails closed: an inactive precompile or malformed answer reverts with a named error. - The signed digest binds the chain, the contract, the function, its arguments, the value sent, a per-signer sequential nonce and a deadline, so a signature works once, in one place, for a limited time. - Foundry kit: precompile mocks plus real ML-DSA-87 signatures. 72 tests; all 33 attack tests fail when the guard is removed. - Retrofits: the official QDayVault (the hand-written post-quantum check became one modifier), the official cross-VM checkout (the guard composes with the bridge call; a failure after it undoes both sides and keeps the nonce) and PQ Passport (MIT). - Live demo: a relay sends real testnet transactions as the attacker, through scoped EVM windows limited to the guarded contracts. Nine attacks are refused on chain; a free-play page simulates each one or sends it for real. - Published on npm as sera-pq. About 183,000 extra gas per guarded call. Network features pqcKeyStatus and pqcVerify precompiles, scoped EVM windows (allowed targets), the cross-VM bridge, and QCAI, which audited it in two stages (92, then 85; every finding answered with a test). What was hard - Our first premise was wrong: we assumed QoreX's automatic signing windows were unscoped. Testing showed they are scoped and close after one transaction, so we refocused on the real gap: contracts that check a post-quantum signature against a key the caller supplies. - Making the guard fail closed on every precompile answer, including empty or short return data. - eth_call with any state override switches off QoreChain's precompiles, so simulations can read "success, no data". We reported it (qorechain-core #14). - Refused calls are mined and reverted, but the explorer can still show "success" for them, so the demo reads receipt status from the chain itself. We reported it (qorechain-explorer #1). - The public RPC occasionally drops requests, so the demo falls back to clearly labelled recorded runs.

Timeline

Sera BoltPost-Quantum dApp

Pushed 1 commit to main

  • 089264f docs: demo video link · AjKadri
Sera BoltPost-Quantum dApp

Pushed 1 commit to main

  • 4d624ca chore: favicon and link previews · AjKadri
Sera BoltPost-Quantum dApp

Pushed 1 commit to main

  • 26d78f9 docs: link the reported eth_call state-override issue · AjKadri
Sera BoltPost-Quantum dApp

Pushed 1 commit to main

  • 718aeb5 docs: sera-pq package readme · AjKadri
Sera BoltPost-Quantum dApp

Pushed 1 commit to main

  • 760606e docs: install guide, sera-pq package, README and BUGS fixes · AjKadri
Sera BoltPost-Quantum dApp

Pushed 1 commit to main

  • 80495e2 docs: publish QCAI stage 1 and 2 audits, responses and AI usage · AjKadri
Sera BoltPost-Quantum dApp

Pushed 1 commit to main

  • 5154eea .gitignore: keep local notes out of the repo · AjKadri
Sera BoltPost-Quantum dApp

Pushed 1 commit to main

  • 1c8cffe docs: reword explorer note, drop manual-window claim, extend step 4 copy · AjKadri
Sera BoltPost-Quantum dApp

Pushed 1 commit to main

  • a401fbb feat: guided five-step demo, button states and calmer hero motion · AjKadri
Sera BoltPost-Quantum dApp

Pushed 1 commit to main

  • 1430c3c feat: turn the demo into a guided three-step flow · AjKadri
Sera BoltPost-Quantum dApp

Pushed 1 commit to main

  • aefe8c2 style: rebuild the landing page layout and motion · AjKadri
Sera BoltPost-Quantum dApp

Pushed 1 commit to main

  • 1cc7b43 feat: add a landing page and move the attack page to /demo · AjKadri
Sera BoltPost-Quantum dApp

Pushed 1 commit to main

  • 9796abd style: redesign the attack-matrix page · AjKadri
Sera BoltPost-Quantum dApp

Pushed 1 commit to main

  • f8fe80d test: prove no guarded contract accepts a caller-chosen signer · AjKadri
Sera BoltPost-Quantum dApp

First on-chain deployment detected on testnet.

Sera BoltPost-Quantum dApp

Pushed 1 commit to main

  • f68f714 feat: add the hosted attack-matrix page and its relay · AjKadri
Sera BoltPost-Quantum dApp

Pushed 3 commits to main

  • e514432 feat: retrofit the cross-VM checkout and the PQ Passport registry · AjKadri
  • 8132c06 test: run retrofits 2 and 3 on testnet through a scoped window · AjKadri
  • ee90c87 docs: describe the three retrofits · AjKadri
Sera BoltPost-Quantum dApp

Pushed 1 commit to main

  • f764003 docs: note that the explorer can show reverted calls as success · AjKadri
Sera BoltPost-Quantum dApp

Pushed 1 commit to main

  • 49e049c test: cover the signer, front-running and nonce traps; document integrator rules · AjKadri
Sera BoltPost-Quantum dApp

Pushed 1 commit to main

Comments and questions

  • No comments yet.